Qargo Use case / Trip import API
Required api role: `API_TRIP`Purpose: This interface allows an external system (e.g. a route optimisation tool) to send fully planned trips into Qargo.When a trip payload arrives, Qargo creates or updates a trip with the specified stops, sequence, timestamps, and resource assignments — without manual planning.The trip import is the last step of a larger planning flow:1. The external system obtains the Qargo `id`s of the stops and resources to plan. Qargo can push this planning data to the external system (an optional export, configured per integration), or the external system fetches it via the API (e.g. orders and resources).2. The external system computes trips and assigns each one a `trip_identifier`.3. The external system pushes the planned trips to the trip import webhook.### Getting startedA trip import pushes stop sequences, resource assignments, and timing information into Qargo so that the planning board reflects the externally computed plan.The `trip_identifier` is used to determine whether an incoming trip is new or an update to an existing one:- **Create** — a new trip is created when a payload arrives with a `trip_identifier` that has not been seen before.- **Update** — if a payload arrives with a `trip_identifier` that already exists, Qargo updates the original trip rather than creating a new one.- **Cancel** — setting `status = 'CANCELLED'` will remove the trip. A trip must have been created before it can be cancelled.### Limitations- Stops must be referenced by their Qargo stop `id`. Location names, using location details or aliases are not supported.- Each stop must have a `sequence` value (starting from `0`) and a start/end timestamp. Missing either will cause the import to fail.- Resources can only be assigned by their Qargo resource `id` — not by license plate, name, or external reference.- All stops in the payload must be unplanned. Stops that are already assigned to another trip cannot be imported.- Trips are created automatically — there is no approval or review step before the trip appears on the planning board (unlike order import).- A cancelled trip cannot receive further updates. To re-import, use a new `trip_identifier`.- Stop timestamps must be logically consistent: the sequence order must match the chronological order, and a delivery stop cannot precede its corresponding pickup.- Trip import is asynchronous — the endpoint does not return trip data.- Splitting a trip into multiple trips is not supported via trip import - split the order first.- Each integration instance supports either webhook or EDI routing — not both simultaneously.
Qargo Use case / Trip import API is one of 26 APIs that Qargo publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Use case / Trip import. The published artifact set on APIs.io includes an OpenAPI specification and an API reference.
This API exposes 1 operation across 1 path, and defines 14 schemas. It is described by OpenAPI 3.1.0, at version 1.2.0.
Requests are made against a single base URL, https://api.qargo.com.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 2
Qargo Use case / Trip import API declares
2 security schemes
for authenticating requests.
It supports OAuth 2.0 (oAuth2ClientCredentials) using the clientCredentials flow.
It accepts HTTP basic authentication (BasicAuthWebhookCredentials).
Paths & Operations 1
Across 1 path, the API surfaces 1 operation — 1 POST. Each is listed below with its method, path, parameters, and response codes.
Required api role: APITRIP Purpose: This interface allows an external system (e.g. a route optimisation tool) to send fully planned trips into Qargo. When a trip payload arrives,…
Schemas 14
The contract defines 14 schemas that model the data the API accepts and returns. The most detailed are TripImportStop (8 properties), TripImportInput (7 properties), ValidationErrorDetail (4 properties), ValidationError (3 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Qargo 12
Other APIs Qargo publishes across the network.