API REFERENCE

Driver order evidence

POST/api/v1/driver/orders/{order}/evidence

Driver session/own published assignment and active-order invariants enforced transactionally. Start uses current published eligibility even if draft unscheduling released booking capacity. Actual times derive from driver actions only. Required evidence must exist before completion; custom-field snapshot controls visibility/editing. Unable-to-complete requires nonempty free-text reason and advances the next eligible order.

Authentication

Requires a driver bearer session. Administrator sessions and integration keys cannot perform this driver action.

Parameters

ParameterInTypeDescription
orderRequiredpathstring

Request

FieldTypeDescription & constraints
kindRequiredphoto | signaturePhoto or customer signature evidence.
content_typeRequiredimage/png | image/jpeg | image/webpMIME type of the image bytes.
bytesRequiredarray<integer>Numeric byte array containing an actual supported image; not a base64 string.

Example JSON body

{
  "kind": "photo",
  "content_type": "image/png",
  "bytes": [
    137,
    80,
    78,
    71,
    13,
    10,
    26,
    10,
    0,
    0,
    0,
    13,
    73,
    72,
    68,
    82,
    0,
    0,
    0,
    1,
    0,
    0,
    0,
    1,
    8,
    4,
    0,
    0,
    0,
    181,
    28,
    12,
    2,
    0,
    0,
    0,
    11,
    73,
    68,
    65,
    84,
    120,
    218,
    99,
    252,
    255,
    31,
    0,
    3,
    3,
    2,
    0,
    239,
    154,
    233,
    119,
    0,
    0,
    0,
    0,
    73,
    69,
    78,
    68,
    174,
    66,
    96,
    130
  ]
}
Request schema
{
  "$ref": "#/components/schemas/EvidenceUpload"
}

Example request

Replace synthetic identifiers and credentials. Example dates, coordinates, revisions, and IDs are not production defaults. Read the workflow guide before making a write.

curl --request POST 'https://route-api.okok.space/api/v1/driver/orders/job-1001/evidence' \
  --header 'Authorization: Bearer REPLACE_WITH_DRIVER_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"kind":"photo","content_type":"image/png","bytes":[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,4,0,0,0,181,28,12,2,0,0,0,11,73,68,65,84,120,218,99,252,255,31,0,3,3,2,0,239,154,233,119,0,0,0,0,73,69,78,68,174,66,96,130]}'

Responses

Examples illustrate the documented shape; optional fields and current state can differ. JSON extraction/body-limit errors may be plain text.

200 · Successful response

application/json

FieldTypeDescription & constraints
idstringIdentifier unique within its authorized business. Some create operations generate it when omitted.
created_atstringRFC3339 UTC instant or explicit offset; business wall times are resolved separately.Format: date-time
updated_atstringRFC3339 UTC instant or explicit offset; business wall times are resolved separately.Format: date-time
revisionintegerCurrent version used to detect stale edits or publication.
deleted_atstring | nullSystem-managed UTC soft-deletion instant; null for active records.Format: date-time
deleted_bystring | nullDeletion actor retained for history.Format: uuid
Illustrative response
{
  "id": "example-id",
  "created_at": "2026-11-02T09:00:00Z",
  "updated_at": "2026-11-02T09:00:00Z",
  "revision": 1,
  "deleted_at": "2026-11-02T09:00:00Z",
  "deleted_by": "11111111-1111-4111-8111-111111111111"
}
Response schema
{
  "$ref": "#/components/schemas/Record"
}

401 · Missing/invalid/revoked token

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unauthorized",
    "message": "Missing/invalid/revoked token"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

403 · Business membership or required API-key scope denied

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unauthorized",
    "message": "Business membership or required API-key scope denied"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

404 · Record not found in authorized business

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "not_found",
    "message": "Record not found in authorized business"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

409 · Duplicate identifier, stale revision, expired reservation, protected publication or unavailable capacity

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "conflict",
    "message": "Duplicate identifier, stale revision, expired reservation, protected publication or unavailable capacity"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

422 · Domain validation rejected the operation

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "validation",
    "message": "Domain validation rejected the operation"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}

503 · Required persistence, map/routing or other infrastructure unavailable

application/json

FieldTypeDescription & constraints
errorRequiredobjectResource-specific value; see the related workflow and schema.
error fields
FieldTypeDescription & constraints
error.codeRequiredvalidation | unauthorized | not_found | conflict | unavailable | rate_limitedPrivate activation or recovery code supplied to the driver.
error.messageRequiredstringResource-specific value; see the related workflow and schema.
Illustrative response
{
  "error": {
    "code": "unavailable",
    "message": "Required persistence, map/routing or other infrastructure unavailable"
  }
}
Response schema
{
  "$ref": "#/components/schemas/Error"
}
← All endpointsIntegration workflows →