The Akwaan Express Merchant API allows external merchants to integrate with the Akwaan Express delivery system to create, track, and manage orders. This documentation covers all available endpoints for merchant integration.
https://api.akwanexpress.com/application/jsonAll API requests require an API key to be included in the request headers.
ApiKey: your-api-key-here
All API operations use the External Order ID (the ID from your system):
externalId field when creating orders)
GET /api/b2b/external/order/{externalId}PUT /api/b2b/merchant/order/{externalId}/cancelCreates a new order for external merchants using API key authentication.
/api/b2b/merchants/order
Content-Type: application/json
ApiKey: your-api-key-here
{
"code": "ORD-2024-001",
"customerName": "أحمد حسن علي",
"customerPhoneNumber": "07901234567",
"customerSecondPhoneNumber": "07801234567",
"externalId": "550e8400-e29b-41d4-a716-446655440000",
"content": "1x iPhone 15 Pro Max 256GB - أسود",
"deliveryZoneName": "الزعفرانية",
"pickupZoneName": "المنصور",
"pickUpGovernorateId": 1,
"deliveryGovernorateId": 1,
"note": "قطعة هشة - تعامل معها بحذر شديد",
"amount": 40000.00,
"paidAmount": 0.00,
"nearestLandmark": "قرب مجمع بغداد التجاري",
"pickUpLocation": {
"lat": 33.3152,
"long": 44.3661
},
"deliveryLocation": {
"lat": 33.3406,
"long": 44.4009
}
}
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "MERCHANT-001-ORD-2024-001",
"customerName": "أحمد حسن علي",
"customerPhoneNumber": "07901234567",
"customerSecondPhoneNumber": "07801234567",
"externalId": "550e8400-e29b-41d4-a716-446655440000",
"content": "1x iPhone 15 Pro Max 256GB - أسود",
"deliveryZoneName": "الزعفرانية",
"pickupZoneName": "المنصور",
"pickupGovernorate": {
"id": 1,
"name": "محافظة بغداد"
},
"deliveryGovernorate": {
"id": 1,
"name": "محافظة بغداد"
},
"note": "قطعة هشة - تعامل معها بحذر شديد",
"amount": 40000.00,
"paidAmount": 0.00,
"nearestLandmark": "قرب مجمع بغداد التجاري",
"size": "Small",
"pickUpLocation": {
"lat": 33.3152,
"long": 44.3661
},
"deliveryLocation": {
"lat": 33.3406,
"long": 44.4009
},
"status": "Pending"
}
Retrieves order details using the external order ID (your system's order ID).
/api/b2b/external/order/{externalId}
ApiKey: your-api-key-here
GET /api/b2b/external/order/550e8400-e29b-41d4-a716-446655440000
Same as Create Order response
Cancels an existing order using the internal order ID.
/api/b2b/merchant/order/{externalId}/cancel
Content-Type: application/json
ApiKey: your-api-key-here
PUT /api/b2b/merchant/order/550e8400-e29b-41d4-a716-446655440000/cancel
Updated order object with status "Cancelled"
| Field | Type | Required | Description |
|---|---|---|---|
code |
string | Yes | Unique order code (will be prefixed with merchant code) |
customerName |
string | Yes | Customer's full name |
customerPhoneNumber |
string | Yes | Primary phone number (max 15 chars) |
customerSecondPhoneNumber |
string | No | Secondary phone number (max 15 chars) |
externalId |
GUID | Yes | Your system's order ID |
content |
string | Yes | Item name and quantity (e.g., "2x iPhone 15 Pro Max", "5x Samsung Galaxy S24") |
deliveryZoneName |
string | Yes | Name of delivery zone/area |
pickupZoneName |
string | Yes | Name of pickup zone/area |
pickUpGovernorateId |
int | Yes | Governorate ID for pickup location |
deliveryGovernorateId |
int | Yes | Governorate ID for delivery location |
note |
string | No | Additional notes for the order |
amount |
decimal | Yes | Order value/amount (separate from delivery fee) |
nearestLandmark |
string | No | Landmark near delivery location |
pickUpLocation |
Location | No | GPS coordinates for pickup |
deliveryLocation |
Location | No | GPS coordinates for delivery |
size |
OrderSize | No | Order size (Small, Medium, Large) - defaults to Small |
| Field | Type | Description |
|---|---|---|
lat |
double | Latitude coordinate |
long |
double | Longitude coordinate |
| Value | Description |
|---|---|
Pending (0) |
Order created, awaiting processing |
InPickUpShipment (1) |
Assigned to pickup delegate |
InPickUpProgress (2) |
Pickup in progress |
AtPickUpPoint (3) |
At pickup location |
Received (4) |
Successfully picked up |
NotReceived (5) |
Pickup failed |
InWarehouse (6) |
Order in warehouse |
InDeliveryShipment (7) |
Assigned to delivery delegate |
InDeliveryProgress (8) |
Delivery in progress |
AtDeliveryPoint (9) |
At delivery location |
Delivered (10) |
Successfully delivered |
PartiallyDelivered (11) |
Partially delivered |
Cancelled (12) |
Order cancelled |
Completed (13) |
Order completed |
RescheduledInWarehouse (14) |
Rescheduled in warehouse |
RescheduledDelegate (15) |
Rescheduled with delegate |
RefundedInWarehouse (16) |
Order is returned in the warehouse |
RefundedDelegate (17) |
Order is refunded by user and is with delegate now |
InRefundShipment (27) |
In refund list - assigned to return to merchant |
InRefundProgress (28) |
On the way to return to merchant |
RefundedToMerchant (29) |
Order refunded to merchant |
| Value | Description |
|---|---|
Small (0) |
Small package |
Medium (1) |
Medium package |
Large (2) |
Large package |
{
"error": "Error message description",
"details": "Additional error details if available"
}
| Error Message | Description | Solution |
|---|---|---|
API Key is missing |
No API key provided in headers | Include ApiKey header |
Please notify the akwaan delivery system to add your integration details |
API key not found or inactive | Contact support to activate your integration |
Merchant Not Found |
Associated merchant not found | Contact support |
Pickup Governorate Not Found |
Invalid pickup governorate ID | Use valid governorate ID |
Delivery Governorate Not Found |
Invalid delivery governorate ID | Use valid governorate ID |
please notify the delivery system to set a delivery zone prices |
No pricing configured for delivery zone | Contact support to configure pricing |
Order with the same code Already Exists |
Duplicate order code | Use unique order code |
Delivery Zone or Pickup Zone cant be null or empty |
Missing zone names | Provide both pickup and delivery zone names |
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request (validation errors) |
| 401 | Unauthorized (invalid API key) |
| 404 | Not Found |
| 500 | Internal Server Error |
The system supports webhooks for real-time order status updates. When you register for API access, you must provide your webhook URL where you want to receive status updates.
During registration, provide your webhook URL in this format:
https://your-domain.com/api/akwaan/orderhttps://merchant-api.example.com/api/akwaan/orderThe system will automatically append the external order ID to your URL when sending updates.
| Event Type | Description |
|---|---|
OrderStatusCreated |
Order created successfully |
OrderStatusUpdated |
Order status changed |
OTPSend |
Order status update sent with OTP (OTP sent to merchant's app, not SMS/WhatsApp) |
OTPResend |
OTP resent to merchant's app |
The system will send HTTP PUT requests to your configured webhook URL with the following format:
URL Pattern: {YOUR_WEBHOOK_URL}/api/akwaan/order-delivery/webhook
Example URL:
https://merchant-api.example.com/api/akwaan/order-delivery/webhook
Content-Type: application/json
Authorization: {your-auth-header} (if configured)
[
{
"eventType": "OrderStatusUpdated",
"eventData": {
"orderId" : "02323",
"status": "InDeliveryProgress"
}
}
]
| Event Type | Event Data |
|---|---|
OrderStatusCreated |
{"status": "Pending"} |
OrderStatusUpdated |
{"status": "InDeliveryProgress"} |
OTPSend |
{"status": "InDeliveryProgress", "otp": "123456"} |
OTPResend |
{"otp": "123456"} |
123456789101112131415161718The content field should describe the items and quantities being shipped:
"1x iPhone 15 Pro Max 256GB - أسود""3x Samsung Galaxy S24 Ultra 512GB - أسود تيتانيوم""2x MacBook Pro 16-inch M3 Max - رمادي""5x AirPods Pro 2nd Generation - أبيض""1x iPad Air 11-inch 256GB - أزرق"amount: The value of the items being shipped ONLY (e.g., 40000.00 for a
40,000 IQD phone) - DO NOT include delivery feedeliveryFee: The cost of delivery (calculated automatically by the system
based on zones and pricing)totalAmount: Order amount + delivery fee (calculated automatically by the
system)PaidAmount: The paid amount of the order with the delivery fee (Order amount = 40,000, Delivery fee = 5,000,PaidAmount = 45,000,totalAmount = 0)Important: The amount field should only contain the value of the items, not
the delivery cost. The delivery fee will be calculated and added automatically by the system.
Item Value (amount): 40,000 IQD
Delivery Fee: 5,000 IQD (calculated by system)
Total Amount: 45,000 IQD (calculated by system)
What to send: Only the item value (40,000) in the amount field
What you'll receive: Item value + calculated delivery fee in the response
Before integrating with the Akwaan Express API, ensure you have:
https://your-domain.com/api/akwaan/orders)
/api/akwaan/orders/{externalId}
For technical support or questions about the API:
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-09-12 | Initial API documentation for Akwaan Express |
This documentation is maintained by the Akwaan Express development team. For the most up-to-date information, please refer to the latest version of this document.