AntivioesPortal

Sandbox & simulator

Build and test your integration without drivers, recipients or money. Use a test token and every shipment you create is a sandbox shipment that you move along yourself.

Try it in four steps

  1. Make a test token (atk_test_…) in Settings → Developers. Test tokens only see and create sandbox shipments, even in a company that is already live.
  2. Create and confirm a shipment as in the quickstart. Drafts are not simulated: confirming prices the shipment and gives it its tracking number.
  3. Move it one step at a time with the simulator (below). Each step sends the same events and webhooks a real delivery would.
  4. Check what your system did: your webhook endpoint got "livemode": false messages, and GET /v1/shipments/{id} shows the status and history.

Simulator

POST /v1/sandbox/shipments/{id}/advance moves a sandbox shipment to the status in to, through the same state machine real deliveries use. The answer is the shipment.

curl -s "$ANTIVIO/v1/sandbox/shipments/$SHIPMENT/advance" \
  -H "Authorization: Bearer $ANTIVIO_TOKEN" -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" -d '{"to": "picked_up"}'
Where the simulator can move a shipment

Delivery

  1. ready
  2. pickup_assigned
  3. picked_up
  4. at_hubhub service levels
  5. out_for_delivery
  6. delivered

Failed attempt

  1. out_for_delivery
  2. attempt_failed
  3. out_for_deliveryattempts left

  1. attempt_failed
  2. return_in_transitattempts used up
  3. returned

Problems

  1. …any open status
  2. exception
  3. closed_exception

Every move the rules allow:

Fromto
readypickup_assigned, at_hub (customer drop-off, hub service levels)
pickup_assignedpicked_up
picked_upout_for_delivery (direct service levels), at_hub (hub service levels)
at_hubout_for_delivery, return_in_transit (attempts used up)
out_for_deliverydelivered, attempt_failed
attempt_failedout_for_delivery (attempts left), at_hub, return_in_transit (attempts used up)
return_in_transitreturned
any open statusexception
exceptionclosed_exception

What is real in the sandbox