Pular para o conteúdo principal
Routal
API ReferenceStop

Create a service report

Marks a stop as completed, canceled or attempted, optionally attaching the proof of delivery.

POST
/v3/stop/{stop_id}/report

Marks a stop as completed, canceled or attempted, optionally attaching the proof of delivery.

Two body shapes are accepted:

  • application/json: send the report fields directly and attach proof-of-delivery images in images, each one a base64 data-URL. This is the shape to use from the API.
  • multipart/form-data: send the report fields JSON-encoded in report_params and the proof-of-delivery files as file_0...file_4, described by files_metadata. The Routal Planner web app uses this one.

Send either status (JSON) or report_params (multipart), never both.

Rules:

  • cancel_reason is a closed set of values and is rejected on a service_report_completed report. For a free-text motive use comments.
  • custom_fields keys are the custom_id of the project's custom fields, validated against the service_report_completed model for a completed report and service_report_canceled for a canceled or attempted one.
  • Custom fields the project marked as required for this report model must carry a value, or the request is rejected with highway.report.error.required_fields_missing naming the missing fields.
  • Attaching images requires the drivers.advanced_pod subscription item.
  • A stop accepts a single terminal report: a second completed or canceled report returns 400. Discard the existing one first with DELETE /v3/stop/{stop_id}/report/{report_id}.
  • service_report_attempted requires the stop's route to be in transit.
private_key<token>

Pass your API key as the private_key query string parameter. Generate and rotate keys in Developer Settings of your Routal workspace.

Keys stay server-side. Never ship them to a browser or mobile app.

In: query

Path Parameters

stop_id*string

The stop where the report will be made

Match^[0-9a-f]{24}

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v3/stop/string/report" \  -H "Content-Type: application/json" \  -d '{}'
"string"