Accept or dismiss a suggestion
const url = 'https://example.com/products/review/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/decision';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"decision":"accept","kind":"cylinder","gasTypeName":"example","gasTypeId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","brand":"example"}'};
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/products/review/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/decision \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "decision": "accept", "kind": "cylinder", "gasTypeName": "example", "gasTypeId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "brand": "example" }'Accepting puts the product under the gas type named, creating it if the business has no such gas type, writes the size where the product had none, and turns a deposit or rent suggestion into that charge. Any field sent with the decision replaces what was suggested, so a reviewer can correct and accept in one go. Dismissing leaves the product as it is and stops it being suggested again. Either way it is recorded who said so.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”object
A cylinder of gas, a deposit or rent on cylinders, an accessory such as a regulator, the delivery charge, or nothing Bottle could tell.
UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”The product as it now stands
object
object
UUID v7
Pence, exactly as entered. Whether VAT is in this figure is what priceIncludesVat says; the other reading is given beside it for display.
Whether unitPrice includes VAT. False: VAT goes on top when the product is sold. True: unitPrice is the shelf price, and the VAT is worked back out of it on each line.
UnitPrice without VAT, in pence, for display. The same as unitPrice when it excludes VAT or the business is not registered; otherwise derived and rounded. Do not multiply it: amounts are worked out from unitPrice.
UnitPrice with VAT, in pence, for display. The same as unitPrice when it includes VAT or the business is not registered; otherwise derived and rounded.
VAT in basis points: 2000 is 20%, 500 is 5%, 0 is zero rated.
UUID v7
UUID v7
What the product is. The one set on it, or when none has been, read from it: a charge makes it a deposit or hire, a gas type a cylinder, anything else other.
Whether kind was set rather than read from the product.
What the shop says about it, plain text with line breaks.
On the business’s own shop. Shown there only once the shop is switched on. Never true on an archived product.
On a deposit: what comes back when a cylinder is returned. Null follows the business’s own setting (invoice settings).
object
Which hire a returned cylinder is measured from. Null is latest.
What a trade customer pays, on the shop and on office orders, when no rate has been agreed with them, pence as typed. Null: the list price. A customer’s agreed rate still comes first, and price rules for trade work off this.
What one costs the business, pence without VAT. Optional; read by cost-plus price rules. Never shown to customers.
How many are on the shelf, for things sold on the shop that are not cylinders. Null is not counted: always available. Set and moved with POST /products/{id}/stock, never here. May be below nought when the product keeps selling once none are left.
At or under this count the office is told, and the shop may say low stock. Null is never.
What the shop does when none are left, for this product. Null follows the shop’s own rule (Settings, Shop). stop: off sale. continue: keeps selling, shown as ships when back in stock.
object
UUID v7
What the picture shows, for screen readers and search.
Of the original, in pixels.
Fits inside 200 pixels. WebP.
Fits inside 600 pixels. WebP.
Fits inside 1600 pixels. WebP.
object
object
UUID v7
UUID v7
Example
{ "status": "pending", "product": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "19kg propane", "shortCode": "19", "sku": "PROP-19", "unitPrice": 5400, "unitPriceExVat": 5400, "unitPriceIncVat": 6480, "vatRate": 2000, "charge": "deposit", "chargePeriod": "once", "chargeForProductId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "gasTypeId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "weightKg": 38.5, "volumeLitres": 60, "kind": "cylinder", "brand": "Flogas", "refundRule": "full", "refundCountsFrom": "latest", "stockOnHand": 12, "stockLowAt": 3, "whenOut": "stop", "images": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "categoryIds": [ "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" ], "links": [ { "source": "woocommerce", "externalId": "1043" } ] }, "gasType": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "Flogas Propane", "supplierId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "supplier": "Flogas", "colour": "#D7263D" }}A deposit or rent with no gas type to put it on
object
Example
{ "error": "not_found", "message": "Customer not found"}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"}Not found
object
Example
{ "error": "not_found", "message": "Customer not found"}That gas type already has this charge
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}