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
- Your customer buys something and has it sent to their Wasil suite. You know the carrier's tracking number.
- You announce it: account, origin, tracking number, your order reference, the contents.
- 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 thepackage.matchedevent 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.
/v1/packages
write module
| Field | Type | Meaning |
|---|---|---|
account | text, required | The suite of one of your accounts. |
origin | text, required | Origin code from GET /v1/hubs: the warehouse it is being sent to. |
tracking_number | text, required | The carrier's tracking number, 4 to 100 characters. |
carrier | text | The carrier's name, for people reading the record. |
partner_reference | text | Your own id for this order, up to 64 characters. It is copied onto the package when it arrives. |
items | list | The contents, up to 50 lines: description (required), quantity, declared_value, currency (3 letters). |
declared_value_total, currency | number, text | The value of the whole package. |
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"
}'
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.
/v1/expected-packages
write module
Your announcements, newest first. Filters: status (expected, matched, cancelled) and account (a suite); plus page and per_page.
/v1/expected-packages/{id}
write module
One announcement. Once matched, package holds the package it became:
{
"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"
}
/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.
curl -X DELETE https://api.wasil-iq.com/v1/expected-packages/512 \
-H "Authorization: Bearer $WASIL_KEY"
States of an announcement
| Status | Meaning |
|---|---|
expected | Announced, not arrived yet. |
matched | Arrived and tied to a package. Follow it from here as a package. |
cancelled | Cancelled 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.