Skip to content

Customers and packages

Announcing packages

Tell Wasil about a package while it is still on its way to the warehouse. When it arrives it is tied to your order automatically.

How it works

  1. Your customer buys something and has it sent to their Wasil suite. You know the carrier's tracking number.
  2. You announce it: account, origin, tracking number, your order reference, the contents.
  3. When the warehouse logs a package with that tracking number for that account, Wasil matches it: the package carries your partner_reference, the announcement shows the package, and the package.matched event is sent.

Tracking numbers are compared without regard to upper and lower case, spaces and dashes. Packages you did not announce still appear in GET /v1/packages; announcing only adds your reference and the contents.

POST /v1/packages write module
FieldTypeMeaning
accounttext, requiredThe suite of one of your accounts.
origintext, requiredOrigin code from GET /v1/hubs: the warehouse it is being sent to.
tracking_numbertext, requiredThe carrier's tracking number, 4 to 100 characters.
carriertextThe carrier's name, for people reading the record.
partner_referencetextYour own id for this order, up to 64 characters. It is copied onto the package when it arrives.
itemslistThe contents, up to 50 lines: description (required), quantity, declared_value, currency (3 letters).
declared_value_total, currencynumber, textThe value of the whole package.
Request
curl -X POST https://api.wasil-iq.com/v1/packages \
  -H "Authorization: Bearer $WASIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "UM1EX042",
    "origin": "ger",
    "tracking_number": "1Z999AA10123456784",
    "carrier": "UPS",
    "partner_reference": "ORDER-4471",
    "items": [
      { "description": "Running shoes", "quantity": 1, "declared_value": 80, "currency": "EUR" }
    ],
    "declared_value_total": 80,
    "currency": "EUR"
  }'
Answer
HTTP/1.1 201 Created

{
  "data": {
    "id": 512,
    "account": "UM1EX042",
    "origin": { "code": "ger", "name": "Germany" },
    "tracking_number": "1Z999AA10123456784",
    "carrier": "UPS",
    "partner_reference": "ORDER-4471",
    "items": [
      { "description": "Running shoes", "quantity": 1, "declared_value": 80, "currency": "EUR" }
    ],
    "declared_value_total": "80.00",
    "currency": "EUR",
    "status": "expected",
    "package": null,
    "created_at": "2026-10-03T14:10:00+03:00",
    "matched_at": null,
    "cancelled_at": null
  }
}

Announcing a tracking number that is already announced and still expected for that account answers 409 expected_exists with the id of the first announcement.

GET /v1/expected-packages write module

Your announcements, newest first. Filters: status (expected, matched, cancelled) and account (a suite); plus page and per_page.

GET /v1/expected-packages/{id} write module

One announcement. Once matched, package holds the package it became:

Part of the answer after the match
{
  "status": "matched",
  "package": {
    "id": "WPger10005254CS3",
    "tracking_number": "1Z999AA10123456784",
    "partner_reference": "ORDER-4471",
    "status": "In Review",
    "track_status": "incoming"
  },
  "matched_at": "2026-10-09T11:42:07+03:00"
}
DELETE /v1/expected-packages/{id} write module

Cancels an announcement that is still expected (the order was cancelled, the number was wrong). The answer is the announcement with status: "cancelled". One that is already matched or cancelled answers 409 not_cancellable.

Request
curl -X DELETE https://api.wasil-iq.com/v1/expected-packages/512 \
  -H "Authorization: Bearer $WASIL_KEY"

States of an announcement

StatusMeaning
expectedAnnounced, not arrived yet.
matchedArrived and tied to a package. Follow it from here as a package.
cancelledCancelled by you or by Wasil staff. It will not match.

If the carrier relabels a parcel and the number changes, the automatic match cannot happen; Wasil staff can match it by hand, and you get the same matched state.