Zar Delivery Gateway

HyperPost Inbound Delivery Status API Documentation

API Active
Ingestion Endpoint & Authentication
POST https://zarglobal-api.duckdns.org/api/v1/hyperpost
Header Value Required Description
Content-Type application/json Yes Standard JSON request formatting
Accept application/json Yes Enforces JSON response envelope
Authorization Bearer <API_SECRET> Yes Pre-shared secret authentication token
Request Payload Specification

Requests must be sent as a JSON array of status objects ([ { ... } ]). This single standard is used for both single shipments and multi-shipment batches.

Field Type Required Description Example
track_id string | number Yes Courier shipment tracking number issued by HyperPost "179072103828391"
new_status_id integer Yes Courier status code (see directory below) 8
invoice_number string | number Optional Merchant order reference (Zar order number) "1000"
updated_at string Optional Timestamp of status event (YYYY-MM-DD HH:mm:ss) "2026-10-02 14:30:00"
old_status_id integer Optional Previous status code before this transition 5
new_sub_status_id integer Optional Secondary sub-status code for issues or holds 2
Courier Status Directory (HyperPost ➔ Zar Mapping)
Status ID Status Name (EN / KU / AR) Zar Order Status Automated Action & Impact
1 Accepted / وەرگیرا لە کۆمپانیای گەیاندن / مستلم لدى شركة التوصيل Accepted by courier Parcel received at courier facility
2 Added by sender / نێردەر زیادی کردووە / تسجيل من قبل العميل Handed over Registered in courier portal
5 Out for delivery / ئامادەکرا بۆ دابەشکردن / جاهز للتوزيع Shipped In driver vehicle for last-mile delivery
6 Connection problem / کێشە هەیە لە پەیوەندیکردن / توجد مشكلة في الاتصال Delayed Hold / Exception: Driver unable to reach customer (rescheduled)
7 On way / لە گواستنەوەدایە / بالطريق Shipped In transit between hubs
8 Delivered / گەیشتە دەستی وەرگر / تم تسليم الطلب Delivered Fulfillment Complete: Payment collected and delivered
9 Not got it / نەگەیشتووە بە دەستم / لم استلمه Delayed Hold / Exception: Delivery postponed / dispute reported
10 Returned / گەڕایەوە / راجع Courier return Return in Transit: In return transit with courier (stock retained until warehouse intake)
11 Sent back to sender / درایەوە بە نێردەر / راجع للعميل Courier return Return in Transit: En route back to merchant warehouse
12 Has issues / کێشەی تێدایە / فيه مشكلة Delayed Hold / Exception: Parcel issue or postponement reported
14 Postponed / دواخرا / مؤجل Delayed Hold / Exception: Customer requested future delivery date
15 Will be returned / دەگەڕێتەوە کۆگا / يرجع للمخزن Courier return Return in Transit: Scheduled return transit initiated
17 Send again / دووبارە بنێردرێتەوە / اعادة الارسال Shipped Re-dispatch attempt (deducts stock if returned)
18 Sent again / نێردرایەوە / تم اعادة الارسال Shipped Re-dispatched to courier
Request Body Examples
1. Single Delivered Parcel (Status 8)
JSON (Single Item)
[
  {
    "track_id": "179072103828391",
    "new_status_id": 8,
    "invoice_number": "1000",
    "updated_at": "2026-10-02 14:30:00"
  }
]
2. Multi-Order Batch (e.g. 50–100 Parcels)
JSON (Batch Array)
[
  {
    "track_id": "179072103828391",
    "new_status_id": 8,
    "invoice_number": "1000",
    "updated_at": "2026-10-02 14:30:00"
  },
  {
    "track_id": "179072103828392",
    "new_status_id": 10,
    "invoice_number": "1001",
    "updated_at": "2026-10-02 14:32:00"
  },
  {
    "track_id": "179072103828393",
    "new_status_id": 14,
    "new_sub_status_id": 3,
    "invoice_number": "1002",
    "updated_at": "2026-10-02 14:35:00"
  }
]
3. Courier Return En Route (Status 10)
JSON (Courier Return)
[
  {
    "track_id": "179072103828391",
    "new_status_id": 10,
    "invoice_number": "1000",
    "updated_at": "2026-10-02 16:00:00"
  }
]
Server Response Specifications
Success: Single Item (200 OK)
HTTP 200 OK
{
  "status": true,
  "message": "Status update processed successfully",
  "processed": 1,
  "succeeded": 1,
  "failed": 0,
  "order_number": "1000",
  "track_id": "179072103828391",
  "invoice_number": "1000",
  "new_status": "Delivered",
  "carrier_status": "Delivered"
}
Success: Batch Array (200 OK)
HTTP 200 OK
{
  "status": true,
  "message": "All 50 status update(s) processed successfully",
  "processed": 50,
  "succeeded": 50,
  "failed": 0
}
Partial Success with Unlinked Tracks (200 OK)
HTTP 200 OK
{
  "status": true,
  "message": "Processed 50 update(s): 48 succeeded, 2 unlinked/failed",
  "processed": 50,
  "succeeded": 48,
  "failed": 2,
  "errors": [
    {
      "track_id": "179072103828399",
      "invoice_number": "1099",
      "reason": "unlinked_shipment",
      "error": "No active external connection link found for Track ID "179072103828399"."
    }
  ]
}
Error: Unlinked Shipment (404 Not Found)
HTTP 404 Not Found
{
  "status": false,
  "message": "Track "179072103828399" does not have an active connection link in Zar Inventory. Orders must first be dispatched from the app.",
  "processed": 1,
  "succeeded": 0,
  "failed": 1
}
Error: Unauthorized (401 Unauthorized)
HTTP 401 Unauthorized
{
  "status": false,
  "message": "Unauthorized: Missing or invalid Bearer token. Expected header: "Authorization: Bearer ""
}
cURL Testing Command
cURL (Bash / Terminal)
curl -X POST "https://zarglobal-api.duckdns.org/api/v1/hyperpost"   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_SECRET"   -d '[
    {
      "track_id": "179072103828391",
      "new_status_id": 8,
      "invoice_number": "1000",
      "updated_at": "2026-10-02 14:30:00"
    }
  ]'