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

POST/wms/auth/login/

Request a bearer/access token

Request attributes

FieldDescriptionExample value
username
stringRequired
API username.
password
stringRequired
API password.
Request examplecURL
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/auth/login/' \
            -H 'Content-Type: application/json' \
            --data-raw '{
                "username": "",
                "password": ""
            }'
Response exampleJSON
{
  "token": "your-new-token",
  "iat": 1664975406,
  "exp": 1664979006,
  "refresh_token": "your-new-refresh-token"
}

Refresh bearer token

POST/wms/auth/refresh/

Refreshes your requested access token. A refresh token can only be used once.

Request attributes

FieldDescriptionExample value
refresh_token
stringRequired
Refresh token returned by a previous login or refresh call.
Request examplecURL
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"
            }'
Response exampleJSON
{
  "token": "your-new-token",
  "iat": 1664975406,
  "exp": 1664979006,
  "refresh_token": "your-new-refresh-token"
}