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, and 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. Products are added to the 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. If nothing from the order can be found it returns an error. Calling it again adds the products again. Nothing is bought or charged until the customer pays on teas.co.uk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| only_ids | No | Optional: only these product ids from that order. | |
| order_number | Yes | The earlier order number. | |
| idempotency_key | No | Optional. A unique key for this change (8 to 128 letters, digits or . _ : -). Sending the same key again within 24 hours returns the first answer instead of making the change twice. |
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 |