Customers can be accessed through the API via the customers base URL:

$ curl
  • Supported list methods: GET POST
  • Supported detail methods: GET PUT DELETE

Fields (string)

The user-defined ID for this customer (users normally set this to the ID of this customer in their ERP or CRM system). This is not the same as the numeric objID which is set by the system. See the bulk import docs for more information. (string) (string) (string)
customer.billTo (readonly reference to Address)

The Address object for this customer's billing address.

  • When doing a POST on a new customer, you must provide the details of the billTo address inline, even if this means simply posting an empty dictionary to create a blank billing address. Every customer must have a billTo even if all of its fields are blank.

  • When doing a PUT on an existing customer, you cannot provide a different resource_uri for the billTo address to connect the customer to a different address resource. The billTo that is on the customer when it is created stays with it for its lifetime and this relationship cannot be broken.

customer.shipTos (collection of Address)

A (possibly empty) collection of Address objects that represent this customer's additional shipping addresses.

customer.creditCards (collection of CreditCard)

A (possibly empty) collection of CreditCard objects representing the credit cards that are attached to this customer.

customer.salesOrders (collection of SalesOrder)

A (possibly empty) collection of SalesOrder objects representing the orders that have been written for this customer. This will be returned with the oldest orders first.

customer.userGroup (reference to UserGroup)

The UserGroup representing the user group that this customer has been restricted to. This customer's orders will always be restricted to the same group.

A customer will always be in a user group. If you pass null for the userGroup when creating a new customer, it will be automatically linked to the master user group.

customer.customerGroup (reference to CustomerGroup)

A reference to the CustomerGroup that this customer is in, which will be one of the groups defined here.

customer.shippingMethod (string)

The default shipping method for this customer, as selected from the available choices.

customer.paymentTerms (string)

The default payment terms for this customer, as selected from the available choices.

customer.currency (readonly string)

The three-letter currency code (e.g. "USD", "GBP" etc) that applies to this customer.

The reason that this field is read-only is that it is actually derived from the customer group this customer belongs to, or the company itself if no customer groups are defined.

customer.locale (readonly string)

The locale code (e.g. "en_US", "fr_FR" or similar) that applies to this customer. This field is read-only for the same reason as currency above.

Filter Parameters

id (string)

Filters customers by an exact match against the user-defined id described above. When applying this filter you will get either 0 or 1 results.

# Filter for the customer with user-defined ID 'C1234'
$ curl
customerGroup (string)

Filters customers by customer group. Pass the customer group's ID (not its name) as the filter parameter. For example:

# Filter for customers in the 'Preferred' customer group
$ curl
userGroup (string)

Filters customers by user group. Use the user group's ID (not its name). Results include customers in that user group or any of its sub-groups. For example:

# Filter for customers in the 'NorthWest' user group
$ curl


      "street":"8051 Brown Road",
   "contact":"Kelly Slater",
      "name":"US Retailers",
   "email":"[email protected]",
   "name":"The Globe",
   "paymentTerms":"NET 30",
Next: Addresses

Recent Discussions

28 Dec, 2012 03:29 AM
26 Dec, 2012 08:57 PM
17 Dec, 2012 11:37 PM