Sign Up Login or
Join Program

This section is a work in progress, and subject to change.

API access is currently restricted. Interested? Please apply to our early access program.








Customers Resource

URL Endpoints
Endpoint Supported Metods Description
/[store-handle]/api/v2/sales/customers.json GET Collection of customers.
/[store-handle]/api/v2/sales/customers/[customer-uuid].json GET, PUT, DELETE A single customer. Does not take parameters.
/[store-handle]/api/v2/sales/customers/count.json GET Total result counter for a query. Returns as integer.
/[store-handle]/api/v2/sales/customers/[customer-uuid]/orders.json GET List of orders by customer. Works as orders resource.
URL Parameters
Parameter Type Example Description
size integer /[store-handle]/api/v2/webstore/products.json?size=40 Results per page. Limited to 20, 40 or 80. Default is 40.
page integer /[store-handle]/api/v2/webstore/products.json?page=5 Result page for query. Starts at and defaults to 0.
tags string /[store-handle]/api/v2/webstore/products.json?tags=men,bikes Filter by tags. Multiple tags allowed.
query string /[store-handle]/api/v2/webstore/products.json?query=test Fulltext search by query.
since timestamp /[store-handle]/api/v2/webstore/products.json?since=1253783215 Results newer then revision.

Although you can only page through the results by at most 80 items at a time, you can get the total count of items for the given query by sending the exact same GET parameters to /[store-handle]/api/v2/webstore/customers/count.json. For example /[store-handle]/api/v2/webstore/customers/count.json will return the total count for all customers, and /[store-handle]/api/v2/webstore/customers/count.json?tags=wholesale will return the count for all products with tag wholesale. Counting does not work in combination with revision and query parameters.

Data Structure

Customers are contact records that hold name, address and shipping information. They can be organized with tags. Orders hold immutable copies of customer records. They can only be sorted on lastName.

GET /[store-handle]/api/v2/sales/customers.json /static/support/documentation/examples/customers.json
Name Path Type Description Example
type type string (readonly) Resource type. Must match the resource type used in the endpoint. "orders", "products", "customers"
uuid uuid uuid Resource identifier. Must be a valid hex representation. "06429e75a8ea11de80c09314b8ee4e52"
revision revision timestamp (readonly) Resource version. Uses the timestamp format, precision up to seconds. 1253783394
date date timestamp (readonly) Date created. 1253783215
tags tags array with strings Tags for this customer. Values are limited lowercase strings with url friendly characters. "wholesale", "local"
firstName firstName string First name. "John", "Mary"
middleName middleName string Middle name. "van"
lastName lastName string Last name. "Ryan", "Poppins"
companyName companyName string Company name. "Sofa"
taxNumber taxNumber string Tax number. "NL123456789"
email email string Email address. "my@email.com"
workPhone workPhone string Work phone number. "1 800 12345"
homePhone homePhone string Home phone number. "1 800 12345"
mobilePhone mobilePhone string Mobile phone number. "1 800 12345"
street1 street1 string Street address "123, Broadway"
street2 street2 string Street address line 2 "Apt 4 Building 8"
city city string City name "New York"
zipCode zipCode string Zip/Postal Code "90210"
stateCode stateCode string State/Province Code "NY"
stateName stateName string (readonly) State/Province Name. Generated from state code. "New York"
countryCode countryCode string Country Code "US"
countryName countryName string (readlonly) Country Name. Generated from country code. "United States"
shippingFirstName shippingFirstName string First name for shipping address. "John", "Mary"
shippingMiddleName shippingMiddleName string Middle name. "van"
shippingLastName shippingLastName string Last name. "Ryan", "Poppins"
shippingCompanyName shippingCompanyName string Company name. "Sofa"
shippingStreet1 shippingStreet1 string Street address "123, Broadway"
shippingStreet2 shippingStreet2 string Street address line 2 "Apt 4 Building 8"
shippingCity shippingCity string City name "New York"
shippingZipCode shippingZipCode string Zip/Postal Code "90210"
shippingStateCode shippingStateCode string State/Province Code "NY"
shippingStateName shippingStateName string (readonly) State/Province Name. Generated from state code. "New York"
shippingCountryCode shippingCountryCode string Country Code "US"
shippingCountryName shippingCountryName string (readonly) Country Name. Generated from country code. "United States"