Buy again
reorderUse this when a signed in customer wants to buy again from an earlier teas.co.uk order. order_number comes from my_orders (only orders on the linked account are found); only_ids limits it to those product ids from that order, otherwise every product is added in its original quantity. Adds them to the customer's basket at today's prices, on top of anything already there; products that cannot be added now (no longer sold, out of stock, or over the 20 kg parcel limit) are listed in messages and skipped, and if nothing from the order (or from only_ids) can be found it returns an error. Calling it again adds them again. Nothing is bought or charged until the customer pays on teas.co.uk. To see earlier orders first use my_orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| only_ids | No | Optional: only these product ids from that order. | |
| order_number | Yes | The earlier order number. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| added | No | ||
| items | Yes | Number of items in the basket. | |
| lines | Yes | ||
| delivery | Yes | ||
| messages | Yes | Anything that could not be added or changed, in plain words. | |
| subtotal | No | Pounds including VAT, before delivery. | |
| basket_id | No | Present only when the host did not identify the user: pass it to later basket tools. | |
| from_order | No | ||
| subtotal_text | Yes |