Skip to content

Toggle WhatsApp notifications to the customer for this order

PATCH
/api/v1/orders/{id}/customer-notifications
curl --request PATCH \
--url https://api.dokanmazad.com/api/v1/orders/cmosor2zy000313ny24hgtfy0/customer-notifications \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "enabled": false, "version": 2 }'
id
required
string

Order CUID

Example
cmosor2zy000313ny24hgtfy0
Media typeapplication/json
object
enabled
required

Whether WhatsApp notifications to the customer are enabled for this order. Persisted as customerNotificationsEnabled inside Order.carDetails. Staff notifications (marketer/accountant/operations) are unaffected.

boolean
version
required

Current order version for optimistic locking (minimum 0)

number
Examples
Exampledefault
{
"enabled": false,
"version": 2
}

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
version
required

Incremented version

number
Examples
Examplesuccess
{
"success": true,
"data": {
"id": "cmosor2zy000313ny24hgtfy0",
"orderNumber": 1042,
"status": "DepositSubmitted",
"allowedStatusTransitions": [
"DepositConfirmed",
"Cancelled"
],
"progress": 0,
"canCancel": true,
"isTerminal": false,
"version": 3,
"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"
}
}

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