Skip to content

Getting started with Driver API

Driver API uses the same API-token exchange as the rest of the MendriX REST API — if you’ve already set up authentication for another integration, you can reuse the same token and login flow here. See Authentication for the full flow; the short version:

  1. Create an API token in the TMS (Custom Link dialog → Api Tokens).
  2. Exchange it for a short-lived access token at POST /account/login-api-token.
  3. Send Authorization: Bearer ACCESS_TOKEN on every Driver API call.

An API token is scoped to your administration/client data as a whole, not to any single driver — it has no built-in notion of “which driver.” Most Driver API endpoints (tasks, planning, rides) return data for one operator, selected with an operatorId query parameter.

Terminal window
BASE="https://<your-client-name>.api.mendrix.cloud/api"
API_TOKEN="$MENDRIX_API_TOKEN" # never hard-code secrets
OPERATOR_ID="104" # the operator/driver you want
# 1. Log in with the API token
ACCESS_TOKEN=$(curl -s -X POST "$BASE/account/login-api-token" \
-H "Content-Type: application/json" \
-d "{\"token\": \"$API_TOKEN\"}" \
| jq -r '.data.items[0].access')
# 2. Retrieve this operator's planned tasks
curl "$BASE/driver-api/tasks/?operatorId=$OPERATOR_ID" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Accept: application/json"
  • Browse every endpoint in the interactive reference — rides, goods, tracking positions, chat, packaging, and questionnaires all follow the same auth and operatorId pattern.
  • See Authentication for token lifetime, revocation, and refresh.