> Documentation index: https://www.xekta.com/llms.txt

# Shipping

> Some shops ship instead of, or as well as, pickup. How to recognise them and what the assistant does differently.

Pickup is the default. A shop that ships says so on its offers, and such offers can be found at any distance.

## Recognise a shop that ships

| `fulfillment` on an offer | Meaning |
| - | - |
| `shipping` | The shop ships. There is no pickup. |
| `pickup_or_shipping` | The buyer can choose. |

To search only shops that ship, pass `filters.merchant_kind: "online_store"` to [`product_search`](https://www.xekta.com/docs/tools/product-search.md).

> [!WARNING]
> Never promise delivery or a courier for an offer that is not marked this way.

## What the assistant does

1. Build the cart as usual.
2. Ask the buyer for a delivery address, or whether to use their saved home address.
3. Call [`cart_set_shipping`](https://www.xekta.com/docs/tools/cart-set-shipping.md). It returns the shipping options for that address with their fees and latest delivery dates, and the items, shipping, tax and total.
4. Tell the buyer the shipping fee and the latest delivery date.
5. Ask for approval and place the order as usual. Do not give a pickup code for a shipped order.

## Shipping options

| `option_code` | Meaning |
| - | - |
| `standard` | Standard shipping. |
| `express` | Faster shipping. |
| `same_day` | Same-day, where the shop offers it. |
| `pickup` | The buyer collects at the shop, where the shop allows it. No address needed. |

Left out, the cheapest option for the address is selected; the answer lists all of them.

## Addresses that are refused

PO boxes, military addresses, states the shop does not ship to, and addresses outside the US are refused, with the field to fix.

## Approval

Any change to the address, recipient or option clears the buyer's approval of the cart. Ask again.
