Create an inspection report for an order
POST
/api/v1/inspections
const url = 'https://api.dokanmazad.com/api/v1/inspections';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"orderId":"cmosor2zy000313ny24hgtfy0","inspectorId":"clx1def4500001a2b3c4d5e6f","inspectionDate":"2026-05-20T10:00:00.000Z","notes":"Check undercarriage for rust damage"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.dokanmazad.com/api/v1/inspections \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "orderId": "cmosor2zy000313ny24hgtfy0", "inspectorId": "clx1def4500001a2b3c4d5e6f", "inspectionDate": "2026-05-20T10:00:00.000Z", "notes": "Check undercarriage for rust damage" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
orderId
required
Order CUID this inspection is linked to
string
inspectorId
required
User CUID of the inspector
string
inspectionDate
Scheduled inspection date (ISO 8601 string or Date)
string format: date-time
notes
Inspection notes or special instructions
string
photos
Array of InspectionPhotoDto objects. Each photo: { url, thumbnailUrl?, type?, caption?, priority? (number ≥ 0), uploadedAt? }
Array
pdfReportUrl
URL of an existing PDF inspection report
string
Examples
Exampledefault
{ "orderId": "cmosor2zy000313ny24hgtfy0", "inspectorId": "clx1def4500001a2b3c4d5e6f", "inspectionDate": "2026-05-20T10:00:00.000Z", "notes": "Check undercarriage for rust damage"}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
Newly created inspection CUID
string
orderId
required
Parent order CUID
string
inspectorId
required
Inspector user CUID
string
status
required
Always Pending on create — transitions: Pending → InProgress → Completed | Cancelled
string
inspectionDate
Scheduled inspection date
string format: date-time
notes
Inspection notes
string
photos
Array of photo objects
Array
pdfReportUrl
PDF report URL
string
createdAt
required
Creation timestamp
string format: date-time
Examples
Examplesuccess
{ "success": true, "data": { "id": "clx1insp0001a2b3c4d5e6f", "orderId": "cmosor2zy000313ny24hgtfy0", "inspectorId": "clx1def4500001a2b3c4d5e6f", "status": "Pending", "inspectionDate": "2026-05-20T10:00:00.000Z", "notes": "Check undercarriage for rust damage", "photos": [], "pdfReportUrl": null, "createdAt": "2026-05-03T08: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}Headers
Section titled “Headers”Retry-After
integer
Seconds to wait before retrying
