Update a customer
PATCH methodhttps://api.anyshop.io/v1/customers/{id}
Changes the name, or gives or withdraws marketing consent (recorded with the source api and the time). A buyer without a record gets one, under a new cus_ ID. Live keys only. Erasing a customer and exporting their data are in the dashboard only, after the owner's fresh two-factor check.
Path parameters
idstring required
Body
application/json0 required, 2 optionalnamestring Their name, up to 200 characters; replaces the one keptUp to 200 charactersmarketing_consentboolean true: they agreed to marketing emails, recorded with the source api and the time. false: they withdrew it, recording when. Left out, consent stays as it is
Headers
Idempotency-Keystring Up to 255 characters. A retry with the same key and request gets the first answer, without running twice (24 hours).
Returns
The customer object.
Errors
Status and error.type400invalid_requestThe request is not valid;error.paramnames the field401authenticationNo API key, or it is not valid403permissionThe key does not have the scope this needs, or the store is suspended (store_suspended)404not_foundNot found in the key's store and mode409conflictConflicts with the object's state (type conflict), or an Idempotency-Key reused for another request (type idempotency, code idempotency_key_reused)429rate_limitedToo many requests; see Retry-After