Get every price a product has
const url = 'https://example.com/products/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/prices';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/products/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/prices \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>The Consumer price, the Trade price (null: trade pays the Consumer price), then one row per price list that is not archived, by name, with the list’s price (null: members pay the Trade price). Each row has its quantity breaks: from so many in one order, every one of them is that price. Who pays what: a customer’s own agreed price, then their price list’s price, then the Trade price for trade customers or the Consumer price for everyone else. Quantity breaks go with whichever price applies. A deposit or rent has the same table without quantity breaks (sending any is a 422): its Consumer and Trade amounts, and each price list’s amount, or notCharged for a list whose members do not pay it. Who pays a deposit or rent: a customer’s own agreed amount, then their price list’s say, then, where its chargeAudience includes them, the Trade amount for trade customers or the Consumer amount for everyone else; a customer it leaves out pays nothing. Where its cylinders also have the other charge, a list charges one or neither, never both: an amount for a list needs the other charge notCharged on that list (422 charges_both otherwise), and listChoice says what each list chose. A list that chose the other charge, or neither, is changed on the price list (PUT /rate-sets/{id}/cylinder-charges). Delivery has no price table (422).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”The price table
object
UUID v7
Who pays a deposit or rent where no price list or agreed amount says otherwise. both: Consumer and Trade customers (the default). consumer: everybody who is not a trade customer, signed in or not. trade: trade customers only. Meaningless on anything that is not a charge.
object
From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).
object
object
From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).
object
object
UUID v7
What a price list charges its members on one gas type (or size). usual: each member pays the deposit or rent they are set to, at the usual amount. deposit: the deposit and never rent. rent: the rent and never a deposit. none: neither.
From this many of the product in one order, every one of them is this unit price (“10 or more: £30.00 each”).
object
Example
{ "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "charge": "deposit", "chargeAudience": "both", "priceLists": [ { "rateSetId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "listChoice": "usual" } ]}Not signed in
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"}No such product
object
Example
{ "error": "not_found", "message": "Customer not found"}A delivery charge, which has no price table
object
Example
{ "error": "not_found", "message": "Customer not found"}