Create Customer
API ExplorerCreates a new customer for the authenticated merchant.
This API supports:
- Creating a customer with an email and/or a phone number
- Associating the customer with a
storeIdor atpn - Validating that the
storeIdandtpnbelong to the authenticated merchant - Detecting duplicate customers and returning every matching customer
Header Parameters
Authentication token generated using the API Key and Secret Key using an Merchant Account. Required for all API requests.
A Unique key generated for each operation to prevent duplicate processing when retrying requests. A UUID is recommended. The key must contain 1–255 visible ASCII characters. If the same request is retried with the same key within 24 hours, the API returns the original successful response with the header 'Idempotent-Replayed: true' instead of processing the operation again
1 <= length <= 255Request Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com" \ -H "token: your-access-token-here" \ -H "Idempotency-Key: 5f0c8e4a-2b7d-4c1e-9a3f-1d2e3f4a5b6c" \ -H "Content-Type: application/json" \ -d '{ "customer_externalRefId": "CRM-4632357", "email": "docs.full.4632357@example.com", "phone": "+14044632357", "firstName": "Jane", "lastName": "Doe", "Dba": "Jane Bakery", "Zipcode": "30301", "City": "Atlanta", "State": "GA", "storeId": "05cbaac8502f" }'{
"data": {
"customer_id": "LMPD9SWTTI1LI05",
"customer_externalRefId": "CRM-4632357",
"email": "docs.full.4632357@example.com",
"phone": "+14044632357",
"firstName": "Jane",
"lastName": "Doe",
"Dba": "Jane Bakery",
"Zipcode": "30301",
"City": "Atlanta",
"State": "GA",
"storeId": "05cbaac8502f"
},
"message": "Customer created successfully",
"response_code": "SUCCESS",
"status_code": 201,
"request_id": "TEST-20261008183354-MDQYGU",
"timestamp": "2026-10-08T13:03:54.158Z"
}{
"data": null,
"message": "The request contains invalid input parameters.",
"response_code": "BAD_REQUEST",
"status_code": 400,
"request_id": "TEST-20261012160432-XQGE3D",
"timestamp": "2026-10-12T10:34:32.432Z",
"errors": [
{
"field": "Zipcode",
"messages": [
"Zipcode must be 5, 6 or 9 letters/digits (6 may be written as A1B 2C3); no other characters"
]
}
]
}{
"data": null,
"message": "Missing authentication token. Please include a valid API token in your request.",
"response_code": "TOKEN_MISSING",
"status_code": 401,
"request_id": "TEST-20261022075139-8WQOJH",
"timestamp": "2026-10-22T07:51:39.690Z"
}{
"data": null,
"message": "Store not found",
"response_code": "NOT_FOUND",
"status_code": 404,
"request_id": "TEST-20261008183411-IXFQJL",
"timestamp": "2026-10-08T13:04:11.604Z"
}{
"data": null,
"message": "Store ID is ambiguous, send tpn instead",
"response_code": "CONFLICT",
"status_code": 409,
"request_id": "TEST-20261008183414-EFGBWX",
"timestamp": "2026-10-08T13:04:14.622Z"
}{
"data": null,
"message": "Unsupported content type",
"response_code": "BAD_REQUEST",
"status_code": 415,
"request_id": "<generated per request>",
"timestamp": "<ISO 8601 time>",
"errors": [
{
"field": "body",
"messages": [
"Content-Type must be application/json"
]
}
]
}{
"data": null,
"message": "This Idempotency-Key was already used with a different request",
"response_code": "BAD_REQUEST",
"status_code": 422,
"request_id": "<generated per request>",
"timestamp": "<ISO 8601 time>"
}{
"data": null,
"message": "Too many requests, please try again in a minute",
"response_code": "RATE_LIMITED",
"status_code": 429,
"timestamp": "<ISO 8601 time>"
}{
"data": null,
"message": "An error occurred while processing your request. Please try again later.",
"response_code": "INTERNAL_ERROR",
"status_code": 500,
"request_id": "<generated per request>",
"timestamp": "<ISO 8601 time>"
}{
"data": null,
"message": "Idempotency check is temporarily unavailable, please retry",
"response_code": "SERVICE_UNAVAILABLE",
"status_code": 503,
"request_id": "<generated per request>",
"timestamp": "<ISO 8601 time>"
}