DocsOrders
Orders API
Access order data, line items, and order status through the Orders API.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/orders | List all orders (paginated) |
| GET | /api/orders/:id | Get order by ID |
List Orders
Retrieve a paginated list of orders for a store.
Request
GET /api/orders?store_id={storeId}&page=1&limit=25
Authorization: Bearer {token}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
store_id | string | Yes | Store UUID |
page | number | No | Page number (default: 1) |
limit | number | No | Items per page (default: 25, max: 100) |
status | string | No | Filter by order status |
customer_id | string | No | Filter by customer UUID |
from_date | string | No | Filter orders from date (ISO 8601) |
to_date | string | No | Filter orders until date (ISO 8601) |
Response
{
"data": [
{
"id": "uuid",
"salla_id": 987654321,
"reference_id": "ORD-12345",
"status": "completed",
"total": 599.99,
"subtotal": 549.99,
"shipping": 50.00,
"discount": 0,
"currency": "SAR",
"items_count": 3,
"payment_method": "credit_card",
"shipping_method": "express",
"order_date": "2024-01-15T10:30:00Z",
"customer": {
"id": "uuid",
"first_name": "Ahmed",
"last_name": "Mohammed"
}
}
],
"meta": {
"total": 2500,
"page": 1,
"limit": 25,
"total_pages": 100
}
}Get Order
Retrieve a single order with full details including line items.
Request
GET /api/orders/{orderId}?store_id={storeId}
Authorization: Bearer {token}Response
{
"id": "uuid",
"salla_id": 987654321,
"reference_id": "ORD-12345",
"status": "completed",
"total": 599.99,
"subtotal": 549.99,
"shipping": 50.00,
"discount": 0,
"tax": 0,
"currency": "SAR",
"items_count": 3,
"payment_method": "credit_card",
"shipping_method": "express",
"order_date": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-18T14:00:00Z",
"customer": {
"id": "uuid",
"salla_id": 123456,
"first_name": "Ahmed",
"last_name": "Mohammed",
"email": "ahmed@example.com",
"mobile": "+966501234567"
},
"items": [
{
"id": "uuid",
"product_id": "uuid",
"salla_product_id": 111222,
"name": "Premium Widget",
"sku": "PWG-001",
"quantity": 2,
"price": 199.99,
"total": 399.98,
"thumbnail": "https://..."
},
{
"id": "uuid",
"product_id": "uuid",
"salla_product_id": 111223,
"name": "Basic Accessory",
"sku": "BA-002",
"quantity": 1,
"price": 150.01,
"total": 150.01,
"thumbnail": "https://..."
}
],
"shipping_address": {
"city": "Riyadh",
"country": "SA",
"address": "123 Main Street"
},
"notes": "Please gift wrap",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-18T14:00:00Z"
}Order Statuses
| Status | Description |
|---|---|
pending | Order placed, awaiting processing |
processing | Order is being prepared |
shipped | Order has been shipped |
delivered | Order has been delivered |
completed | Order completed successfully |
cancelled | Order was cancelled |
refunded | Order was refunded |
Order Object
Full order object field reference:
| Field | Type | Description |
|---|---|---|
id | string | Syncaty UUID |
salla_id | number | Salla order ID |
reference_id | string | Human-readable order reference |
status | string | Current order status |
total | number | Total order amount |
currency | string | Currency code (e.g., SAR) |
items | array | Order line items |
customer | object | Associated customer |
order_date | string | Order creation date (ISO 8601) |