Skip to main content

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

ParameterTypeRequiredDescription
orderIdstring / integerYesThe 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

FieldTypeDescription
idstringOrder unique identifier
servicestringService type (e.g., shop)
receipt_numberstring | nullReceipt number if issued
cash_amountnumberCash amount received for the order
subtotalnumberOrder subtotal amount
totalnumberOrder total amount (including charges)
total_quantitystringTotal item quantity (string in response)
created_atstringISO 8601 timestamp when order was created
currencystringCurrency code (e.g., LYD)
is_activebooleanWhether the order is active
delivery_chargenumberDelivery charge amount
service_chargenumberService charge amount
statusobjectOrder status object (see nested fields)
status.keystringInternal status key (e.g., cancelled)
status.titlestringHuman readable status title
status.created_atstring | nullTimestamp when status was set (if available)
status.aliasesarrayAlternative status identifiers
status.decorationobjectUI decoration info for the status (colors, icon)
status.decoration.foreground_color.rolestring | nullSemantic role for color (e.g., error)
customerobjectCustomer information
customer.idstringCustomer id
customer.namestringCustomer name
print_order_numberstringPrintable order number
itemsarray[object]List of order items
items[].idstringOrder item id
items[].pricenumberItem price applied in the order
items[].quantityintegerQuantity ordered for this item
items[].productobjectProduct details for the item
items[].product.idstringProduct id
items[].product.vendor_idstringVendor id
items[].product.vendor_reference_idstring | nullVendor's product reference id
items[].product.servicestringProduct service type (e.g., shop)
items[].product.namestringProduct name
items[].product.featured_imagestringURL to featured image
items[].product.imagesarray[string]Product image URLs
items[].product.barcodestring | nullProduct barcode
items[].product.pricenumberProduct base price
items[].product.original_pricenumber | nullOriginal price if discounted
items[].product.currencystringProduct currency code
items[].product.is_availablebooleanProduct availability flag
items[].customizationsobject | nullAny customizations applied to the item
payment_methodobjectPayment method details
payment_method.idstring | nullPayment method id (if any)
payment_method.keystringPayment method key (e.g., Cash)
payment_method.titlestringPayment method title
payment_method.formobject | nullPayment form or additional data (if any)
delivery_methodobjectDelivery method details
delivery_method.idstringDelivery method id (e.g., delivery)
delivery_method.namestringDelivery method name
is_pickupbooleanWhether the order is pickup
can_mark_as_readybooleanWhether vendor can mark order as ready
pickup_otpstringOne-time code for pickup returned only when available
return_otpstringOne-time code for returns returned only when available
vendorobjectVendor information
vendor.idstringVendor id
vendor.namestringVendor name
vendor.featured_imagestringVendor 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

  1. Order Verification: Verify order details after receiving a webhook notification
  2. Status Tracking: Check the current status of an order to display to staff
  3. Receipt Generation: Retrieve complete order information to generate a receipt
  4. Order History: Build order history views for your staff dashboard