PartialUpdate

PartialUpdate

Updates individual customer properties.

Request

Method
URL
POST

Headers

Name
Required
Type
Description
APIKey
Guid
A valid API key with a scope of Customers | Update

Body

The request body should contain properties that are either used to identify the customer or update the customer.
If a property is not specified, then it will not be affected.
The request body follows the same general format as a customer update object, with the following exceptions:
Property
Required
Type
Description
UniqueID
GUID
The unique ID of the customer.
ExternalID
Text
The external ID of the customer.
DisplayName
Text
This cannot be empty if specified.
FirstName
Text
This cannot be empty if specified.
LastName
Text
This cannot be empty if specified.
SalesRep
Text
This cannot be empty if specified.
BillToAddress1
Text
If this property is specified, it cannot be empty, and the BillToCity, BillToState, and BillToZip properties must also be specified and not empty.
BillToCity
Text
If this property is specified, it cannot be empty, and the BillToAddress1, BillToState, and BillToZip properties must also be specified and not empty.
BillToState
Text
If this property is specified, it cannot be empty, and the BillToAddress1, BillToCity, and BillToZip properties must also be specified and not empty.
BillToZip
Text
If this property is specified, it cannot be empty, and the BillToAddress1, BillToCity, and BillToState properties must also be specified and not empty.
TaxCodes
Array of Tax Code objects
If this array is present, each tax code must have a Code and an Agency specified and not empty.
ShippingAddresses
Array of Address Objects
If this array is present, each shipping address must have an Address1, City, State, and Zip specified and not empty. The State must be 2+ characters and the Zip must be 3+.
EmailAddresses
Array of Email Address Objects
If this array is present, each email address must have a Label and an Address specified and not empty.
Phones
Array of Phone Number Objects
If this array is present, each phone number must have a Label and Number specified and not empty.
Notes
Array of Note Objects
If this array is present, each note must have a Note string specified and not empty.
Links
Array of Link Objects
If this array is present, each link of type 0 must have RelateType, RelateTarget, and RelateUniqueID specified and not empty. Links of type 1 must have Name and URL specified and not empty.
Attachments
Array of Attachment Objects
If this array is present, each attachment must have a URL specified and not empty.
Tags
Array of Tag Objects
If this array is present, each tag must have a Tag specified and not empty.
The rest of the properties are the same as when updating a customer with the Update endpoint.
Refer to the Update endpoint for an example of the body when updating a customer.

Example Bodies

The following few examples illustrate a few different examples of a body that might be supplied for a partial update and what properties will be affected.

Example 1

{
"UniqueID": "c30eab94-004a-42b0-834b-3cc4b112df19",
"ExternalID": "JennyF",
"MiddleInitial": "B"
}
If this body is supplied, we will identify the customer by the provided UniqueID. If it matches a real customer, then the ExternalID will be updated to "JennyF" and the middle initial will be updated to "B". All other properties will be untouched.

Example 2

{
"ExternalID": "JennyF",
"LeadSource": "Referral"
}
If this body is supplied, we will identify the customer by the provided ExternalID. If it matches a real customer, then the lead source will be updated to "Referral". All other properties including the ExternalID will be untouched.

Example 3

{
"UniqueID": "c30eab94-004a-42b0-834b-3cc4b112df19",
"CompanyName": "Stunning Blinds",
"MiddleInitial": "B"
}
If this body is supplied, we will identify the customer by the provided UniqueID. If it matches a real customer, then the company name will be updated to "Stunning Blinds" and the middle initial will be updated to "B". All other properties will be untouched.

Remarks

To identify a customer, only the UniqueID OR the ExternalID are used. If both are supplied, the UniqueID will be used.
Use the UniqueID to identify a customer if its ExternalID needs to be updated.
When updating shipping addresses, email addresses, phone numbers, notes, tags, links, tax codes or attachments, all items in those groups must be provided. Meaning, you cannot update a single note. If you want to update a note you must provide all the notes for the customer.
You cannot use the PartialUpdate endpoint to update a single note or add a single shipping address.

Response

Headers

None

Status Code

Code
Description
200 OK
The customer was updated.
400 Bad Request
The customer was not updated. The reason why will be returned.
401 Unauthorized
The API key is missing, invalid, disabled, or does not have the correct scope.
404 Not Found
The customer was not found.

Body

All details, except the measure sheets and history, are returned. Refer to the body format when reading a customer for an explanation of the format.