Create or update a customer record
POST methodhttps://api.anyshop.io/v1/customers
Keeps a customer record by email: a new one, or the one with this email brought up to date. Consent you send is recorded with the source api and the time. Customer records are live mode only, so this needs a live key. Erasing a customer and exporting their data are not in the API: they are in the dashboard, after the owner's fresh two-factor check.
Body
application/json1 required, 2 optionalemailstring requiredTheir email address. A customer with this email already is updated insteadUp to 254 charactersnamestring 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