update

PATCH /api/v1/accounts/:account_id/customers/:id

Update a customer

Updates an existing customer’s details. To add stamps or redeem rewards, use the customer cards endpoints instead.

metadata is shallow-merged into the existing metadata. external_references are upserted by ‘(source, external_id)` - to remove a reference, omit it from subsequent calls and use a separate DELETE workflow (not yet exposed via API; manage in dashboard for now).

Parameters

Name Type Required Description
account_id Must be a number. Required

Store (account) ID

id Must be a number. Required

Customer ID

customer Must be a Hash Required

Customer attributes to update

customer[first_name] Must be a String Optional

Customer’s first name

customer[last_name] Must be a String Optional

Customer’s last name

customer[email] Must be a String Optional

Customer’s email address (unique per store)

customer[phone] Must be a String Optional

Customer’s phone number (unique per store)

customer[birthday] Must be a String Optional

Customer’s birthday (YYYY-MM-DD)

customer[metadata] Must be a Hash Optional

Shallow-merged into existing metadata

customer[external_references] Must be an Array of nested elements Optional

Array of ‘{source, external_id, metadata}` objects to upsert

customer[external_references][source] Must be a String Required

Lowercase slug for the external system

customer[external_references][external_id] Must be a String Required

External system’s identifier for this customer

customer[external_references][metadata] Must be a Hash Optional

Optional per-reference metadata

Error Codes

Code Description
401 Unauthorized – invalid or missing API token
404 Store or customer not found
422 Validation failed – check `errors` for details