Overview & Server Environments
Welcome to the official Al-Shrouq API Documentation. Here you will find all official URLs, endpoints, and parameters needed to integrate with our logistics services across Saudi Arabia.
Inject your account secret token into all code snippets and live interactive testing.
Test safely on Sandbox (Staging) or dispatch real orders directly to live drivers.
Create orders with pickup coordinates, recipient location, and cash on delivery details.
Official Base URLs & Server Environments
All requests must be transmitted over HTTPS to the verified endpoints below.
Live production environment for executing actual delivery operations and driver dispatch.
Sandbox environment for testing integrations, simulating order webhooks, and validating payload models.
Authentication & Security
Authentication is performed by embedding your secret API token directly in the request URL path (Token in URL Path). No request is processed without a valid active token.
Replace {API_TOKEN} with your merchant secret key provided by Al-Shrouq Express.
- Never expose your secret API_TOKEN in client-side code, mobile frontend apps, or public Git repositories.
- Always perform API requests from your secure backend servers (Node.js, PHP, Python, Java, etc.).
- If you suspect a token leak, contact the Al-Shrouq Express developer operations team immediately to rotate it.
Official core endpoints for creating, tracking, updating, and canceling delivery orders dispatched to the Al-Shrouq Express fleet.
Request Headers
Body Parameters & Attributes
25 fields-
1COD (Cash on Delivery) -
2Span Machine -
3Paid -
4AlshrouqPay
List of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Order Created successfully |
Request Headers
Body Parameters & Attributes
2 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Order Cancelled successfully |
| 200 | Success, Order Picked Up Cancel Request Submitted |
| 422 | Error, Order not found or has already been cancelled or cannot be cancelled |
Request Headers
Body Parameters & Attributes
1 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, HTTP 200 |
Request Headers
Body Parameters & Attributes
1 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, HTTP 200 |
Request Headers
Body Parameters & Attributes
9 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Order Updated successfully |
Request Headers
Body Parameters & Attributes
3 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Rate retrieved successfully |
Request Headers
List of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Cancel reasons retrieved successfully |
Request Headers
Body Parameters & Attributes
12 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Branch created successfully |
Request Headers
List of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, Branch retrieved successfully |
Request Headers
List of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, HTTP 200 |
Al-Shrouq Express sends outbound JSON POST notifications to the callback URL you configure in the dashboard when order status or driver location changes. Your server must respond with HTTP 200. There is no HMAC signature; an optional Authorization header uses the token you stored on the webhook.
Al-Shrouq posts this notification to each merchant's own webhook URL (every client registers a different callback in the dashboard) — not to Al-Shrouq servers and not a fixed base URL. Placeholder example: https://{your-domain}/api/webhooks/HandleAlShrouqWebhook. The Request Body is the data shape we send. Authorization = the token saved on the webhook settings. Whatever the merchant server returns is logged as-is.
Request Headers
Body Parameters & Attributes
17 fieldsList of HTTP Statuses Code
| Status Code | Status Description |
|---|---|
| 200 | Success, This is only an example. Any response body returned by your server is logged in our webhook logs. We do not validate the schema and do not depend on it for processing. |
List of Available Order Statuses
| Status ID | Status Description |
|---|---|
| 1 | Order Created |
| 2 | Pending Driver Acceptance |
| 17 | Driver Accept order |
| 16 | Arrive to pickup |
| 6 | Order Pickedup |
| 8 | Arrive to dropoff |
| 9 | Order Delivered |
| 10 | Order Cancelled |
| 21 | Order Cancellation is being Processed |
| 23 | Order Created (is used for internal process in Alshrouq system) |
HTTP Status Codes & Error Handling
Complete list of standard HTTP response status codes and error handling recommendations.
| Status Code | Meaning | Description & Recommended Action |
|---|---|---|
| 503 | System closed | System closed |
| 422 | Error | Validation errors , example: { "error": "The branch lat field is required when branch id is not present. (and 1 more error)" } |
| 401 | Error | Unauthorized error, Invaild token, example: { "message": "Invalid token" } |
| 401 | Error | Unauthorized error, unactive user, example: { "message": "Unactive user" } |
| 422 | Error | Branch not found |
| 422 | Error | Unactive branch |
| 404 | Error | The order already exists |
| 201 | Success | order created |
{
"status": false,
"message": "Validation error in request parameters.",
"errors": {
"branch_id": ["The branch_id field is required when coordinates are not provided."],
"payment_type": ["The payment_type must be either 1 (Cash) or 2 (Card Machine)."]
}
}