APEXGuides

Get market prices from APEX

Price your own lanes with APEX through the TOVR REST API, one lane or 500 at a time, and find the places in TOVR that already show APEX prices.

APEX is internal, so you reach it through the TOVR REST API. This guide prices the Sofia → Munich lane, then many lanes at once, then reads the market overview.

Before you start: you need access to Settings → Developer, which an owner or admin of your organization has. For each lane you need the loading and unloading countries and the distance in km. Postal codes are optional but give a closer match.

  1. Open Settings, then Developer, and create a client application. Under Scopes, tick Price estimates (scope estimate), and Market analytics (scope market) if you want the market overview. The steps are in Create a client application. You see the client secret once.

  2. Exchange the client id and secret for a bearer token:

    curl -X POST https://tovr.eu/api/v1/oauth2/token \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials" \
      -d "client_id=$TOVR_CLIENT_ID" \
      -d "client_secret=$TOVR_CLIENT_SECRET"

    The response holds access_token, valid for 3,600 seconds.

  3. Ask for one lane's estimate:

    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": "1000", "unloading_country": "DE", "unloading_postal_code": "80331", "distance_km": 1050 }'

    A 200 returns the band and the total, for example a median of EUR 1.75 per km and an estimated_price_eur of 1837.5. The fields are in Estimate.

  4. Read match_level and quality_status before you use the number. A country_pair match with LOW quality is a rough reference, not a lane price. See Confidence and quality.

  5. To price many lanes, send up to 500 in one POST /api/v1/estimate/batch. Each item carries your own index, and the request counts as one against your limits. See Batch estimate.

  6. To see totals for the full-truck-load observations in the store, call GET /api/v1/market/overview?period=30d with a token that has the market scope. See Market analytics.

Prices you already see in TOVR

You do not need the API to use APEX inside TOVR. These places call it for you:

WhereWhat APEX supplies
The bid dialog on an exchange loadThe p25, median and p75 for the lane, combined with your cost floor into a recommended bid. See Pricing a bid.
A chain's economicsA market band for the chain's loaded distance. It is asked with countries only, so it is a country-pair band at best.
Shipments that arrive without a priceAn estimated freight rate, marked as estimated, with its confidence and match level.
fOSThe get_price_estimate tool. Its suggested_bid_eur is the p25 times the distance, a market floor reference rather than a selling price. See fOS.

When APEX has no data for a shipment's lane, TOVR prices it from distance bands instead, with confidence 0.1 and quality LOW, and asks APEX again every day at 03:30. When APEX cannot be reached, the shipment stays unpriced until the next sync.

Check that it worked

  • Step 3 returns 200 with a match_level other than none.
  • A batch returns one entry in results for each item you sent, with the same index.

If it doesn't work

ResponseCauseWhat to do
403 insufficient_scopeThe client application lacks the estimate or market scopeCreate a client application that has the scope.
422 validation_failedA country code is not two characters, distance_km is not positive, or the body has an unknown field such as distanceKmFix the field named in details.
422 insufficient_market_dataNo level had enough observationsAdd both postal codes, or accept that APEX cannot price the lane. details.estimate shows how far the search reached.
429 rate_limitedOver your plan's requests per minuteWait Retry-After seconds. Batch where you can.
402 quota_exceededOver your plan's requests per monthWait for the next month or change plan.
500 internal_errorOn an estimate: APEX did not answer in time, answered with an error, or returned an unexpected bodyRetry with backoff. Quote request_id if it persists.
503 service_unavailableOn an estimate: APEX is not configured for this environment. On the market overview: APEX is not configured or did not answer with a successRetry with backoff.

All codes are in Errors.

On this page