API - Customers - Create or Update

To create a customer, see below. To update an existing customer, put the Customer ID in the URL: /api6/customers/234567/?apiKey=XXXXXX and use the below example. Any fields not sent will remain the same.


Request:

All the below are parameters are optional. The customer will be created under the locationid of the worker account's API Key. 

POST /api6/customers/?apiKey=XXXXXX {
  firstname: Joel
  lastname: Aem  
  name: Joel Aem  
  organization: Big Company
  cellphone: 123-456-7890
  homephone: 333-333-3232
  officephone: 444-232-2323
  fax: 234-234-2342
  street: 123 Happy St.
  city: Harperville
  state: OH
  zip: 44444
  country: United States
  custtags: Individual,Birthday,Funny
  cleartags: 1 or 0     <--- if you want the custtags to replace what's already saved, set to 1
  email: info@inflatableoffice.com

 customertype: Residential
 notes: Has a rabid cat.

 customfields_ids: {"custom field id": "custom field response"}

}



Response:

201 (Created), recordid containing new ID.

409 (Conflict) if resource already exists, recordid containing duplicate ID.

Is this article helpful?
0 0 1