Get Order Details
This endpoint allows vendors to retrieve the current details and status of a specific order.
Overview
The Get Order Details endpoint allows you to fetch the complete information for an order at any point in its lifecycle. This is useful for displaying order details to staff, troubleshooting, or synchronizing order information with your internal systems.
Endpoint Details
Method: GET
URL: /api/developer/v1/orders/{orderId}
Purpose: Retrieve complete information about a specific order
Request Specification
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string / integer | Yes | The unique identifier of the order to retrieve |
Example Request
GET /api/developer/v1/orders/12345
Authorization: Bearer <your-token>
Accept: application/json
Response Specification
Success Response
200 OK{
"data": {
"id": "ORDER_123",
"service": "shop",
"receipt_number": null,
"cash_amount": 0,
"subtotal": 0,
"total": 0,
"total_quantity": "0",
"created_at": "2025-01-01T00:00:00+00:00",
"currency": "LYD",
"is_active": true,
"delivery_charge": 0,
"service_charge": 0,
"status": {
"key": "pending",
"title": "Pending",
"created_at": null,
"aliases": [],
"decoration": {
"background_color": null,
"foreground_color": {
"light_hex": null,
"dark_hex": null,
"role": "neutral"
},
"border_color": null,
"border_radius": null,
"featured_icon": null
}
},
"customer": {
"id": "CUST_1",
"name": "John Doe"
},
"print_order_number": "ORDER_123",
"items": [
{
"id": "ITEM_1",
"price": 0,
"quantity": 0,
"product": {
"id": "PROD_1",
"vendor_id": "VENDOR_1",
"vendor_reference_id": null,
"service": "shop",
"name": "Sample Product",
"featured_image": "",
"images": [],
"barcode": null,
"price": 0,
"original_price": null,
"currency": "USD",
"is_available": true
},
"customizations": null
}
],
"payment_method": {
"id": null,
"key": "Cash",
"title": "Cash",
"sub_title": null,
"payment_type": null,
"featured_image": null,
"form": null
},
"delivery_method": {
"id": "delivery",
"name": "Delivery",
"featured_image": null
},
"is_pickup": false,
"can_mark_as_ready": false,
"pickup_otp": "123456",
"return_otp": "123456",
"vendor": {
"id": "VENDOR_1",
"name": "Sample Vendor",
"featured_image": ""
}
// Note: `pickup_otp` and `return_otp` are shown only when available; they are omitted from the JSON when null.
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Order unique identifier |
service | string | Service type (e.g., shop) |
receipt_number | string | null | Receipt number if issued |
cash_amount | number | Cash amount received for the order |
subtotal | number | Order subtotal amount |
total | number | Order total amount (including charges) |
total_quantity | string | Total item quantity (string in response) |
created_at | string | ISO 8601 timestamp when order was created |
currency | string | Currency code (e.g., LYD) |
is_active | boolean | Whether the order is active |
delivery_charge | number | Delivery charge amount |
service_charge | number | Service charge amount |
status | object | Order status object (see nested fields) |
status.key | string | Internal status key (e.g., cancelled) |
status.title | string | Human readable status title |
status.created_at | string | null | Timestamp when status was set (if available) |
status.aliases | array | Alternative status identifiers |
status.decoration | object | UI decoration info for the status (colors, icon) |
status.decoration.foreground_color.role | string | null | Semantic role for color (e.g., error) |
customer | object | Customer information |
customer.id | string | Customer id |
customer.name | string | Customer name |
print_order_number | string | Printable order number |
items | array[object] | List of order items |
items[].id | string | Order item id |
items[].price | number | Item price applied in the order |
items[].quantity | integer | Quantity ordered for this item |
items[].product | object | Product details for the item |
items[].product.id | string | Product id |
items[].product.vendor_id | string | Vendor id |
items[].product.vendor_reference_id | string | null | Vendor's product reference id |
items[].product.service | string | Product service type (e.g., shop) |
items[].product.name | string | Product name |
items[].product.featured_image | string | URL to featured image |
items[].product.images | array[string] | Product image URLs |
items[].product.barcode | string | null | Product barcode |
items[].product.price | number | Product base price |
items[].product.original_price | number | null | Original price if discounted |
items[].product.currency | string | Product currency code |
items[].product.is_available | boolean | Product availability flag |
items[].customizations | object | null | Any customizations applied to the item |
payment_method | object | Payment method details |
payment_method.id | string | null | Payment method id (if any) |
payment_method.key | string | Payment method key (e.g., Cash) |
payment_method.title | string | Payment method title |
payment_method.form | object | null | Payment form or additional data (if any) |
delivery_method | object | Delivery method details |
delivery_method.id | string | Delivery method id (e.g., delivery) |
delivery_method.name | string | Delivery method name |
is_pickup | boolean | Whether the order is pickup |
can_mark_as_ready | boolean | Whether vendor can mark order as ready |
pickup_otp | string | One-time code for pickup returned only when available |
return_otp | string | One-time code for returns returned only when available |
vendor | object | Vendor information |
vendor.id | string | Vendor id |
vendor.name | string | Vendor name |
vendor.featured_image | string | Vendor featured image URL |
Error Responses
401 Unauthorized - Authentication issues
{
"status": "error",
"message": "Unauthenticated."
}
404 Not Found - Order not found
{
"status": "error",
"message": "Order not found"
}
Implementation Tips
Best Practices
- Use this endpoint after receiving a webhook notification to get the full order context
- Monitor the order status to track its progress through the workflow
- Cache order details to reduce API calls for frequently accessed orders
Use Cases
- Order Verification: Verify order details after receiving a webhook notification
- Status Tracking: Check the current status of an order to display to staff
- Receipt Generation: Retrieve complete order information to generate a receipt
- Order History: Build order history views for your staff dashboard