Update order fields (notes, amounts, car details)
const url = 'https://api.dokanmazad.com/api/v1/orders/cmosor2zy000313ny24hgtfy0';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"version":1,"notes":"Customer requested white color only","totalAmount":27000,"currency":"USD"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.dokanmazad.com/api/v1/orders/cmosor2zy000313ny24hgtfy0 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "version": 1, "notes": "Customer requested white color only", "totalAmount": 27000, "currency": "USD" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Order CUID
Example
cmosor2zy000313ny24hgtfy0Request Bodyrequired
Section titled “Request Bodyrequired”object
Current order version for optimistic locking — throws 409 on mismatch (minimum 1)
Internal notes about the order
Updated order total amount (minimum 0)
ISO 4217 currency — USD | KRW | AED
Car details JSON snapshot. Also accepts the customerNotificationsEnabled flag inside this object.
object
Assign a different marketer CUID. Marketers cannot reassign themselves (403 thrown).
Customs documents JSON (arbitrary structure, stored as-is)
object
Examples
{ "version": 1, "notes": "Customer requested white color only", "totalAmount": 27000, "currency": "USD"}Responses
Section titled “Responses”Success
object
object
object
Order CUID
Human-readable order number
Current order status (unchanged by this endpoint)
Incremented version after update
Updated order amount
Updated notes
Last updated timestamp
Examples
{ "success": true, "data": { "id": "cmosor2zy000313ny24hgtfy0", "orderNumber": 1042, "status": "DepositSubmitted", "allowedStatusTransitions": [ "DepositConfirmed", "Cancelled" ], "progress": 0, "canCancel": true, "isTerminal": false, "version": 2, "customerId": "cmoabcde000001ny11aabbcc0", "marketerId": "cmoabcde000002ny22aabbcc0", "tenantId": "cmoabcde000003ny33aabbcc0", "carDetails": { "makeEn": "BMW", "modelEn": "3 Series", "year": 2023, "price": 25000 }, "totalAmount": 27000, "currency": "USD", "notes": "Customer requested white color only", "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-03T10:00:00.000Z" }}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
