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

# Testing in the sandbox

> Simulate orders on any channel and every event around them, before you touch a live store.

The sandbox is a complete copy of the platform with sample stores, a sample catalog, and simulated channels. Your sandbox credentials work only there, and nothing in the sandbox reaches a real marketplace, customer, or courier.

## Simulate an order

```bash theme={null}
curl -X POST https://sandbox.api.lulacommerce.com/v1/sandbox/orders \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "store_id": "ext:0142",
    "channel": "ubereats",
    "fulfillment_type": "delivery",
    "items": [
      { "external_id": "KIT-1042", "quantity": 2, "modifier_option_external_ids": ["DIP-QUESO", "DIP-RANCH", "DIP-QUESO"] },
      { "external_id": "028400090858", "quantity": 1 }
    ]
  }'
```

The order is delivered to your webhooks and [order destinations](https://platform.lulacommerce.com/guides/order-destinations.md) and appears in the sandbox store app, exactly like a live order.

## Simulate what happens next

Drive the parts of the lifecycle that happen outside your systems:

```bash theme={null}
curl -X POST https://sandbox.api.lulacommerce.com/v1/sandbox/orders/ord_01J9ZR8M3T5X/simulate \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "event": "courier_arrived" }'
```

Events: `courier_assigned`, `courier_arrived`, `courier_picked_up`, `delivered`, `customer_cancelled`, `channel_adjustment`.

## Suggested test plan

1. Mark an item and a component unavailable; confirm `item.availability_changed` for every channel.
2. Create and lift a recall; confirm a quantity update cannot restore a recalled item.
3. Simulate one order per channel; confirm each reaches your kitchen system with the right modifiers and `payment.status: paid`.
4. Accept, mark ready, and simulate courier pickup; confirm `order.updated` at each step.
5. Simulate a customer cancellation and a channel adjustment.
6. Stop your webhook endpoint, simulate orders, then use replay to catch up.
7. Pull last week's reconciliation and set up a data feed to a test bucket.

## Catching up after downtime

Webhooks are retried for 24 hours. For anything longer, or to audit your systems against Lula, read the full event history with `GET /events?created_after=...`, or ask Lula to redeliver with `POST /webhooks/{endpoint_id}/replay`.


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