Add a domain
const url = 'https://example.com/storefront/domains';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"host":"shop.northgategas.co.uk"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/storefront/domains \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "host": "shop.northgategas.co.uk" }'The business’s own address for the shop, such as shop.northgategas.co.uk. It answers once checked: a CNAME to shops.getbottle.app (or, for a bare domain, A records to Bottle), and a TXT record at _bottle.{host} with the domain’s verifyToken. Adding one that is already this business’s changes nothing.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
shop.northgategas.co.ukResponses
Section titled “Responses”The shop as it now stands
object
object
Yard: classic, photography first. flame: bold type and colour blocks. ledger: quiet, product grid first. Only yard is built today.
object
Classic: Fraunces and Inter. modern: Bricolage Grotesque and Inter. friendly: Nunito throughout. editorial: Playfair Display and Source Sans 3.
object
object
object
object
object
object
object
object
object
Yard: classic, photography first. flame: bold type and colour blocks. ledger: quiet, product grid first. Only yard is built today.
object
Classic: Fraunces and Inter. modern: Bricolage Grotesque and Inter. friendly: Nunito throughout. editorial: Playfair Display and Source Sans 3.
object
object
object
object
object
object
object
object
object
UUID v7
object
object
object
Example
{ "status": "off", "draft": { "template": "yard", "theme": { "primary": "#1F3A5F", "accent": "#E4572E", "background": "#FAF7F2", "fontPair": "classic", "radius": 12, "logoKey": null, "iconKey": null }, "content": { "headline": "", "strapline": "", "banners": [], "sections": [ { "section": "hero", "visible": true }, { "section": "categories", "visible": true }, { "section": "featured", "visible": true }, { "section": "delivery", "visible": true }, { "section": "reviews", "visible": true }, { "section": "about", "visible": true }, { "section": "faq", "visible": true }, { "section": "contact", "visible": true } ], "featuredProductIds": [], "about": "", "deliveryPromise": "", "faq": [], "phone": "", "email": "", "address": "", "openingHours": "", "socials": {} }, "commerce": { "askForEmpties": true, "collection": { "enabled": false, "address": "", "notes": "" }, "tradeEnquiries": false, "offerPhoneOrders": true, "ageCheck": false, "whenLow": "sell", "whenOut": "stop", "termsUrl": null }, "seo": { "title": "", "description": "", "imageKey": null } }, "live": { "template": "yard", "theme": { "primary": "#1F3A5F", "accent": "#E4572E", "background": "#FAF7F2", "fontPair": "classic", "radius": 12, "logoKey": null, "iconKey": null }, "content": { "headline": "", "strapline": "", "banners": [], "sections": [ { "section": "hero", "visible": true }, { "section": "categories", "visible": true }, { "section": "featured", "visible": true }, { "section": "delivery", "visible": true }, { "section": "reviews", "visible": true }, { "section": "about", "visible": true }, { "section": "faq", "visible": true }, { "section": "contact", "visible": true } ], "featuredProductIds": [], "about": "", "deliveryPromise": "", "faq": [], "phone": "", "email": "", "address": "", "openingHours": "", "socials": {} }, "commerce": { "askForEmpties": true, "collection": { "enabled": false, "address": "", "notes": "" }, "tradeEnquiries": false, "offerPhoneOrders": true, "ageCheck": false, "whenLow": "sell", "whenOut": "stop", "termsUrl": null }, "seo": { "title": "", "description": "", "imageKey": null } }, "domains": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "host": "shop.northgategas.co.uk", "kind": "bottle", "records": [ { "type": "CNAME" } ] } ]}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}The plan does not include a shop
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Another shop has that address, or the shop is not switched on
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}