> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.com/llms.txt
> Use this file to discover all available pages before exploring further.

# order.updated

> A placed order moved to a new delivery stage: confirmed by the store, a courier or carrier on the way, arriving, delivered or canceled. Retail orders carry their packages and tracking numbers.

A placed order moved to a new delivery stage. Show your customer where their order is the moment it changes, without asking Agentcard.

## Merchants that send this event

| Merchant | What sends `order.updated` | How Agentcard follows the order |
| - | - | - |
| DoorDash | Every stage, from `confirmed` to `delivered`. | Reads the order about once a minute, for up to six hours after it was placed. |
| Retail (`merchant: "retail"`, such as Amazon and Walmart) | Every stage change, `picked_up`, `arriving` and `delivered`, with the packages and their tracking numbers. A cancellation by the store in the first 48 hours after placement. | Reads the order about every 45 minutes, for up to 21 days after it was placed. |

Agentcard sends one `order.updated` for every stage it has not reported yet. An order at any other merchant sends no `order.updated`.

```json theme={null}
{
  "id": "evt_4c3b2a1f0e9d",
  "type": "order.updated",
  "created": 1791248034,
  "livemode": true,
  "data": {
    "order_id": "9632435a-4d4d-48bb-869d-5d0e3bd1410b",
    "merchant": "doordash",
    "merchant_name": "DoorDash",
    "store_name": "7-Eleven",
    "conversation_id": "conv_9a8b7c6d5e4f3a2b1c0d9e8f",
    "thread_id": "group-chat-7",
    "user_id": "usr_8f3k2m",
    "line_items": [
      {
        "product_id": "29481754",
        "name": "Gatorade Cool Blue, 28 oz",
        "quantity": 2,
        "line_total_cents": 698,
        "currency": "usd",
        "variant": null,
        "options": [],
        "url": null
      }
    ],
    "status": "arriving",
    "previous_status": "picked_up",
    "status_title": "Your Dasher is nearby",
    "status_detail": null,
    "estimated_arrival": {
      "earliest": "2026-10-06T00:53:20.000Z",
      "latest": "2026-10-06T00:55:20.000Z"
    },
    "picked_up_at": "2026-10-06T00:50:05.447Z",
    "delivered_at": null,
    "canceled_reason": null,
    "canceled_code": null,
    "retailer_order_id": null,
    "delivery_window": null,
    "shipments": [],
    "updated_at": "2026-10-06T00:53:54.000Z"
  }
}
```

## Follow an order's stages

`status` carries the stage in Agentcard's words, the same for every merchant. A DoorDash delivery walks the stages in this order:

| `status` | What happened |
| - | - |
| `confirmed` | The store accepted the order. |
| `courier_assigned` | A courier accepted the delivery and is heading to the store. |
| `courier_at_store` | The courier is at the store waiting for the order. |
| `picked_up` | The courier has the order and is on the way. `picked_up_at` is set. |
| `arriving` | The courier is close to the delivery address. |
| `delivered` | The order reached the customer. `delivered_at` is set, and Agentcard stops following the order. |
| `canceled` | The order will not arrive. `canceled_reason` carries the merchant's reason in words you can show the customer, `canceled_code` the merchant's own code, and Agentcard stops following the order. |

A pickup order reports `ready_for_pickup` in place of the courier stages. An order can skip a stage that happens between two reads: a courier who picks up and arrives within the same minute goes from `courier_at_store` to `arriving`, and `previous_status` names the stage you last heard.

`order.placed` already covers the moment an order is placed, so no `order.updated` reports `placed`.

## Follow a retail order's packages

A retail order ships by carrier. [`order.confirmed`](https://docs.agentcard.com/webhooks/orders/order-confirmed) tells you the store accepted it, and `order.updated` reports each stage after that:

| `status` | What happened |
| - | - |
| `picked_up` | Every package of the order has a carrier tracking number. |
| `arriving` | Every package is out for delivery, or waiting at a pickup point. |
| `delivered` | Every package was delivered, and Agentcard stops following the order. |
| `canceled` | The store canceled the order. See [Tell the shopper a retail order was canceled](#tell-the-shopper-a-retail-order-was-canceled). |

Until its packages have tracking numbers, the order stays `placed` and sends no `order.updated`. A store can split one order into several packages. The order is then as far along as its slowest package: one box delivered and one in transit reads `picked_up`. `shipments` lists every package. A package can join the list while the stage stays the same, which sends no event, so [read the order](https://docs.agentcard.com/commerce-sdk/guides/approving-a-purchase.md#read-where-an-order-is) for the latest list.

| Field | What it carries |
| - | - |
| `retailer_order_id` | The store's own order number, as on its confirmation. |
| `delivery_window` | The delivery window the store quoted, in its own words. |
| `shipments` | One entry per package with a tracking number, or an empty list when none has one yet. Each package has `carrier`, `tracking_number`, `tracking_url`, `status` and `estimated_delivery`, and any of them is `null` when the carrier has not reported it. |
| `shipments[].status` | The carrier's word for where the package is, such as `in_transit`, `out_for_delivery` or `delivered`. |
| `shipments[].estimated_delivery` | The delivery date the carrier estimates, as it sent it, such as `2026-09-08`. |

A retail `order.updated` carries no `status_title`, `estimated_arrival`, `picked_up_at` or `delivered_at`: each reads `null`. Show the carrier's estimate from `shipments` instead.

```json theme={null}
{
  "id": "evt_2d1c0b9a8f7e",
  "type": "order.updated",
  "created": 1757440800,
  "livemode": true,
  "data": {
    "order_id": "3f9a8c1b-7d2e-4c5a-9b1f-2e8d4a6c0b17",
    "merchant": "retail",
    "merchant_name": "Amazon, Walmart, Target & Best Buy",
    "store_name": "amazon",
    "conversation_id": "conv_9a8b7c6d5e4f3a2b1c0d9e8f",
    "thread_id": "group-chat-7",
    "user_id": "usr_8f3k2m",
    "line_items": [
      {
        "product_id": "https://www.amazon.com/dp/B0BQ3RF5ZK",
        "name": "Cafe Mesa de los Santos Colombian Ground Coffee, 16 oz",
        "quantity": 1,
        "line_total_cents": 1899,
        "currency": "usd",
        "variant": null,
        "options": [],
        "url": "https://www.amazon.com/dp/B0BQ3RF5ZK"
      }
    ],
    "status": "picked_up",
    "previous_status": "confirmed",
    "status_title": null,
    "status_detail": null,
    "estimated_arrival": null,
    "picked_up_at": null,
    "delivered_at": null,
    "canceled_reason": null,
    "canceled_code": null,
    "retailer_order_id": "112-1234567-1234567",
    "delivery_window": "Sat, Sep 6 - Tue, Sep 9",
    "shipments": [
      {
        "carrier": "UPS",
        "tracking_number": "1Z999AA10123456784",
        "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
        "status": "in_transit",
        "estimated_delivery": "2026-09-08"
      }
    ],
    "updated_at": "2026-09-02T18:00:00.000Z"
  }
}
```

Name the store from `store_name` when it is set: a retail order's `merchant_name` lists every store Agentcard buys from, and `store_name` names the one this order went to.

## Tell the shopper a retail order was canceled

A retail store can cancel an order after it was placed. When it does in the first 48 hours, Agentcard sends `order.updated` with `status: "canceled"`, gives back what the order charged, and stops following the order. `previous_status` is the last stage you heard, such as `confirmed` when the store had accepted the order or `placed` when it had not. `canceled_reason` carries the store's reason in words you can show the shopper, such as "the item is out of stock", `canceled_code` the store's own code for it, such as `product_out_of_stock`, and `status_detail` the store's message, when it gives them. Show `canceled_reason`, never `canceled_code`.

```json theme={null}
{
  "id": "evt_7a6b5c4d3e2f",
  "type": "order.updated",
  "created": 1757350800,
  "livemode": true,
  "data": {
    "order_id": "3f9a8c1b-7d2e-4c5a-9b1f-2e8d4a6c0b17",
    "merchant": "retail",
    "merchant_name": "Amazon, Walmart, Target & Best Buy",
    "store_name": "amazon",
    "conversation_id": "conv_9a8b7c6d5e4f3a2b1c0d9e8f",
    "thread_id": "group-chat-7",
    "user_id": "usr_8f3k2m",
    "line_items": [
      {
        "product_id": "https://www.amazon.com/dp/B0BQ3RF5ZK",
        "name": "Cafe Mesa de los Santos Colombian Ground Coffee, 16 oz",
        "quantity": 1,
        "line_total_cents": 1899,
        "currency": "usd",
        "variant": null,
        "options": [],
        "url": "https://www.amazon.com/dp/B0BQ3RF5ZK"
      }
    ],
    "status": "canceled",
    "previous_status": "confirmed",
    "status_title": null,
    "status_detail": "One of the products selected is unavailable.",
    "estimated_arrival": null,
    "picked_up_at": null,
    "delivered_at": null,
    "canceled_reason": "the item is no longer available",
    "canceled_code": "product_unavailable",
    "retailer_order_id": "112-1234567-1234567",
    "delivery_window": "Sat, Sep 6 - Tue, Sep 9",
    "shipments": [],
    "updated_at": "2026-09-02T09:15:00.000Z"
  }
}
```

## Name what the order holds

`line_items` lists the products in the order, one entry per cart line, as the cart was when Agentcard placed it. Head each update with them, such as "2 × Gatorade Cool Blue is almost there", without keeping the cart yourself. Every `order.updated` for an order carries the same list, and so do [`order.placed`](https://docs.agentcard.com/webhooks/orders/order-placed) and [`order.confirmed`](https://docs.agentcard.com/webhooks/orders/order-confirmed).

| Field | What it carries |
| - | - |
| `product_id` | The store's own id for the product. A retail order, such as an Amazon order, uses the product's page address. |
| `name` | The product's name at the store. |
| `quantity` | How many the order holds. |
| `line_total_cents` | What the line cost at placement, add-ons included, times its quantity. It is the line's own cost, before delivery, fees and tax. A line reads `null` when the store gave no price for it, or when its choices cost extra and the store did not price the line as a whole, such as two burritos built two different ways. |
| `currency` | The lower-case currency the line was priced in, such as `cad` for a cart priced in Canadian dollars. |
| `variant` | The variant by the store's name, such as `Navy / M`, or `null`. |
| `options` | The choices made on the line, by the store's names, such as `["Carnitas", "Extra Guacamole"]`. |
| `url` | The product's page at the store, or `null` when the store gives none. |

`line_items` lists what was ordered, and it does not change after the order is placed. When a store accepts only part of a cart, `line_items` names only the products it accepted, and the rest go back to the shopper's cart. An order placed before Agentcard kept its lines carries an empty list.

## Show the merchant's own words

`status_title` and `status_detail` carry the merchant's own line for the stage, such as `Your Dasher is nearby`, ready to show as is. Either one is `null` when the merchant shows none.

`store_name` names the restaurant, shop or retailer the order comes from, such as `Mendocino Farms`, so you can head your order tracker with it. It is `null` when the merchant names none.

`estimated_arrival` is the window the merchant quotes at the time of the change, or `null` when it quotes none. The window can move between stages without a new event.

`retailer_order_id` and `delivery_window` are `null`, and `shipments` is an empty list, for an order the merchant delivers itself, such as a DoorDash order.

## Post each update in its chat

Post the update into the chat `thread_id` names. `thread_id` is your own id for the chat the purchase belongs to: the [`threadId`](https://docs.agentcard.com/api-reference/commerce-sdk/buy-tool#keep-a-purchase-per-chat) you built the buy tool with, or the `thread_id` of your `agentcard.buy` request. A purchase made under no thread carries `thread_id: null`.

## Handle a repeated event

Agentcard sends each stage of an order under one event `id`. A delivery that failed and is retried arrives with the same `id`, so dedupe on `id`.

## Know when tracking stops

Agentcard stops following an order once it is delivered or canceled, once the merchant no longer lists the order, or when its window ends: six hours after placement for a DoorDash order, 21 days for a retail order. [`GET /buy/orders/{order_id}`](https://docs.agentcard.com/commerce-sdk/guides/approving-a-purchase#read-where-an-order-is) still answers with the last stage Agentcard read.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.