Authentication
Log in once with an iotoms user's credentials, then send the token with every request.
The API uses bearer tokens. You get a token by logging in as an iotoms user of the
merchant you are integrating with, then send it in the Authorization header.
Use a dedicated user
Ask the merchant's administrator to create a user for your integration in the iotoms console (Admin → Users) and give its role only the features you need. Every call runs with that user's permissions.
1. Log in
Send the username and password, and the merchant's tenant code in X-TenantID.
curl -X POST 'https://beta.iotoms.com/api/v1/auth/authenticate' \
-H 'X-TenantID: <tenant-code>' \
-H 'Content-Type: application/json' \
-d '{
"username": "integration@example.com",
"password": "••••••••"
}'A successful login returns the token:
{
"token": "eyJ…"
}Unlike most endpoints, this response has no envelope — the token sits at the top level.
2. Call any endpoint
Send the token as a bearer token, together with the same tenant code:
curl 'https://beta.iotoms.com/api/v1/procurement/vendors?page=0&size=20' \
-H 'X-TenantID: <tenant-code>' \
-H 'Authorization: Bearer <token>'3. When the token stops working
Reuse the same token for all your calls. When a call returns 401 Unauthorized, log in again to get a fresh token and retry.
| Status | Meaning | What to do |
|---|---|---|
401 | Token missing, malformed or no longer valid | Log in again |
403 | The user's role does not have this feature | Ask the merchant's admin to grant it — see Permissions |
Trying calls in this reference
Every endpoint page has Try in Playground. Paste your token into the Authorization
field and your tenant code into X-TenantID, fill in the parameters and send — the request
goes to the beta environment and you see the live response.