List customer orders
const url = 'https://api.dokanmazad.com/api/v1/orders?page=1&limit=20&status=DepositSubmitted%2CShipping&customerId=cmoabcde000001ny11aabbcc0&marketerId=cmoabcde000002ny22aabbcc0&tenantId=cmoabcde000003ny33aabbcc0&search=1042&createdAfter=2026-01-01T00%3A00%3A00Z&createdBefore=2026-12-31T23%3A59%3A59Z';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.dokanmazad.com/api/v1/orders?page=1&limit=20&status=DepositSubmitted%2CShipping&customerId=cmoabcde000001ny11aabbcc0&marketerId=cmoabcde000002ny22aabbcc0&tenantId=cmoabcde000003ny33aabbcc0&search=1042&createdAfter=2026-01-01T00%3A00%3A00Z&createdBefore=2026-12-31T23%3A59%3A59Z' \ --header 'X-API-Key: <X-API-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page number (1-based)
Example
1Items per page (default 20)
Example
20Single status or comma-separated list of statuses
Example
DepositSubmitted,ShippingFilter by customer CUID
Example
cmoabcde000001ny11aabbcc0Filter by marketer CUID
Example
cmoabcde000002ny22aabbcc0Filter by tenant CUID (admin/super-admin only)
Example
cmoabcde000003ny33aabbcc0Search by order number (e.g. “1042”)
Example
1042Orders created after this date (ISO 8601)
Example
2026-01-01T00:00:00ZOrders created before this date (ISO 8601)
Example
2026-12-31T23:59:59ZResponses
Section titled “Responses”Success
object
object
object
CUID order ID
Human-readable sequential number
Current order status (one of 16 possible values)
Valid next statuses the caller can transition to
Order progress 0–100 (-1 for cancelled)
Whether order can be cancelled from current status
Whether order is in a terminal state (no transitions)
Optimistic-lock version — pass back when updating
Customer CUID
Total order amount
ISO 4217 currency code
Car snapshot JSON — see POST /api/v1/orders for keys
object
Embedded customer object { id, name, email?, mobileNumber? }
object
Creation timestamp
object
Examples
{ "success": true, "data": [ { "id": "cmosor2zy000313ny24hgtfy0", "orderNumber": 1042, "status": "DepositSubmitted", "allowedStatusTransitions": [ "DepositConfirmed", "Cancelled" ], "progress": 0, "canCancel": true, "isTerminal": false, "version": 1, "customerId": "cmoabcde000001ny11aabbcc0", "marketerId": "cmoabcde000002ny22aabbcc0", "tenantId": "cmoabcde000003ny33aabbcc0", "carDetails": { "makeEn": "BMW", "modelEn": "3 Series", "year": 2023, "price": 25000 }, "totalAmount": 25000, "currency": "USD", "notes": null, "inspectionDate": null, "customer": { "id": "cmoabcde000001ny11aabbcc0", "name": "Ahmed Ali", "email": "ahmed@example.com" }, "marketer": { "id": "cmoabcde000002ny22aabbcc0", "name": "Sales Rep", "email": "sales@example.com" }, "createdAt": "2026-05-01T08:00:00.000Z", "updatedAt": "2026-05-01T08:00:00.000Z" } ], "meta": { "page": 1, "limit": 20, "total": 1, "totalPages": 1 }}Unauthorized — missing or invalid API key
object
Example
{ "success": false}Forbidden — route not in this key’s allowedRoutes
object
Example
{ "success": false}Rate limit exceeded
object
Example
{ "success": false}Headers
Section titled “Headers”Seconds to wait before retrying
