Upsert the inspection for an order (photos, notes, PDF)
PATCH
/api/v1/inspections/order/{orderId}
const url = 'https://api.dokanmazad.com/api/v1/inspections/order/cmosor2zy000313ny24hgtfy0';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"notes":"Minor scratches on left door, engine OK","pdfReportUrl":"https://cdn.dokanmazad.com/inspections/report-001.pdf"}'};
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/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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”orderId
required
string
Order CUID
Example
cmosor2zy000313ny24hgtfy0Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”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}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying
