This endpoint allows you to retrieve detailed information about a specific order by its unique identifier.
GET /api/orders/100
When the order exists, you'll receive HTTP/1.1 200 OK and JSON with the order details.
{
"order_id": "100",
"is_parent_order": "N",
"parent_order_id": "0",
"status": "P",
"timestamp": "1627294200",
"company_id": "1",
"user_id": "5",
"firstname": "Jane",
"lastname": "Smith",
"email": "jane.smith@example.com",
"phone": "+1 (555) 123-4567",
"total": "145.50",
"subtotal": "135.00",
"shipping_cost": "10.50",
"payment_id": "2",
"payment_method": {
"payment_id": "2",
"payment": "Credit Card",
"description": "Visa, MasterCard, Discover, American Express",
"status": "A"
},
"shipping_id": "1",
"shipping": [
{
"shipping_id": "1",
"shipping": "Standard Shipping",
"delivery_time": "3-5 business days",
"status": "A"
}
],
"products": [
{
"item_id": "5432123",
"product_id": "12",
"product": "Premium T-Shirt",
"price": "45.00",
"amount": "3"
}
],
"s_firstname": "Jane",
"s_lastname": "Smith",
"s_address": "123 Main St",
"s_city": "New York",
"s_state": "NY",
"s_country": "US",
"s_zipcode": "10001",
"b_firstname": "Jane",
"b_lastname": "Smith",
"b_address": "123 Main St",
"b_city": "New York",
"b_state": "NY",
"b_country": "US",
"b_zipcode": "10001"
}
When the order doesn't exist, you'll receive HTTP/1.1 404 Not Found.
| Field | Type | Description |
|---|---|---|
| order_id | string | The unique identifier of the order |
| is_parent_order | string | "Y" if this is a parent order, "N" otherwise |
| parent_order_id | string | ID of the parent order (if this is a child order) |
| status | string | Order status code (e.g., "P" for Processed, "C" for Complete) |
| timestamp | string | UNIX timestamp when the order was placed |
| company_id | string | ID of the vendor/company |
| Field | Type | Description |
|---|---|---|
| user_id | string | Customer's user ID (0 for guest orders) |
| firstname | string | Customer's first name |
| lastname | string | Customer's last name |
| string | Customer's email address | |
| phone | string | Customer's phone number |
| Field | Type | Description |
|---|---|---|
| total | string | Total order amount including shipping |
| subtotal | string | Order subtotal (before shipping) |
| shipping_cost | string | Shipping cost |
| payment_id | string | ID of the payment method |
| payment_method | object | Details of the payment method |
| Field | Type | Description |
|---|---|---|
| shipping_id | string | ID of the shipping method |
| shipping | array | Details of the shipping method(s) |
| s_firstname, s_lastname, etc. | string | Shipping address fields (s_* prefix) |
| b_firstname, b_lastname, etc. | string | Billing address fields (b_* prefix) |
is_parent_order and parent_order_id to understand the relationship between orders. Parent orders contain the complete transaction, while child orders represent portions fulfilled by individual vendors.