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:
- Create an API token in the TMS (Custom Link dialog → Api Tokens).
- Exchange it for a short-lived access token at
POST /account/login-api-token. - Send
Authorization: Bearer ACCESS_TOKENon every Driver API call.
One driver/operator at a time
Section titled “One driver/operator at a time”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.
Retrieve tasks for one operator
Section titled “Retrieve tasks for one operator”BASE="https://<your-client-name>.api.mendrix.cloud/api"API_TOKEN="$MENDRIX_API_TOKEN" # never hard-code secretsOPERATOR_ID="104" # the operator/driver you want
# 1. Log in with the API tokenACCESS_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 taskscurl "$BASE/driver-api/tasks/?operatorId=$OPERATOR_ID" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Accept: application/json"- API credentials (Set node or n8n credential) — store your API token.
- Login (HTTP Request node) —
POST {{BASE}}/account/login-api-tokenwith{ "token": "..." }, extractdata.items[0].access. - Get tasks (HTTP Request node) —
GET {{BASE}}/driver-api/tasks/with query parameteroperatorIdset to the driver you want, and headerAuthorization: Bearer {{ $json.access }}.
Next steps
Section titled “Next steps”- Browse every endpoint in the interactive reference
— rides, goods, tracking positions, chat, packaging, and questionnaires
all follow the same auth and
operatorIdpattern. - See Authentication for token lifetime, revocation, and refresh.