Skip to content

Update order fields (notes, amounts, car details)

PATCH
/api/v1/orders/{id}
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" }'
id
required
string

Order CUID

Example
cmosor2zy000313ny24hgtfy0
Media typeapplication/json
object
version
required

Current order version for optimistic locking — throws 409 on mismatch (minimum 1)

number
notes

Internal notes about the order

string
totalAmount

Updated order total amount (minimum 0)

number
currency

ISO 4217 currency — USD | KRW | AED

string
carDetails

Car details JSON snapshot. Also accepts the customerNotificationsEnabled flag inside this object.

object
marketerId

Assign a different marketer CUID. Marketers cannot reassign themselves (403 thrown).

string
customsDocuments

Customs documents JSON (arbitrary structure, stored as-is)

object
Examples
Exampledefault
{
"version": 1,
"notes": "Customer requested white color only",
"totalAmount": 27000,
"currency": "USD"
}

Success

Media typeapplication/json
object
success
required
boolean
data
required
meta
object
page
integer
limit
integer
total
integer
totalPages
integer
data
required
object
id
required

Order CUID

string
orderNumber
required

Human-readable order number

number
status
required

Current order status (unchanged by this endpoint)

string
version
required

Incremented version after update

number
totalAmount

Updated order amount

number
notes

Updated notes

string
updatedAt
required

Last updated timestamp

string format: date-time
Examples
Examplesuccess
{
"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

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}

Forbidden — route not in this key’s allowedRoutes

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}

Rate limit exceeded

Media typeapplication/json
object
success
required
boolean
error
required
string
statusCode
required
integer
Example
{
"success": false
}
Retry-After
integer

Seconds to wait before retrying