Skip to content

Create a customer

POST
/customers
curl --request POST \
--url https://api.oletapp.com/your-store/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "address_1": "example", "address_2": "example", "city": "example", "company_name": "example", "country": "example", "custom_field_1": "example", "custom_field_2": "example", "custom_field_3": "example", "custom_field_4": "example", "customer_code": "example", "customer_group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "date_of_birth": "example", "dont_email": true, "dont_sms": true, "email": "hello@example.com", "enable_loyalty": true, "first_name": "example", "gender": "example", "last_name": "example", "mobile": "example", "note": "example", "phone": "example", "state": "example", "tax_id": "example", "website": "example", "zipcode": "example" }'

A missing customer_code is generated.

do_not_sell_share cannot be set here; it is read-only, set only through the admin UI or a DSAR request. on_account_limit cannot be set here either (naming it is 400 VALIDATION_FAILED); on-account sales are not built yet, though a response still carries the field.

Requires scope: customers:write

Media typeapplication/json
object
address_1
Any of:
string
<= 255 characters
address_2
Any of:
string
<= 255 characters
city
Any of:
string
<= 100 characters
company_name
Any of:
string
<= 255 characters
country
string | null
custom_field_1
Any of:
string
<= 100 characters
custom_field_2
Any of:
string
<= 100 characters
custom_field_3
Any of:
string
<= 100 characters
custom_field_4
Any of:
string
<= 100 characters
customer_code
Any of:
string
<= 100 characters
customer_group_id
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
date_of_birth
Any of:
string
/^\d{4}-\d{2}-\d{2}$/
dont_email
boolean
dont_sms
boolean
email
Any of:
string format: email
<= 254 characters /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
enable_loyalty
boolean
first_name
required
string
>= 1 characters <= 100 characters
gender
Any of:
string
<= 20 characters
last_name
Any of:
string
<= 100 characters
mobile
string | null
note
Any of:
string
<= 2000 characters
phone
string | null
state
Any of:
string
<= 100 characters
tax_id
Any of:
string
<= 100 characters
website
Any of:
string
<= 255 characters
zipcode
Any of:
string
<= 20 characters
Examplegenerated
{
"address_1": "example",
"address_2": "example",
"city": "example",
"company_name": "example",
"country": "example",
"custom_field_1": "example",
"custom_field_2": "example",
"custom_field_3": "example",
"custom_field_4": "example",
"customer_code": "example",
"customer_group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"date_of_birth": "example",
"dont_email": true,
"dont_sms": true,
"email": "hello@example.com",
"enable_loyalty": true,
"first_name": "example",
"gender": "example",
"last_name": "example",
"mobile": "example",
"note": "example",
"phone": "example",
"state": "example",
"tax_id": "example",
"website": "example",
"zipcode": "example"
}

Create a customer

Media typeapplication/json
object
data
required
object
address_1
required
string | null
address_2
required
string | null
city
required
string | null
company_name
required
string | null
country
required
string | null
created_at
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
custom_field_1
required
string | null
custom_field_2
required
string | null
custom_field_3
required
string | null
custom_field_4
required
string | null
customer_code
required
string
customer_group_id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
date_of_birth
required

YYYY-MM-DD, or null.

string | null
do_not_sell_share
required

Read-only. Set only through the admin UI or a DSAR request, never through this API.

boolean
dont_email
required
boolean
dont_sms
required
boolean
email
required
string | null
enable_loyalty
required
boolean
first_name
required
string
gender
required
string | null
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
is_walk_in
required

True for the retailer’s single system walk-in customer.

boolean
last_name
required
string | null
mobile
required
string | null
note
required
string | null
on_account_limit
required

The customer’s account credit limit. Integer minor units (cents).

integer
>= -9007199254740991 <= 9007199254740991
phone
required
string | null
state
required
string | null
tax_id
required
string | null
updated_at
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
version
required

Opaque delta-sync version. Increases with every change; use it to detect updates.

string
website
required
string | null
zipcode
required
string | null
Examplegenerated
{
"data": {
"address_1": "example",
"address_2": "example",
"city": "example",
"company_name": "example",
"country": "example",
"created_at": "2026-04-15T12:00:00Z",
"custom_field_1": "example",
"custom_field_2": "example",
"custom_field_3": "example",
"custom_field_4": "example",
"customer_code": "example",
"customer_group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"date_of_birth": "example",
"do_not_sell_share": true,
"dont_email": true,
"dont_sms": true,
"email": "example",
"enable_loyalty": true,
"first_name": "example",
"gender": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"is_walk_in": true,
"last_name": "example",
"mobile": "example",
"note": "example",
"on_account_limit": 1,
"phone": "example",
"state": "example",
"tax_id": "example",
"updated_at": "2026-04-15T12:00:00Z",
"version": "example",
"website": "example",
"zipcode": "example"
}
}

An error response.

Media typeapplication/json
object
error
required
object
code
required

A machine-readable error code, e.g. VALIDATION_FAILED.

string
Allowed values: UNAUTHORIZED PLAN_REQUIRED INSUFFICIENT_SCOPE NOT_FOUND VALIDATION_FAILED CONFLICT STALE_VERSION RATE_LIMITED IDEMPOTENCY_KEY_REUSED IDEMPOTENCY_IN_PROGRESS IMAGE_FETCH_FAILED UNPROCESSABLE INTERNAL RETAILER_CANCELLED RETAILER_SUSPENDED RETAILER_NOT_FOUND TRIAL_DECISION_REQUIRED PLAN_USERS_EXCEEDED RETAILER_PAUSED PRODUCT_LIMIT_REACHED NOT_STOCK_TRACKED REASON_DIRECTION_MISMATCH REASON_NOT_ALLOWED INSUFFICIENT_STOCK OUTLET_DELETED
fields
Array<object>
object
field
required
string
message
required
string
message
required

A plain-English sentence describing what went wrong.

string
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}