> For the complete documentation index, see [llms.txt](https://drophub.gitbook.io/drophub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://drophub.gitbook.io/drophub-docs/simulated-delivery-sandbox.md).

# 🧪 Simulated Delivery (Sandbox)

When using a sandbox API key, **DropHub automatically simulates the full delivery process** — no configuration needed. This allows you to test end-to-end order flow including real-time tracking and all related webhooks.

***

#### ✅ How It Works

Once you create an order in sandbox mode:

1. The system automatically assigns a **dummy driver**
2. A background simulator starts moving the driver
3. All related webhook events are sent automatically as if the delivery is happening in real life
4. The order progresses through all stages:
   * `order_assigned_to_driver`
   * `order_accepted`
   * `driver_picked_up_order`
   * `driver_arrived_at_dropoff`
   * `order_delivered`

You can even **track the driver live** on the map — the simulation includes location updates just like real movement.

***

#### 🧠 You Don't Need to:

* Manually trigger simulation
* Call any simulation endpoint
* Configure anything in the dashboard

If your delivery client is in sandbox mode, **it just works**.

***

#### 📍 Real-Time Tracking

You can view the simulated driver on a map using:

```
GET /custom-integration/tracking/map/{integrationOrderId}?api_key=your_api_key
```

Embed it in a WebView, iframe, or browser to see the full delivery route unfold.

***

#### 📦 Example Flow

```bash
# 1. Check price
POST /custom-integration/check-price

# 2. Create order
POST /custom-integration/orders

# 3. Watch it move (real-time)
GET /custom-integration/tracking/map/{integrationOrderId}?api_key=your_api_key
```
