REST API overview
Every endpoint of the TOVR REST API under /api/v1 with its scope, the order in which a request is checked, the list envelope and pagination, ids, and the parameters of the read-only resources, pricing and market endpoints.
The TOVR REST API is versioned under /api/v1 and authenticated with an OAuth 2.0
client-credentials bearer token. Its OpenAPI document is generated from the schemas the routes
validate against.
| Environment | Base URL |
|---|---|
| Production | https://tovr.eu/api/v1 |
| Staging | https://staging.tovr.eu/api/v1 |
Endpoints
| Resource | Method and path | Scope | Reference |
|---|---|---|---|
| Token | POST /oauth2/token | none | Authentication |
| Shipments | POST /shipments, PATCH /shipments/{id} | shipments:write | Shipments |
GET /shipments, GET /shipments/{id} | shipments:read | ||
| Invoices | GET /invoices, GET /invoices/{id} | invoices:read | Invoices |
| Chains | GET /chains, GET /chains/{id} | chains:read | below |
| Vehicles | GET /vehicles, GET /vehicles/{id}, GET /vehicles/{id}/availabilities | vehicles:read | below |
| Matches | GET /matches, GET /matches/{id} | matches:read | below |
| Quotes | GET /quotes, GET /quotes/{id} | quotes:read | below |
| Outreach | GET /outreach, GET /outreach/{id} | outreach:read | below |
| Change feed | GET /events | events:read | Change feed |
GET /events/stream | events:stream | ||
| Webhook endpoints | GET /webhook_endpoints, GET /webhook_endpoints/{id} | webhooks:read | Webhooks |
POST /webhook_endpoints, PATCH /webhook_endpoints/{id}, DELETE /webhook_endpoints/{id}, POST /webhook_endpoints/{id}/rotate_secret | webhooks:write | ||
| Pricing | POST /estimate, POST /estimate/batch | estimate | below |
| Market | GET /market/overview | market | below |
The only writes are shipments and webhook endpoints. There are no endpoints for carriers, shippers or a company directory, and none that create or change chains, vehicles, matches, quotes, outreach or invoices. Client applications are managed in Settings → Developer, not over the API.
How a request is checked
| Step | Refusal |
|---|---|
| 1. Bearer token: signature, expiry, revocation, client application active | 401 missing_credentials, invalid_token, expired_token |
| 2. Scope of the endpoint | 403 insufficient_scope |
| 3. Rate limit, then monthly quota, of the client application | 429 rate_limited, 402 quota_exceeded |
| 4. Path parameters, query, body | 422 validation_failed |
| 5. Webhook subscriptions: the read scope of each event type | 403 insufficient_scope |
6. Idempotency-Key, on POST, PATCH and DELETE | 400 (too long), 409 idempotency_key_reuse |
| 7. The handler, in a transaction when it writes | 404, 409, 422, 500, 503 per endpoint |
Steps 1 and 2 do not count against the limits and their responses carry no rate-limit headers.
Every response carries X-Request-Id. Rate-limit headers, quota and idempotency are specified in
API conventions. Error bodies are in
Errors.
Lists and pagination
Every collection answers the same envelope. GET /webhook_endpoints and
GET /vehicles/{id}/availabilities leave out next_cursor.
{ "object": "list", "data": [], "has_more": false, "next_cursor": null }| Collection | limit default / max | sort | Filters | Cursor parameter |
|---|---|---|---|---|
GET /shipments | 25 / 100 | created_at, pickup_at | status, availability, platform | cursor |
GET /invoices | 25 / 100 | issued_at | external_ref | cursor |
GET /chains | 25 / 100 | created_at | — | cursor |
GET /vehicles | 25 / 100 | created_at | — | cursor |
GET /matches | 25 / 100 | created_at | — | cursor |
GET /quotes | 25 / 100 | created_at | status | cursor |
GET /outreach | 25 / 100 | created_at | chain_id | cursor |
GET /events | 50 / 100 | recorded order | type | after |
GET /webhook_endpoints | 50 / 100 | newest first | — | none |
GET /vehicles/{id}/availabilities | all windows | — | — | none |
| Rule | Value |
|---|---|
| Query parameters | Strict. An unknown parameter or an unknown filter value is 422 validation_failed. |
| Filters | Comma lists, for example ?status=incoming_order,confirmed. Each value is validated. |
next_cursor | null on the last page, except on GET /events, where it is never null |
| Cursor | Opaque and signed. Valid only with the sort it was issued for. A tampered or mismatched cursor is 422 invalid_cursor. |
Ids
Ids are a type prefix and a uuid. Path parameters accept the prefixed id. All except the webhook endpoint paths also accept the bare uuid.
| Prefix | Object | Prefix | Object |
|---|---|---|---|
shp_ | shipment | mch_ | match |
stp_ | stop | qte_ | quote |
seg_ | route segment | otr_ | outreach event |
cgi_ | cargo item | inv_ | invoice record |
evt_ | tracking event | aev_ | change-feed event |
chn_ | chain | whe_ | webhook endpoint |
veh_ | vehicle | vav_ | vehicle availability |
GET /shipments list rows are the exception: shipment_id is the bare uuid.
Read-only resources
The object fields are listed in Domain model.
Chains
GET /chains lists the freight chains your organization owns or was awarded; own_role is
owner, awarded or both. List rows have shipment_ids and stops set to null. Read one
chain with GET /chains/{id} to get them.
Vehicles
GET /vehicles lists your own fleet and the trucks published on the market; ownership is own
or market. GET /vehicles/{id}/availabilities returns the vehicle's availability windows in
one response, without a cursor.
Matches
GET /matches lists pairings between two shipments where your organization owns either side.
own_side is origin, match or both. A match carries the two shipment ids. Read the
shipments through GET /shipments/{id}.
Quotes
GET /quotes lists carrier bids where your organization is the bidder or
the shipper; own_role is bidder, shipper or both. Filter with status, a comma list of
PENDING, ACTIVE, ACCEPTED, REJECTED, WITHDRAWN, EXPIRED, SUBMITTED, AWARDED,
COUNTER_OFFER.
Outreach
GET /outreach lists outreach interactions: when, which channel, which direction, what kind and,
for calls, the duration and outcome. It contains no message text and no names. ?chain_id=
limits it to one chain.
Pricing
POST /estimate prices one lane from TOVR's market price data. Neither pricing endpoint writes
anything, and both ignore Idempotency-Key.
| Field | Required | Value |
|---|---|---|
loading_country, unloading_country | yes | Exactly 2 characters. Send upper-case ISO 3166-1 alpha-2 |
distance_km | yes | Number greater than 0 |
loading_postal_code, unloading_postal_code | no | Postal codes, for a closer match |
curl -X POST https://tovr.eu/api/v1/estimate \
-H "Authorization: Bearer $TOVR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "loading_country": "BG", "loading_postal_code": "1839", "unloading_country": "DE", "unloading_postal_code": "80807", "distance_km": 1290 }'| Response field | Value |
|---|---|
estimated_price_eur, estimated_price_per_km | The estimate, in EUR |
p25_price_per_km, median_price_per_km, p75_price_per_km | The observed price band, EUR per km |
observation_count, data_freshness_hours | How much data, and how recent |
match_level | exact, reverse, postal_prefix, country_pair, none |
confidence_score, quality_status | quality_status is HIGH, MEDIUM, LOW or INSUFFICIENT_DATA |
A lane without enough data is 422 insufficient_market_data. When the pricing service is not
configured for the environment the answer is 503 service_unavailable. When it is configured but
fails, times out (15 s for one lane, 30 s for a batch) or returns an unexpected body, the answer
is 500 internal_error.
POST /estimate/batch takes {"items": [{"index": 0, "request": {…}}, …]} with up to 500 items
and answers {"results": [{"index", "result"} | {"index", "error"}]}. An item without enough data
carries a result with quality_status: "INSUFFICIENT_DATA" and match_level: "none", not a
422, and the call is still 200. Every item is validated before the service is called, so a
valid request gets no error entries. See Batch estimate.
Market
GET /market/overview?period= returns totals for full truck loads over all, 30d, 90d or
180d (default 90 days):
total_observations, observations_this_period, active_corridors, avg_price_per_km_eur,
min_price_per_km_eur, max_price_per_km_eur, avg_quality_score, outlier_rate_percent,
zero_price_count, avg_data_freshness_hours, period, date_range_start, date_range_end,
generated_at.
Changes
Each change to the API is recorded, with what a client has to do, in
apps/web/lib/api/versions/.
Reference
The TOVR technical reference. The REST API under tovr.eu/api/v1, its authentication, errors, shipments, invoices, change feed and webhooks, the API objects, the factoring partner integration and the external integrations.
Authentication
The OAuth 2.0 client-credentials token endpoint of the TOVR REST API, its parameters, responses and rate limits, the bearer token it issues, the 401 error codes, and the scope catalog.