Skip to content

Sandbox

Sandbox controls

No real parcel will ever arrive for a test customer, so in the sandbox you play the warehouse. These three calls exist for test keys only; with a live key they answer 404.

POST /v1/sandbox/packages test keys only

A package arrives at the warehouse for one of your test customers, exactly as if staff had logged it.

FieldTypeMeaning
accounttext, requiredThe suite of one of your test customers.
origintext, requiredOrigin code from GET /v1/hubs.
tracking_numbertextThe carrier's number, 4 to 100 characters. Left out, one is made up (TEST + 12 digits). Use the number of a package you announced to see the match happen.
sendertextThe shop that sent it.
weight_kgnumberDefault 1.
length_cm, width_cm, height_cmnumberAll three or none.
itemslistThe contents, in the same shape as when announcing a package.
Request
curl -X POST https://api.wasil-iq.com/v1/sandbox/packages \
  -H "Authorization: Bearer $WASIL_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "UT1EX042",
    "origin": "ger",
    "tracking_number": "1Z999AA10123456784",
    "sender": "Zalando",
    "weight_kg": 2.5,
    "items": [
      { "description": "Running shoes", "quantity": 1, "declared_value": 80, "currency": "EUR" }
    ]
  }'
Answer
HTTP/1.1 201 Created
X-Wasil-Mode: sandbox

{
  "data": {
    "id": "WTgerT17CS1",
    "tracking_number": "1Z999AA10123456784",
    "partner_reference": "ORDER-4471",
    "account": "UT1EX042",
    "origin": { "code": "ger", "name": "Germany" },
    "status": "In Review",
    "track_status": "incoming",
    "arrived": "2026-10-04",
    "sender": "Zalando",
    "weight": { "value": 2.5, "unit": "kg" },
    "...": "the rest of the package object"
  }
}

The answer is an ordinary package object, and from here the package behaves like any other: it is in GET /v1/packages, and the package.created event (and package.matched, if you announced it) is sent to your test webhook. In the sandbox, weight and size are kept in kilograms and centimetres for every origin.

POST /v1/sandbox/packages/{lookup}/advance test keys only

Moves a test package along its journey. {lookup} is the package id or the tracking number.

Stepstatustrack_statusMeaningEvent
logged In Review incoming The package is at the origin warehouse. Where every test package starts. package.created
shipped on the way on the way It left for Iraq. package.shipped
arrived ready for delivery ready for delivery It is in Iraq, ready for pickup or delivery. package.status_changed
delivered delivered delivered The customer has it. package.delivered
  • Without a body the package takes the next step.
  • With to (shipped, arrived or delivered) it goes straight there; steps in between may be skipped.
  • A package never goes back. Asking for an earlier step, or advancing a delivered package, answers 409 invalid_step.
  • Every change also sends package.status_changed, with the statuses before the change in previous.
Request
# the next step
curl -X POST https://api.wasil-iq.com/v1/sandbox/packages/WTgerT17CS1/advance \
  -H "Authorization: Bearer $WASIL_TEST_KEY"

# or straight to a later one
curl -X POST https://api.wasil-iq.com/v1/sandbox/packages/WTgerT17CS1/advance \
  -H "Authorization: Bearer $WASIL_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "delivered"}'

The answer is the package object with its new statuses.

POST /v1/sandbox/reset test keys only

Empties your sandbox: test customers, test packages, announcements and webhook events are removed. Your test keys, your test webhook address and its secret stay. The answer says how many of each were removed.

Request
curl -X POST https://api.wasil-iq.com/v1/sandbox/reset \
  -H "Authorization: Bearer $WASIL_TEST_KEY"
Answer
{
  "data": { "customers": 3, "events": 21, "expected_packages": 2, "packages": 5 }
}

The same, by clicking

The portal's Account → Sandbox page has a button for each of these, plus "Create sample data", which makes one customer and three packages at different steps.