Skip to content

Price a basket

POST
/storefront/sites/{host}/quote
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.

host
required
string
Example
northgate.shop.getbottle.app
preview
string
<= 2000 characters
Media typeapplication/json
object
lines
required
Array<object>
>= 1 items <= 50 items
object
productId
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
quantity
required
integer
>= 1 <= 50
hasEmpty
boolean
fulfilment
string
default: delivery
Allowed values: delivery collection
postcode
string
<= 10 characters
deliveryOptionId

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f
customerId

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

The basket, priced

Media typeapplication/json
object
lines
required
Array<object>
object
kind
required
string
Allowed values: product deposit delivery
productId
required

UUID v7

string | null format: uuid
name
required
string
quantity
required
integer
unitPence
required
integer
totalPence
required
integer
unitPenceExVat
integer
unitPenceIncVat
integer
forProductIds
Array<string>
parts
Array<object>
object
quantity
required
integer
unitPence
required
integer
unitPenceExVat
required
integer
totalPence
required
integer
netPence
required
integer
vatPence
required
integer
grossPence
required
integer
problems
required
Array<object>
object
code
required
string
Allowed values: out_of_stock not_for_sale not_deliverable below_minimum no_postcode payments_off
productId
required

UUID v7

string | null format: uuid
message
required
string
delivery
required
object
deliverable
required
boolean
area
required
string | null
choices
required
Array<object>
object
deliveryOptionId
required

UUID v7

string format: uuid
name
required
string
chargePence
required
integer
chargePenceExVat
integer
earliest
required
string format: date
latest
required
string format: date
orderBy
required
string | null format: date-time
daysOfWeek
Array<integer> | null
freeOverPence
required
integer | null
minimumOrderPence
required
integer | null
collection
required
boolean
priceDisplay
string
Allowed values: inc ex
buyer
object
customerId
required

UUID v7

string format: uuid
name
required
string
trade
required
boolean
canPayOnAccount
required
boolean
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=

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}

Too many requests from one address

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}