Login
Get a bearer token for Market sync to HAAT.
POST
/api/auth/loginRate Limiting: If you send too many requests in a short time, you will receive a 429 Too Many Requests response.
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…
This login call itself does not need that header. Send the returned token on Sync products.
REQUEST BODY SCHEMA: application/json
usernamerequiredpasswordrequiredRESPONSE BODY SCHEMA: application/json
tokennameimageServersmallImageServerimagesServerResponses
200 — Successfully retrieved access token
200 — Successfully retrieved access token
Returns token. Use it as Authorization: Bearer <token> on sync calls.
401 — Invalid username or password
401 — Invalid username or password
Wrong credentials. Check staging values first.
Request example
cURL
bashcurl -X POST http://ext-integration.haat-delivery.io/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"pos.test","password":"your-password"}'Response example
200
json{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"name": "Test POS",
"imagesServer": "https://im-staging.haat.delivery"
}401
json{
"message": "Invalid username or password"
}