TOVRReference

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.

EnvironmentBase URL
Productionhttps://tovr.eu/api/v1
Staginghttps://staging.tovr.eu/api/v1

Endpoints

ResourceMethod and pathScopeReference
TokenPOST /oauth2/tokennoneAuthentication
ShipmentsPOST /shipments, PATCH /shipments/{id}shipments:writeShipments
GET /shipments, GET /shipments/{id}shipments:read
InvoicesGET /invoices, GET /invoices/{id}invoices:readInvoices
ChainsGET /chains, GET /chains/{id}chains:readbelow
VehiclesGET /vehicles, GET /vehicles/{id}, GET /vehicles/{id}/availabilitiesvehicles:readbelow
MatchesGET /matches, GET /matches/{id}matches:readbelow
QuotesGET /quotes, GET /quotes/{id}quotes:readbelow
OutreachGET /outreach, GET /outreach/{id}outreach:readbelow
Change feedGET /eventsevents:readChange feed
GET /events/streamevents:stream
Webhook endpointsGET /webhook_endpoints, GET /webhook_endpoints/{id}webhooks:readWebhooks
POST /webhook_endpoints, PATCH /webhook_endpoints/{id}, DELETE /webhook_endpoints/{id}, POST /webhook_endpoints/{id}/rotate_secretwebhooks:write
PricingPOST /estimate, POST /estimate/batchestimatebelow
MarketGET /market/overviewmarketbelow

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

StepRefusal
1. Bearer token: signature, expiry, revocation, client application active401 missing_credentials, invalid_token, expired_token
2. Scope of the endpoint403 insufficient_scope
3. Rate limit, then monthly quota, of the client application429 rate_limited, 402 quota_exceeded
4. Path parameters, query, body422 validation_failed
5. Webhook subscriptions: the read scope of each event type403 insufficient_scope
6. Idempotency-Key, on POST, PATCH and DELETE400 (too long), 409 idempotency_key_reuse
7. The handler, in a transaction when it writes404, 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 }
Collectionlimit default / maxsortFiltersCursor parameter
GET /shipments25 / 100created_at, pickup_atstatus, availability, platformcursor
GET /invoices25 / 100issued_atexternal_refcursor
GET /chains25 / 100created_at—cursor
GET /vehicles25 / 100created_at—cursor
GET /matches25 / 100created_at—cursor
GET /quotes25 / 100created_atstatuscursor
GET /outreach25 / 100created_atchain_idcursor
GET /events50 / 100recorded ordertypeafter
GET /webhook_endpoints50 / 100newest first—none
GET /vehicles/{id}/availabilitiesall windows——none
RuleValue
Query parametersStrict. An unknown parameter or an unknown filter value is 422 validation_failed.
FiltersComma lists, for example ?status=incoming_order,confirmed. Each value is validated.
next_cursornull on the last page, except on GET /events, where it is never null
CursorOpaque 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.

PrefixObjectPrefixObject
shp_shipmentmch_match
stp_stopqte_quote
seg_route segmentotr_outreach event
cgi_cargo iteminv_invoice record
evt_tracking eventaev_change-feed event
chn_chainwhe_webhook endpoint
veh_vehiclevav_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.

FieldRequiredValue
loading_country, unloading_countryyesExactly 2 characters. Send upper-case ISO 3166-1 alpha-2
distance_kmyesNumber greater than 0
loading_postal_code, unloading_postal_codenoPostal 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 fieldValue
estimated_price_eur, estimated_price_per_kmThe estimate, in EUR
p25_price_per_km, median_price_per_km, p75_price_per_kmThe observed price band, EUR per km
observation_count, data_freshness_hoursHow much data, and how recent
match_levelexact, reverse, postal_prefix, country_pair, none
confidence_score, quality_statusquality_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/.

On this page