Price a basket
const url = 'https://example.com/storefront/sites/northgate.shop.getbottle.app/quote';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"lines":[{"productId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","quantity":1,"hasEmpty":true}],"fulfilment":"delivery","postcode":"example","deliveryOptionId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","customerId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"}'};
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/sites/northgate.shop.getbottle.app/quote \ --header 'Content-Type: application/json' \ --data '{ "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "quantity": 1, "hasEmpty": true } ], "fulfilment": "delivery", "postcode": "example", "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }'Deliberately unauthenticated. The basket priced from the shop’s own prices, line by line: products at the price a shopper pays (VAT in when the business charges it), a deposit for each cylinder with no empty to swap, delivery for the postcode (free over the area’s figure), and the totals. problems says why it cannot be bought as it is (out of stock, not for sale, not delivered to, under the minimum, no postcode, payments not set up); the totals stand anyway. Prices sent by the browser are never read. For collection, delivery carries the collection days.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
northgate.shop.getbottle.appQuery Parameters
Section titled “Query Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”The basket, priced
object
object
UUID v7
object
object
UUID v7
object
object
UUID v7
object
UUID v7
Example
{ "lines": [ { "kind": "product", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "forProductIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ] } ], "problems": [ { "code": "out_of_stock", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "delivery": { "choices": [ { "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "Next day" } ] }, "priceDisplay": "inc", "buyer": { "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }}Not a shop, or not open. No body.
A shop not selling now (shop_closed); its preview works with ?preview=
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Too many requests from one address
object
Example
{ "error": "not_found", "message": "Customer not found"}