Price a basket
quote_cartUse this to price products for the person before anything goes in a basket. Pass up to 20 items (id from find_products and quantity) and the delivery country. It returns live prices including VAT, every delivery option teas.co.uk offers for that country and parcel, the total with the cheapest option, how much more to spend for free UK delivery, stock, and a basket link the person can open. Nothing is stored and no basket changes. For a basket the person keeps, call add_to_basket; to hand over checkout, call checkout_link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Products and quantities to price, 1 to 20 lines. The same id twice is added together. | |
| country | No | Delivery country as a two letter code, for example GB, IE or FR. Leave out for the UK. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| lines | Yes | ||
| total | No | Subtotal plus the cheapest delivery option. | |
| country | Yes | The two letter delivery country priced. | |
| delivers | Yes | False when teas.co.uk does not deliver to that country. | |
| subtotal | Yes | ||
| not_found | Yes | Ids that matched no product on sale. | |
| total_text | No | ||
| basket_link | No | A link for the person: it opens a confirmation page and adds these items only when they press Add to basket. | |
| subtotal_text | Yes | ||
| delivery_options | Yes | ||
| spend_more_for_free | No | How much more to spend for free UK delivery, when it applies. | |
| free_delivery_over_text | No |