Order Management
Order Management

Customers

Customer records represent the people and businesses you ship to. Orders attach to a customer record matched by exact email within your account, or explicitly via the customerId field on order creation. Email addresses cannot be changed through the API because email is the platform's customer matching key.

GET /public/customers

Lists the customer records in your account. All parameters are optional query-string parameters. Requires the Authorization: Bearer header.

Parameter Type Required Default Description
email string No Exact-match filter on the customer email address
page int No 1 Page number to fetch
pageSize int No 25 Results per page, maximum 100
{
  "success": true,
  "result": [
    {
      "id": 0,
      "firstName": "string",
      "lastName": "string",
      "company": "string",
      "email": "string",
      "phone": "string",
      "address1": "string",
      "address2": "string",
      "address3": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "country": "string"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 25,
    "totalCustomers": 100,
    "totalPages": 4
  }
}

POST /public/customer

Creates a customer record. Only email is required. If a customer with that email already exists in your account the call returns success false, error "Customer Exists", and the customerId of the existing record so you can reuse it.

Field Type Required Description
firstName string No Customer first name
lastName string No Customer last name
company string No Business name
email string Yes Customer email address; the matching key for orders
phone string No Phone number
address1 string No Primary address line
address2 string No Secondary address line
address3 string No Third address line
city string No City
state string No Two-letter state code
zip string No Postal code
country string No Country code
{
  "success": false,
  "error": "Customer Exists",
  "customerId": 0
}

PUT /public/customer/{id}

Updates the customer record with the given id. Only the fields present in the request body are changed; everything else is left alone. The email address cannot be changed - a request that tries to change it is rejected.

{
  "success": false,
  "error": "Email Change Not Supported"
}

Customer Object

Every customer endpoint returns this shape, in camelCase.

{
  "id": 0,
  "firstName": "string",
  "lastName": "string",
  "company": "string",
  "email": "string",
  "phone": "string",
  "address1": "string",
  "address2": "string",
  "address3": "string",
  "city": "string",
  "state": "string",
  "zip": "string",
  "country": "string"
}