Skip to main content

Sandbox test orders

Use the Sandbox section in the API explorer to create scripted test orders on UAT without Lynq courier intake or live operations.

What you get​

  • Orders stored only in order-worker (is_test: true).
  • Lifecycle webhooks with livemode: false (safe for integration handlers).
  • Optional synthetic courier, placeholder proof URLs, and one tracking push (when your webhook subscribes to tracking.courier_locations).

Quick flow​

  1. Create sandbox test order — POST /orders/test-simulation with the same pickup/dropoff body as production create, plus:
    • scenario: delivered | cancelled_before_pickup | failed_at_pickup | returned
    • step_interval_sec: delay between auto steps (when sandbox_simulator runs on the server)
    • advance_first_step: true to fire the first webhook immediately
  2. Advance sandbox step — POST /orders/{order_id}/simulation/advance until the scenario completes (409 simulation_complete).

Register webhooks on UAT and point them at your endpoint (or a request bin) before advancing so you can inspect payloads.

Scenarios​

ScenarioTerminal statusTypical use
delivereddeliveredFull happy-path webhooks
cancelled_before_pickupcancelledCancel before pickup
failed_at_pickupfailedFailure at pickup
returnedreturnedPickup then return

Not the same as production orders​

Sandbox orders do not mirror into Lynq public.orders and do not assign real couriers. For end-to-end UAT with Lynq + proof links, use normal Create order on UAT with Calo (or your partner) credentials.

OpenAPI​

Sandbox operations are defined in order-worker and merged into partner-api.json under the sandbox tag. After order-worker API changes, update order-worker/docs/openapi/sandbox.openapi.json and run npm run merge-sandbox-spec in this repo (or npm run sync-spec after UAT deploy).