Shipping API
Create shipments from your store or system, and read their status in real time. JSON over HTTPS.
Authentication
Send your API key in the Authorization header (or X-Api-Key). Keys start with ingz_ and are shown only once when created. Base URL:
https://ingezha.com/api/v1
Authorization: Bearer ingz_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A merchant key creates shipments for that merchant only. A company key (created by the shipping company's manager) must send merchant (merchant id, code or phone) with each shipment. Limit: 600 requests per 10 minutes per key.
Create a shipment
/api/v1/shipments| Field | Type | |
|---|---|---|
receiver.name | string | Required |
receiver.phone | string | Required — Egyptian mobile, any format (+20 10…, 010…) |
receiver.address | string | Required |
receiver.city | string | Required — a city name from /cities. English governorate names (Cairo, Giza, Alexandria…) are matched automatically. |
cod_amount | number | Total the courier collects from the receiver (shipping fee included). The goods value is calculated as cod_amount − fee. |
payment | cod | prepaid | Default cod. For prepaid send value instead of cod_amount — nothing is collected. |
order_no | string | Your order number. Sending the same order_no again returns the existing shipment (safe retries). |
content, notes | string | Optional |
pieces, weight | number | Optional (weight in kg) |
merchant | string | Company keys only |
curl -X POST https://ingezha.com/api/v1/shipments \
-H "Authorization: Bearer ingz_..." -H "Content-Type: application/json" \
-d '{
"order_no": "WEB-1001",
"receiver": { "name": "Ahmed Ali", "phone": "01012345678", "address": "5 Tahrir St, Dokki", "city": "Giza" },
"content": "2× T-shirt",
"cod_amount": 350
}'
Response 201:
{
"ok": true,
"shipment": {
"code": "SH-242557", "orderNo": "WEB-1001", "status": "received", "statusLabel": "تم الاستلام",
"city": "الجيزة", "fee": 45, "value": 305, "cod": 350, "collected": 0, "pay": "cod",
"createdAt": "2026-10-10T14:54:40+00:00", "deliveredAt": null,
"trackingUrl": "https://ingezha.com/your-company/track?c=SH-242557"
}
}
Send trackingUrl to your customer — it is a public tracking page with the shipping company's branding.
Get a shipment
/api/v1/shipments/{code}Returns the shipment plus history: [{ "status", "label", "note", "at" }].
List shipments
/api/v1/shipments?since=2026-10-01T00:00:00Z&status=delivered&order_no=WEB-1001All filters are optional. Returns up to 100 shipments, most recently updated first. Poll with since = the time of your last sync to pick up status changes.
Cancel
/api/v1/shipments/{code}/cancelOnly while the status is received (not yet picked up). Otherwise returns 409.
Cities and fees
/api/v1/cities{ "ok": true, "cities": [ { "name": "القاهرة", "fee": 45, "days": 1 }, { "name": "الجيزة", "fee": 45, "days": 1 } ] }
fee is the shipping price for your merchant account (special prices and discounts applied).
Statuses
| status | Meaning |
|---|---|
received | Registered, waiting for pickup |
warehouse | In the shipping company's warehouse |
out | Out for delivery with a courier |
postponed | Postponed — see postponedTo and reason |
delivered | Delivered — collected is the amount collected |
returned | Delivery failed, returning — see reason |
rts | Returned to the merchant |
cancelled | Cancelled |
Webhooks — status updates pushed to you
Instead of polling, add a webhook URL in the dashboard → Store connections → Webhooks (or from the merchant app → Add → Connect my store). You get a signing secret (whsec_…) once. We send a POST with a JSON body whenever one of your shipments is created or its status changes.
| Header | Meaning |
|---|---|
X-Ingezha-Event | shipment.created, shipment.status or ping (test button) |
X-Ingezha-Delivery | Unique delivery id — use it to ignore duplicates |
X-Ingezha-Signature | sha256= + HMAC-SHA256 of the raw body with your secret |
{
"event": "shipment.status",
"sentAt": "2026-10-11T13:05:00+00:00",
"shipment": { "code": "SH-482910", "orderNo": "1042", "status": "delivered", "statusLabel": "تم التوصيل",
"city": "الجيزة", "fee": 45, "value": 455, "cod": 500, "collected": 500, "pay": "cod",
"trackingUrl": "https://ingezha.com/saree3/track?c=SH-482910", "...": "same fields as GET /shipments/{code}" }
}
Verify the signature
// PHP
$raw = file_get_contents('php://input');
$ok = hash_equals('sha256=' . hash_hmac('sha256', $raw, 'whsec_...'), $_SERVER['HTTP_X_INGEZHA_SIGNATURE'] ?? '');
// Node.js (Express: use express.raw({type: 'application/json'}))
const sig = 'sha256=' + crypto.createHmac('sha256', 'whsec_...').update(req.body).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(req.get('X-Ingezha-Signature') || ''));
Reply with any 2xx within 6 seconds. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h. Webhooks for a merchant key only receive that merchant’s shipments; company-wide webhooks receive all.
Store webhooks (no code)
In the dashboard → Store connections → Connect a store, pick the platform. You get a unique webhook URL like https://ingezha.com/api/hooks/shopify/<token>. Every new order becomes a shipment automatically; orders with an unknown city wait in “Orders needing review”.
| Platform | Where | Event | Signature |
|---|---|---|---|
| Shopify | Settings → Notifications → Webhooks | Order creation (JSON) | The “signed with” key → paste as Secret |
| WooCommerce | WooCommerce → Settings → Advanced → Webhooks | Order created | Your Secret → paste the same value |
| Easy Orders | Public API → Webhooks → Create Webhook | New order | Generated secret → paste as Secret |
COD orders: the courier collects the order total. Paid orders (card / wallet) are shipped as prepaid.
Errors
{ "ok": false, "error": "invalid", "message": "رقم موبايل المستلم غير صحيح" }
| HTTP | error | |
|---|---|---|
| 401 | auth | Missing or wrong key |
| 402 | blocked | The shipping company's subscription is suspended |
| 403 | locked | API is not on the company's plan |
| 404 | not_found | Shipment not found (or belongs to another merchant) |
| 409 | state | Action not allowed in the current status |
| 422 | invalid / merchant | Validation error — message explains (Arabic) |
| 429 | rate | Too many requests |