PUT v1/Customers/{customerID}/UpdateCustomer
Updates assignment fields (Agent, CSR) on a customer or prospect. Per field: omit/null leaves it unchanged, 0 clears it, a positive value assigns that employee.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| customerID |
The customer/prospect id. Must be a positive integer. |
integer |
Required |
Body Parameters
Fields to update. At least one of AgentID / CsrID must be provided; a positive value must be an active employee with access to the customer's office, 0 clears the field.
UpdateCustomerDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| FirstName |
Optional. First name of the contact. Omit or null to leave unchanged. Required field: an empty string is rejected (it cannot be cleared). |
string |
None. |
| MiddleName |
Optional. Middle name of the contact. Omit or null to leave unchanged; empty string to clear it. |
string |
None. |
| LastName |
Optional. Last name of the contact. Omit or null to leave unchanged. Required field: an empty string is rejected (it cannot be cleared). |
string |
None. |
| BusinessName |
Optional. Business name of a commercial customer/prospect. Omit or null to leave unchanged. Required field for commercial contacts: an empty string is rejected (it cannot be cleared). Applies only to commercial (Type == "C") customers; use FirstName/MiddleName/LastName for personal contacts. |
string |
None. |
| AgentID |
Optional. EmployeeID of the agent to assign. Omit or null to leave unchanged; 0 clears the field; a positive value must be an active employee with access to the customer's office. |
integer |
None. |
| CsrID |
Optional. EmployeeID of the CSR to assign. Omit or null to leave unchanged; 0 clears the field; a positive value must be an active employee with access to the customer's office. |
integer |
None. |
| DateOfBirthString |
Optional. Date of birth as "yyyy-MM-dd". Omit or null to leave unchanged; empty string to clear; a valid date to set. |
string |
None. |
| Addresses |
Optional. One or more addresses to insert or update (any type: Mailing, Billing, Garage, Location). Omit or null (or empty list) to leave addresses unchanged. Per address: AddressID = 0 inserts; a non-zero AddressID updates an existing address that belongs to this customer. |
Collection of UpsertAddressDTO |
None. |
Request Formats
application/json, text/json
{
"FirstName": "sample string 1",
"MiddleName": "sample string 2",
"LastName": "sample string 3",
"BusinessName": "sample string 4",
"AgentID": 1,
"CsrID": 1,
"DateOfBirthString": "sample string 5",
"Addresses": [
{
"AddressID": 1,
"AddressTypeID": "sample string 2",
"Line1": "sample string 3",
"Line2": "sample string 4",
"City": "sample string 5",
"State": "sample string 6",
"County": "sample string 7",
"CountryCode": "sample string 8",
"Province": "sample string 9",
"Zip": "sample string 10",
"Notes": "sample string 11",
"isPreferred": true
},
{
"AddressID": 1,
"AddressTypeID": "sample string 2",
"Line1": "sample string 3",
"Line2": "sample string 4",
"City": "sample string 5",
"State": "sample string 6",
"County": "sample string 7",
"CountryCode": "sample string 8",
"Province": "sample string 9",
"Zip": "sample string 10",
"Notes": "sample string 11",
"isPreferred": true
}
]
}
application/x-www-form-urlencoded
application/xml, text/xml
<UpdateCustomerDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QQSolutions.NextGen.ModelLibrary.DataTransferObjects.Contacts">
<Addresses>
<UpsertAddressDTO>
<AddressID>1</AddressID>
<AddressTypeID>sample string 2</AddressTypeID>
<City>sample string 5</City>
<CountryCode>sample string 8</CountryCode>
<County>sample string 7</County>
<Line1>sample string 3</Line1>
<Line2>sample string 4</Line2>
<Notes>sample string 11</Notes>
<Province>sample string 9</Province>
<State>sample string 6</State>
<Zip>sample string 10</Zip>
<isPreferred>true</isPreferred>
</UpsertAddressDTO>
<UpsertAddressDTO>
<AddressID>1</AddressID>
<AddressTypeID>sample string 2</AddressTypeID>
<City>sample string 5</City>
<CountryCode>sample string 8</CountryCode>
<County>sample string 7</County>
<Line1>sample string 3</Line1>
<Line2>sample string 4</Line2>
<Notes>sample string 11</Notes>
<Province>sample string 9</Province>
<State>sample string 6</State>
<Zip>sample string 10</Zip>
<isPreferred>true</isPreferred>
</UpsertAddressDTO>
</Addresses>
<AgentID>1</AgentID>
<BusinessName>sample string 4</BusinessName>
<CsrID>1</CsrID>
<DateOfBirthString>sample string 5</DateOfBirthString>
<FirstName>sample string 1</FirstName>
<LastName>sample string 3</LastName>
<MiddleName>sample string 2</MiddleName>
</UpdateCustomerDTO>
Response Information
Resource Description
ActionResultDTO — IsSuccess=true on success, otherwise IsSuccess=false with a message.
ActionResultDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| IsSuccess |
Signifies whether action is successful |
boolean |
None. |
| ErrorCode |
Error code |
string |
None. |
| ErrorMessage |
Error message |
string |
None. |
| InfoMessage |
Information message |
string |
None. |
Response Formats
application/json, text/json
{
"IsSuccess": true,
"ErrorCode": "sample string 2",
"ErrorMessage": "sample string 3",
"InfoMessage": "sample string 4"
}
application/xml, text/xml
<ActionResultDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QQSolutions.NextGen.ModelLibrary.DataTransferObjects"> <ErrorCode>sample string 2</ErrorCode> <ErrorMessage>sample string 3</ErrorMessage> <InfoMessage>sample string 4</InfoMessage> <IsSuccess>true</IsSuccess> </ActionResultDTO>