Update customer
Update customer
Partially updates an existing customer identified by id, scoped to the authenticated store. All body fields are optional (PartialType of the create DTO) — only supplied fields are updated.
Authentication
- Send the merchant API key in the
x-api-keyheader (aliasx-account-api-key). - Requires the scope:
Merchant.customer.update. - Optionally scope the key with
x-application-account-id(aliasx-account-id) or theapplication_account_id/account_idquery param.
Path params
id: the customer UUID (must belong to the caller’s store).
Body
JSON body (application/json) with any subset of the customer fields. Unknown properties are stripped.
Side-effects / validation
- If the customer is not found for the store: 404 Not Found.
- If
emailis changed to one already used by another customer in the same store (case-insensitive): 400 Bad Request ("A customer with this email already exists for your store."). - Returns the updated customer record.
Notas: PartialType(CreateCustomerDto) — every create field is accepted but optional. Email uniqueness is only re-checked when the email actually changes. 404 if the customer does not belong to the caller’s store.
Authentication
Path parameters
The customer’s unique identifier (UUID). Must belong to the authenticated store.
Headers
Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.
