Support

Create, read, and update customer profiles within a store.

GET
/stores/{storeId}/customers

Authorization

PAT commerce.customer:read
AuthorizationBearer <token>

Personal Access Token (PAT). Include as Authorization: Bearer $GODADDY_PAT. Required scopes: commerce.customer:read, commerce.customer:create, commerce.customer:update.

In: header

Scope: commerce.customer:read

Path Parameters

storeId*string

An identifier for a store

Formatuuid

Query Parameters

page?integer

The page of results to return for pagination. Only supported up to the first 10 000 records of a result set. Use pageToken rather than page where possible. PageToken and page can not be used in combination, doing so will result in a 422 response.

Formatinteger-positive
Default1
pageSize?integer

Maximum number of items to return. If used with page will return results with an offset of page * pageSize

Formatinteger-positive
Rangevalue <= 500
Default25
pageToken?string

Use the pageToken returned from a previous search in order to obtain the next set of results. Use pageToken rather than page where possible. PageToken and page can not be used in combination, doing so will result in a 422 response.

totalRequired?boolean

Indicates whether the response should include the total number of items and pages through response properties totalItems and totalPages respectively.

queryString?string

Search term - this string will be matched as a starts with for all text fields

nonEmptyFields?array<>

Filter customers by presence of at least one of these fields

emptyFields?array<>

Filter customers by absence of at least one of these fields

allNonEmptyFields?array<>

Filter customers by presence of all of these fields

allEmptyFields?array<>

Filter customers by absence of all of these fields

externalIdentifiers?array<>

Filter customers by external identifier; provide as comma separated values in the form type:value (eg: poynt:123,asin:B0B9F7WNQH)

updatedAtStart?string

Filter customers whose updatedAt is >= the specified date

Match^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
Length20 <= length <= 64
updatedAtEnd?string

Filter customers whose updatedAt is <= the specified date

Match^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$
Length20 <= length <= 64
sort?string

Sort expression accepted by the underlying customer search service

excludeGuestCustomers?boolean

Whether to exclude guest customers (those without an associated user record). Defaults to true.

Defaulttrue

Response Body

application/json

*/*

*/*

*/*

*/*

application/json

*/*

*/*

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers"
{  "links": [    {      "href": "http://example.com",      "rel": "string",      "title": "string",      "targetMediaType": "string",      "targetSchema": null,      "method": "string",      "submissionMediaType": "application/json",      "submissionSchema": null    }  ],  "totalItems": 0,  "totalPages": 0,  "customers": [    {      "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",      "firstName": "Fredrick",      "lastName": "Smith",      "organization": "GoDaddy",      "jobTitle": "string",      "addresses": [],      "emails": [],      "instantMessages": [],      "socialProfiles": [],      "phones": [],      "urls": [],      "updatedAt": "stringstringstringst",      "listKeys": [        "bbf6d5ee-f24e-4a77-a6a1-e3fd97d1db49"      ],      "joined": false,      "orderCount": 0,      "profileImageUrl": "string",      "paymentCount": 0,      "notes": "string",      "createdAt": "stringstringstringst",      "source": "string",      "externalIdentifiers": [        {          "externalId": "string",          "source": "INVOICE"        }      ]    }  ]}
POST
/stores/{storeId}/customers

Authorization

PAT commerce.customer:create
AuthorizationBearer <token>

Personal Access Token (PAT). Include as Authorization: Bearer $GODADDY_PAT. Required scopes: commerce.customer:read, commerce.customer:create, commerce.customer:update.

In: header

Scope: commerce.customer:create

Path Parameters

storeId*string

An identifier for a store

Formatuuid

Request Body

application/json

Customer data to import

Response Body

application/json

*/*

*/*

*/*

*/*

application/json

*/*

*/*

curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "firstName": "Fredrick",      "lastName": "Smith",      "listKeys": [        "bbf6d5ee-f24e-4a77-a6a1-e3fd97d1db49"      ]    },    "source": "COMMERCE"  }'
{  "links": [    {      "href": "string",      "method": "string",      "rel": "string"    }  ]}
GET
/stores/{storeId}/customers/{customerId}

Authorization

PAT commerce.customer:read
AuthorizationBearer <token>

Personal Access Token (PAT). Include as Authorization: Bearer $GODADDY_PAT. Required scopes: commerce.customer:read, commerce.customer:create, commerce.customer:update.

In: header

Scope: commerce.customer:read

Path Parameters

customerId*string

The id of the specific customer

Formatuuid
storeId*string

An identifier for a store

Formatuuid

Response Body

application/json

*/*

*/*

*/*

application/json

*/*

*/*

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "customer": {    "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",    "firstName": "Fredrick",    "lastName": "Smith",    "organization": "GoDaddy",    "jobTitle": "string",    "addresses": [],    "emails": [],    "instantMessages": [],    "socialProfiles": [],    "phones": [],    "urls": [],    "updatedAt": "stringstringstringst",    "listKeys": [      "bbf6d5ee-f24e-4a77-a6a1-e3fd97d1db49"    ],    "joined": false,    "orderCount": 0,    "profileImageUrl": "string",    "paymentCount": 0,    "notes": "string",    "createdAt": "stringstringstringst",    "source": "string",    "externalIdentifiers": [      {        "externalId": "string",        "source": "INVOICE"      }    ]  },  "links": [    {      "href": "http://example.com",      "rel": "string",      "title": "string",      "targetMediaType": "string",      "targetSchema": null,      "method": "string",      "submissionMediaType": "application/json",      "submissionSchema": null    }  ]}
PATCH
/stores/{storeId}/customers/{customerId}

Authorization

PAT commerce.customer:update
AuthorizationBearer <token>

Personal Access Token (PAT). Include as Authorization: Bearer $GODADDY_PAT. Required scopes: commerce.customer:read, commerce.customer:create, commerce.customer:update.

In: header

Scope: commerce.customer:update

Path Parameters

customerId*string

The id of the specific customer

Formatuuid
storeId*string

An identifier for a store

Formatuuid

Request Body

application/json

Customer data to import

Body shape for PATCH /stores/{storeId}/customers/{customerId}. Note that source is optional on update — the API does not require it (and production clients such as mwc-core do not send it on update calls).

Response Body

application/json

*/*

*/*

*/*

*/*

application/json

*/*

*/*

curl -X PATCH "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "firstName": "Fredrick",      "lastName": "Smith",      "listKeys": [        "bbf6d5ee-f24e-4a77-a6a1-e3fd97d1db49"      ],      "updatedAt": "stringstringstringst"    }  }'
{  "links": [    {      "href": "string",      "method": "string",      "rel": "string"    }  ]}

Last updated on

How is this guide?