1. Authentication (getting a token)
Obtain a token before querying slips; the token is valid for 30 days and is sent in the Authorization header with every request.
POST {base_url}/api/v1/account/authenticate
| Field | Type | Required | Description |
|---|---|---|---|
username | text | Yes | Service username provided to you |
password | text | Yes | User password |
company | text | Yes | Company code (e.g. DBH-TEST) |
country | text | Yes | Country code (e.g. TR) |
Example request:
{
"username": "servis_kullanici",
"password": "********",
"company": "DBH-TEST",
"country": "TR"
}
Example response:
{
"success": true,
"message": "New Token",
"info": { "company": "DBH-TEST", "country": "TR" },
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expired": "2026-12-18 13:45:00",
"expires_in": "2591999.5"
},
"count": 0
}
| Response field | Description |
|---|---|
data.token | Token to use in subsequent requests |
data.expired | Time the token expires (UTC) |
data.expires_in | Remaining time, in seconds |
Send the token with every subsequent request in this header (the Bearer prefix is optional): Authorization: Bearer <token>. Copy the token without quotation marks; if a " remains at the start or end, the request is rejected with 401.