Skip to content

Customers and packages

Customers

Create Wasil customers from your own platform. Each one is a full Wasil customer with a suite, the address they ship their purchases to.

Creating a customer is real: it opens a Wasil account and a US shipping address for that person. Create customers only for real people who asked for it, never for tests. Ask your Wasil contact for a test arrangement.

POST /v1/customers write module
FieldTypeMeaning
nametext, requiredThe customer's full name, 2 to 120 characters.
phonetext, requiredAn Iraqi mobile number. +9647701234567, 9647701234567 and 07701234567 are all accepted and mean the same number.
emailtextOptional. Must not be in use by another Wasil customer.
city_idnumber, requiredThe customer's city, from GET /v1/cities.
addresstextStreet address for home delivery, up to 255 characters.
passwordtextOptional, at least 8 characters: lets the customer sign in to the Wasil app with their phone. Without it a random password is set, and the customer sets their own through the app's password reset.
Request
curl -X POST https://api.wasil-iq.com/v1/customers \
  -H "Authorization: Bearer $WASIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sara Ahmed",
    "phone": "+9647701234567",
    "email": "[email protected]",
    "city_id": 1,
    "address": "Street 40, Ankawa"
  }'
Answer
HTTP/1.1 201 Created

{
  "data": {
    "suite": "UM1EX042",
    "name": "Sara Ahmed",
    "phone": "9647701234567",
    "email": "[email protected]",
    "city": { "id": 1, "name": "Erbil" },
    "address": "Street 40, Ankawa",
    "origin": "created",
    "myus_status": "processing",
    "created_at": "2026-10-03T14:05:00+03:00"
  }
}

The suite

The answer's suite is what the customer puts in the shipping address when they buy. Customers you create get a suite in your own series: UM1, your two-letter partner code, three digits. See Suites and package ids.

The US address

myus_status follows the opening of the customer's US address, which takes a few seconds after the answer:

  • processing: being opened. The suite is already final and can be shown to the customer.
  • completed: ready. The customer.myus_ready event is sent.
  • failed: it could not be opened. The customer exists and every other origin works; Wasil staff retry the US address.
  • pending: not started (linked accounts created long ago may show this).

When the customer already exists

A phone can belong to one customer. If the phone is already one of your customers, you get the suite back and can carry on with it. If it belongs to a Wasil customer who is not yours, you get the same code without a suite; ask Wasil to link that account to you.

Answer
HTTP/1.1 409 Conflict

{
  "error": {
    "code": "customer_exists",
    "message": "This phone already belongs to one of your customers.",
    "suite": "UM1EX042"
  }
}

409 busy means two of your requests tried to create a customer at the same instant; send the request again after a second.

GET /v1/customers write module

All your accounts, linked and created, in the order they became yours. Takes page and per_page; answers a list of customer objects with meta.

GET /v1/customers/{suite} write module

One customer by suite. A suite that is not yours answers 404.

Request
curl https://api.wasil-iq.com/v1/customers/UM1EX042 \
  -H "Authorization: Bearer $WASIL_KEY"

The customer object

FieldTypeMeaning
suitetextThe customer's suite. The id you use for this customer everywhere in the API.
nametextFull name.
phonetextMobile number as Wasil stores it (9647…).
emailtext or nullEmail address.
cityobject or nullid and name.
addresstext or nullStreet address.
origintextcreated (by you) or linked (by Wasil).
myus_statustextState of the US address, see above.
created_atmomentWhen the customer was created.