Developer documentation
Auth
Use the Auth API to obtain and refresh bearer tokens for API access.
Authentication is the process of verifying the identity of the user. All users connecting with the eWarehousing APIs must authenticate when making API requests.
Learn more
To learn more about how authentication works, visit the authentication page.
X-Wms-Code header (required for Auth)
All Auth endpoints require the X-Wms-Code header to route your request to the correct WMS.
The header name is case-insensitive; the server normalizes the value to uppercase.
If the header is missing, the API responds with 400 and the error message: Missing 'X-Wms-Code' header.
If the WMS code is unknown or disabled, the API responds with 400 and the error message: Invalid WMS.
For development/sandbox, use X-Wms-Code: DEV.
Request bearer token
/wms/auth/login/Request a bearer/access token
Request attributes
| Field | Description | Example value |
|---|---|---|
usernamestringRequired | API username. | |
passwordstringRequired | API password. |
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/auth/login/' \
-H 'Content-Type: application/json' \
--data-raw '{
"username": "",
"password": ""
}'{
"token": "your-new-token",
"iat": 1664975406,
"exp": 1664979006,
"refresh_token": "your-new-refresh-token"
}Refresh bearer token
/wms/auth/refresh/Refreshes your requested access token. A refresh token can only be used once.
Request attributes
| Field | Description | Example value |
|---|---|---|
refresh_tokenstringRequired | Refresh token returned by a previous login or refresh call. |
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/auth/refresh/' \
-H 'Content-Type: application/json' \
--data-raw '{
"refresh_token": "your-refresh-token"
}'{
"token": "your-new-token",
"iat": 1664975406,
"exp": 1664979006,
"refresh_token": "your-new-refresh-token"
}