Skip to content

Upsert the inspection for an order (photos, notes, PDF)

PATCH
/api/v1/inspections/order/{orderId}
curl --request PATCH \
--url https://api.dokanmazad.com/api/v1/inspections/order/cmosor2zy000313ny24hgtfy0 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "notes": "Minor scratches on left door, engine OK", "pdfReportUrl": "https://cdn.dokanmazad.com/inspections/report-001.pdf" }'
orderId
required
string

Order CUID

Example
cmosor2zy000313ny24hgtfy0
Media typeapplication/json
object
notes

Updated inspection notes (max 2000 characters, nullable)

string
pdfReportUrl

URL to updated PDF inspection report (nullable)

string
photos

Array of InspectionPhotoDto objects replacing the current set (max 200 items). Each: { url, thumbnailUrl?, type?, caption?, priority?, uploadedAt? }

Array
Examples
Exampledefault
{
"notes": "Minor scratches on left door, engine OK",
"pdfReportUrl": "https://cdn.dokanmazad.com/inspections/report-001.pdf"
}

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

Inspection CUID

string
orderId
required

Order CUID

string
notes

Updated notes

string
pdfReportUrl

PDF report URL

string
photos

Updated photo array

Array
status
required

Current inspection status (Pending | InProgress | Completed | Cancelled)

string
Examples
Examplesuccess
{
"success": true,
"data": {
"id": "clx1insp0001a2b3c4d5e6f",
"orderId": "cmosor2zy000313ny24hgtfy0",
"notes": "Minor scratches on left door, engine OK",
"pdfReportUrl": "https://cdn.dokanmazad.com/inspections/report-001.pdf",
"status": "Pending",
"photos": []
}
}

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