Update customer

View as Markdown
## 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-key`** header (alias `x-account-api-key`). - Requires the scope: **`Merchant.customer.update`**. - Optionally scope the key with **`x-application-account-id`** (alias `x-account-id`) or the `application_account_id` / `account_id` query 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 `email` is 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

x-api-keystring
API Key authentication via header

Path parameters

idstringRequired

The customer’s unique identifier (UUID). Must belong to the authenticated store.

Headers

x-application-account-idstringOptional

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.

Request

This endpoint expects an object.
namestringOptional
emailstringOptionalformat: "email"
mobilestringOptional