API CustomerEdit
CustomerEdit(
object Customer
)
Edit existing Customer Information such as Name, Website and Custom Fields.
Request
Request Data:
- (object) Customer
- (int) CustomerID (required) – Identify the ID of the Customer to edit.
- (string) Name (unique) – Identify the Customer to Edit by its Name. If CustomerID is set, this will modify the Customer’s Name.
- (string) Website (optional) – Set the Customer Website.
- (array) Fields (optional) – List of custom fields
{
"Customer": {
"CustomerID": <int>,
"Address": <string>,
"Name": <string>,
"Website": <string>,
"Fields": [
{
"Field": <string>,
"Value": <string>
}, <more fields>
]
}
}
Response
{
"Result": {
"Age": <int>,
"Accounts": [
{
"Account": <string>,
"AccountID": <int>,
"Supplier": <string>,
"SupplierID": <int>
},
<more accounts>
],
"Added": <Date>,
"Aliases": [],
"Contacts": [
{
"Contact": {
"ContactID": <int>,
"Email": <string>,
"FirstName": <string>,
"LastName": <string>,
"PhoneNumbers": [
{
"Number": <string>,
"PhoneNumberID": <int>,
"Type": <Type>
},
<more Phone Numbers>
],
"Salutation": <string>,
"Title": <string>
},
"IsPrimary": <bool>
}
],
"CustomerID": <int>,
"Fields": [
{
"Field": <string>,
"Value": <string>
},
<more custom fields>
],
"Locations": [ // Suppressed if IncludeLocations is false (Since RPM31)
{
"Address": <Date>,
"City": <string>,
"Country": <string>,
"IsPrimary": <bool>,
"LocationID": <int>,
"Name": <string>,
"StateProvince": <string>,
"ZipPostalCode": <string>,
"Added": <datetime>,
"Modified": <datetime>,
"Fields": [ // Since RPM28
{
"Field": <string>,
"Value": <string>
},
<more basic fields>
]
}
],
"Modified": <string>,
"Name": <string>,
"Notes": [],
"NotesForStaff": [],
"Website": <string>
}
Errors
- “Customer name or ID must be specified”
- “Customer not found”
- “A customer with that name already exists” – if changing the customer name
- "Call requires parameter: \"Customer\" which was not found"