Documentation
All pages
.md
Built and tested. The public service opens with the platform launch; until then API keys are not issued to customers.

Orders API

Use this when your store (WooCommerce, Shopify, Salla, Zid, YouCan, a custom site) should send new orders to the platform so the customer can confirm, change or cancel on WhatsApp.

Create an order

POST https://app.easytawasul.com/api/v1/orders
{ "phone": "+201000000000", "order_id": "S-1042", "customer_name": "Mona", "total": 840, "currency": "EGP", "address": "12 Tahrir St, Cairo", "items": "2 x Shirt" }
FieldRequiredNotes
phoneyesCustomer phone with country code
order_idnoYour order number, up to 60 characters. Unique per workspace: sending the same one again returns 409 order.exists.
customer_namenoUp to 120 characters
totalnoNumber, 0 or more
currencyno3 letters. Default: the workspace currency
addressnoUp to 500 characters
itemsnoFree text summary, up to 2,000 characters

Response 201:

{ "id": "ord_17", "order_id": "S-1042", "status": "new", "customer_name": "Mona", "phone": "201000000000", "total_minor": 84000, "currency": "EGP", "confirmation_sent_at": null, "answered_at": null }

total_minor is the amount in the smallest unit (piasters).

Read an order

GET /v1/orders/ord_17

What happens next

The order appears in the dashboard (Orders). Ask the customer to confirm on WhatsApp either with one click in the dashboard or from your code:

POST /v1/orders/ord_17/confirmation

It sends the approved template you chose in Orders > Settings (variables: customer name, order number, total) and sets the status to awaiting_confirmation. Errors: 422 order.no_template (no template chosen or no connected number), 409 order.closed (cancelled, delivered or returned), 409 window_closed, 502 meta.*. The customer's reply is read by the platform:

Customer repliesOrder status
1, confirm, yes, ok (and Arabic equivalents)confirmed
2, changechange_requested
3, cancelcancel_requested

A cancel request is only flagged for your team. Nothing is cancelled automatically: that decision is yours. Every status change is sent to your webhook as order.updated, so your store can follow along.

Statuses: new, awaiting_confirmation, confirmed, change_requested, cancel_requested, cancelled, payment_pending, paid, payment_failed, preparing, awaiting_shipment, shipped, delivery_failed, delivered, return_requested, returning, returned, shipping_returned.

Abandoned carts

Send a cart a shopper left without ordering, and the platform can remind them on WhatsApp with a template you approved (switch it on in Abandoned carts; nothing is sent until you do).

POST https://app.easytawasul.com/api/v1/carts
{ "phone": "+201000000000", "cart_id": "C-77", "customer_name": "Mona", "items": "2 x Shirt", "total": 840, "currency": "EGP", "checkout_url": "https://shop.example/checkout/77" }
FieldRequiredNotes
phoneyesShopper phone with country code
cart_idnoYour cart id, up to 60 characters. Sending the same one again updates the cart while it is still open.
customer_name, items, total, currencynoSame rules as an order
checkout_urlnoWhere the shopper finishes the order. https only.

Response 201 (or 200 when the same cart_id is updated): { "id": "cart_5", "cart_id": "C-77", "status": "open", "reminders_sent": 0 }. Template variables, in order: name, items, total, checkout link. The first reminder goes out after the delay set for the platform (default 60 minutes), at most twice, never to a customer who replied STOP or is on your blacklist. When the same number orders within 7 days the cart is marked recovered.