Change the account
const url = 'https://example.com/storefront/sites/northgate.shop.getbottle.app/account';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","marketingConsent":true,"locale":"en-GB"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/storefront/sites/northgate.shop.getbottle.app/account \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "marketingConsent": true, "locale": "en-GB" }'Deliberately without a staff session: a shopper on the business’s own shop. Its name, the old single marketing switch, and its language. A language is the shop’s and the account’s own emails’, and is given to every customer this account manages, so their order, delivery and invoice emails come in it too.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
northgate.shop.getbottle.appRequest Bodyrequired
Section titled “Request Bodyrequired”object
A language: en-GB English, ar Arabic, ur Urdu, pa Punjabi (Gurmukhi), hi Hindi, bn Bengali, gu Gujarati, zh-Hans Chinese (Simplified), pl Polish, ro Romanian, es Spanish, fr French, de German.
Responses
Section titled “Responses”The account
object
A language: en-GB English, ar Arabic, ur Urdu, pa Punjabi (Gurmukhi), hi Hindi, bn Bengali, gu Gujarati, zh-Hans Chinese (Simplified), pl Polish, ro Romanian, es Spanish, fr French, de German.
object
UUID v7
object
UUID v7
UUID v7
object
Example
{ "locale": "en-GB", "customers": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "kind": "domestic", "role": "manager" } ], "addresses": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "tradeApplication": { "status": "none" }}Refused: the message says why
object
Example
{ "error": "not_found", "message": "Customer not found"}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not from the shop itself, or the email is not confirmed yet
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a shop. No body.
A real shop not selling now (shop_closed)
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Too many tries
object
Example
{ "error": "not_found", "message": "Customer not found"}