Skip to content

Sandbox

The sandbox runs at https://sandbox-api.easypick.cz/v1 with its own database, tenant administration, API keys, and webhooks. It has no access to production boxes or shipments.

Like production, the sandbox keeps shipment status separate from physical compartment_state. A simulated event can change one or both values; removed and door_available are not shipment statuses.

POST /sandbox/shipments/{shipment_id}/events
Content-Type: application/json
{"event":"loaded"}
Event Required starting state Result
loaded status=reserved, compartment_state=reserved Confirms virtual loading and sets status=loaded, compartment_state=occupied.
picked_up status=loaded, compartment_state=occupied Confirms virtual pickup and sets status=picked_up, compartment_state=cooldown.
door_available compartment_state=cooldown Ends cooldown and sets compartment_state=available; the shipment status does not change.
expired status=reserved or loaded Sets status=expired; an empty reservation is released immediately, while a loaded compartment moves to compartment_state=awaiting_removal.
fault status=reserved or loaded Sets terminal status=fault; the assigned compartment moves to compartment_state=awaiting_removal as a safety measure.
removed status=cancelled, expired, or fault and compartment_state=awaiting_removal Confirms virtual removal without changing shipment status; door_available follows it.

An invalid transition returns 409 invalid_sandbox_transition without changing state.

  1. reserved → loaded → picked_up → door_available
  2. reserved → cancelled → door_available
  3. reserved → loaded → expired → removed → door_available
  4. reserved → loaded → fault → removed → door_available
  5. Repeated POST /shipments with the same external_order_id
  6. POST /shipments/{id}/retry after releasing the original faulted shipment
  7. A webhook endpoint temporarily returning 500, followed by a successful retry

door_available is the canonical event for every actual compartment release, including immediate release of a reservation that was never loaded and release after removed. Public GET responses and webhook payloads include the current compartment_state.