---
# System prepended metadata

title: Customer Management Endpoint
tags: [Technical Reference, Customer Management, Endpoints]

---

# Customer Management Endpoint
## Flow

## ServiceURL and Payload
### Create Customer
#### Method: POST
#### Endpoint: /api/CustomerManagement/createcustomer
#### Payload:

```
{
  "tenantID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "customerTypeID": 0,
  "businessName": "string",
  "vatNumber": "string",
  "referenceIDNumber": "string",
  "website": "string",
  "currencyID": 0,
  "paymentTermsCount": 0,
  "paymentTermsRange": "string",
  "firstName": "string",
  "lastName": "string",
  "position": "string",
  "isDefault": true,
  "contactNumber": "string",
  "phoneTypeID": 0,
  "emailAddress": "string",
  "emailTypeID": 0,
  "address1": "string",
  "address2": "string",
  "addressCity": "string",
  "stateCode": "string",
  "countryCode": "string",
  "zipcode": "string",
  "addressTypeID": 0,
  "creator": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

### Update Customer
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomer
#### Payload: 

```
{
  "mainChanged": true,
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "customerTypeID": 0,
  "businessName": "string",
  "vatNumber": "string",
  "referenceIDNumber": "string",
  "website": "string",
  "currencyID": 0,
  "paymentTermsCount": 0,
  "paymentTermsRange": "string",
  "phoneChanged": true,
  "phoneID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contactNumber": "string",
  "phoneNameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "phoneTypeID": 0,
  "isDefaultPhone": true,
  "updaterPhone": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "noteChanged": true,
  "noteID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "noteContent": "string",
  "noteTypeID": 0,
  "isNoteDisplayed": true,
  "nameChanged": true,
  "nameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "firstName": "string",
  "lastName": "string",
  "position": "string",
  "nameDefault": true,
  "nameUpdater": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emailChanged": true,
  "emailID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emailAddress": "string",
  "emailTypeID": 0,
  "emailNameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "isEmailDefault": true,
  "addressChanged": true,
  "addressID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "address1": "string",
  "address2": "string",
  "addressCity": "string",
  "stateCode": "string",
  "countryCode": "string",
  "zipCode": "string",
  "addressTypeID": 0,
  "nameAddressID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "addressDefault": true,
  "addressUpdater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

### Get List (by TenantID)
#### Method: GET
#### Endpoint: /api/CustomerManagement/getcustomerdetail
#### Payload: 
```
ID uniqueidentifier : TenantID
```

### Customer Selection (for Dropdown)
#### Method: POST
#### Endpoint: /api/CustomerManagement/customerselection
#### Payload:
```
TenantID uniqueidentifier : Required. Will cause error if not filled in
SearchParams string : can be empty or null. This will search through customer name, email, and contact number.
```

##### Sample:

###### With searchParams
```
{
  "tenantID": "778df26c-1aab-4f5e-93fd-e4cae2c1bc39",
  "searchParams": "j"
}
```

###### Without searchParams
```
{
  "tenantID": "778df26c-1aab-4f5e-93fd-e4cae2c1bc39"
```

##### Results:
```
[
  {
    "customerID": "33a71cd9-ba9c-42eb-bd2c-58204fe36466",
    "customerName": "Eleanor Horton",
    "emailAddress": "ehorton@magichorton.com",
    "contactNumber": "6235128450"
  }
]
```

---
### Customer Profile
#### Method: POST
#### Endpoint: /api/CustomerManagement/getcustomerdetail
#### Payload:
```
{
  "tenantID": "778DF26C-1AAB-4F5E-93FD-E4CAE2C1BC39",
  "customerID": "86626425-7B55-4B70-A91E-097770094E42",
  "interval": 0
  
}
```

#### Results:
```
[
  {
    "tenantID": "778df26c-1aab-4f5e-93fd-e4cae2c1bc39",
    "customerID": "86626425-7b55-4b70-a91e-097770094e42",
    "customerName": "Dorothy Harper",
    "customerTypeID": 1,
    "customerType": "Individual",
    "created": "05/15/2024 08:48:00",
    "paidTotal": 0,
    "balance": 0,
    "customerContacts": "string", --JSON
    "customerAddress": "string", --JSON
    "customerLedger": "string" --JSON
  }
]
```
---
### Delete Profile
#### Method: POST
#### Endpoint: /api/CustomerManagement/deletecustomer
#### Payload:
```
{
  "customerID": "86626425-7b55-4b70-a91e-097770094e42",
  "tenantID": "778df26c-1aab-4f5e-93fd-e4cae2c1bc39",
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```
---

## Customer Update Sections
### Main Information
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomermain
#### Payload: 
```
{
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "customerTypeID": 0,
  "businessName": "string",
  "vatNumber": "string",
  "referenceIDNumber": "string",
  "website": "string",
  "currencyID": 0,
  "paymentTermsCount": 0,
  "paymentTermsRange": "string",
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```
---
### Customer Name (For Point of Contact if Type is Business)
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomername
#### Payload: 
```
{
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "nameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "firstName": "string",
  "lastName": "string",
  "position": "string",
  "isDefault": true,
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```
---
### Customer Phone
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomerphone
#### Payload: 
```
{
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "phoneID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contactNumber": "string",
  "nameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "phoneTypeID": 0,
  "isDefault": true,
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```
---
### Customer Email
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomeremail
#### Payload: 
```
{
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emailID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "emailAddress": "string",
  "emailTypeID": 0,
  "nameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "isDefault": true,
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```
---
### Customer Address
#### Method: POST
#### Endpoint: /api/CustomerManagement/updatecustomeraddress
#### Payload: 
```
{
  "customerID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "addressID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "address1": "string",
  "address2": "string",
  "addressCity": "string",
  "stateCode": "string",
  "countryCode": "string",
  "zipCode": "string",
  "addressTypeID": 0,
  "nameID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "isDefault": true,
  "updater": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```