Setup guide
This guide is structured as a compact API reference for the first steps of a Routix integration: obtaining credentials, requesting a token, and testing an endpoint.
User level: Advanced
API root endpoint
https://api.routix.com/v1Most integrations start with these two URL patterns:
- OAuth token:
https://api.routix.com/v1/oauth/token - API proxy:
https://api.routix.com/v1/{scopeId}/{resource}
What you need
- A Routix account with admin or owner access.
- At least one branch configured in your organization.
- A server or application that will consume the API.
| Value | Where to find it | Required for |
|---|---|---|
client_id | Settings -> OAuth Apps | Requesting tokens |
client_secret | When creating the app | Requesting tokens |
organizationId | Settings -> Organization | Organization-scoped API calls |
branchId | Settings -> Branches | Branch-scoped API calls |
scope | Configured on the OAuth app | Accessing resources |
Step 1: Register an OAuth app
Before making API calls, create an OAuth app in the dashboard.
- Log in to Routix at
app.routix.com. - Go to
Settings -> OAuth Apps. - Click
Create App. - Fill in the form.
| Field | Required | Description | Example |
|---|---|---|---|
| Name | Yes | Descriptive name for your integration | My ERP Sync |
| Description | No | What the integration does | Syncs accounts from Routix to our ERP |
| Homepage URL | No | Your application website | https://myerp.com |
| Scopes | Yes | Permissions your app needs | routix:accounts:read |
| Branch restrictions | No | Limit access to specific branches | Leave empty for all branches |
- Click
Save. - Copy the client secret immediately. It is shown only once.
Important: store the client_secret in a secrets manager.
Step 2: Find your scope UUIDs
Every API call requires the correct scope UUID for the target resource.
- Go to
Settings -> Organizationto find your organization UUID, for example123e4567-e89b-12d3-a456-426614174000. - Go to
Settings -> Branchesto find your branch UUID, for example550e8400-e29b-41d4-a716-446655440000. - Use the organization UUID for
branches,organizations,users, andmaster_data. - Use the branch UUID for branch-scoped resources such as
accounts,projects, andshipments.
Call 1: Request an access token
Use this call to obtain a machine-to-machine token for your integration.
| Property | Value |
|---|---|
| Method | POST |
| Endpoint | /v1/oauth/token |
| Authentication | No bearer token required |
| Content-Type | application/json |
| Flow | client_credentials |
Use the client credentials flow for your integration:
curl -X POST https://api.routix.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "routix_a1b2c3d4..."
}'Request body:
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | string | Yes | Always client_credentials |
client_id | string | Yes | Public identifier of your OAuth app |
client_secret | string | Yes | Secret for your OAuth app |
Example response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer",
"expires_in": 3600,
"scope": "routix:accounts:read routix:accounts:write",
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"branch_ids": ["550e8400-e29b-41d4-a716-446655440000"]
}Key response fields:
| Field | Description |
|---|---|
access_token | Bearer token for subsequent API calls |
expires_in | Validity in seconds, usually 3600 |
scope | Space-separated list of granted scopes |
branch_ids | Branch UUIDs linked to the app |
Common errors:
| Error | Meaning | Action |
|---|---|---|
invalid_client | client_id or client_secret is incorrect | Verify credentials |
invalid_scope | Requested scopes are not allowed | Update the OAuth app configuration |
429 | Too many token requests | Add retry with backoff |
Call 2: Test your token with an API request
Use your new token immediately on a read endpoint to confirm authentication, scope, and branch access are correct.
| Property | Value |
|---|---|
| Method | GET |
| Endpoint | /v1/{branchId}/accounts |
| Authentication | Authorization: Bearer <access_token> |
| Required scope | routix:accounts:read |
With your token and branch UUID, make a request:
curl -X GET "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/accounts?limit=5" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of records per page |
offset | integer | 0 | Pagination offset |
Example response:
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"company_name": "Acme Transport B.V.",
"email": "[email protected]",
"phone": "+31 20 123 4567",
"account_type": "customer",
"status": "active"
}
],
"pagination": {
"limit": 5,
"offset": 0,
"total": 1
},
"version": "v1"
}Validation check:
200 OK: token, scope, and branch UUID are correct.401 invalid_token: request a new token.403 insufficient_scope: addroutix:accounts:readto the app.404 branch_not_found: verify the branch UUID.
Manage app status
Revoke
To block an app from requesting new tokens:
- In the dashboard:
OAuth Apps -> Your App -> Revoke - Via API: update the status to
revokedon theoauth_appsresource
Revoking an app prevents new token requests, while existing tokens remain valid until they expire.
Reactivate
To re-enable a revoked app:
- In the dashboard:
OAuth Apps -> Your App -> Activate - Via API: update the status to
active
Revoking an app prevents new token requests, while existing tokens remain valid until they expire.
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
401 invalid_token | Token expired or malformed | Request a new token. |
403 invalid_token_type | Using a regular user token | Use the OAuth token endpoint. |
403 insufficient_scope | Missing required scope | Update allowed_scopes or request the right scopes. |
404 branch_not_found | Invalid branch UUID | Verify the branch UUID in Settings -> Branches. |
403 branch access denied | App is restricted to other branches | Update allowed_branch_ids or use an allowed branch. |
invalid_client | Wrong client_id or secret | Verify credentials. |
Available scopes reference
| Scope | Description |
|---|---|
| routix:accounts:read | Read accounts, including customers, vendors, and carriers. |
| routix:accounts:write | Create and update accounts. |
| routix:orders:read | Read orders. |
| routix:orders:write | Create and update orders. |
| routix:projects:write | Update projects. |
| routix:shipments:write | Update shipments. |
| routix:trips:write | Update trips. |
| routix:vehicles:read | Read vehicles. |
| routix:vehicles:write | Create and update vehicles. |
| routix:items:write | Update items. |
| routix:tariffs:write | Update tariffs. |
| routix:zones:write | Update zones. |
| routix:quotations:write | Update quotations. |
| routix:staff:read | Read staff members. |
| routix:equipment:read | Read equipment. |
| routix:planning:read | Read planning and route data. |
| routix:invoices:read | Read invoices. |
| routix:invoices:write | Create and update invoices. |
Integration checklist
- Register an OAuth app in Routix.
- Store
client_idandclient_secretsecurely. - Implement token acquisition with the client credentials flow.
- Handle token expiry by requesting a new token.
- Use the correct branch UUID in API URLs.
- Request only the scopes your app needs.
- Handle error responses such as
401,403,404, and429. - Test with
v1for stable field contracts.
Related pages
- API integration
- API calls & examples

