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

FieldTypeRequiredDescription
usernametextYesService username provided to you
passwordtextYesUser password
companytextYesCompany code (e.g. DBH-TEST)
countrytextYesCountry 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 fieldDescription
data.tokenToken to use in subsequent requests
data.expiredTime the token expires (UTC)
data.expires_inRemaining 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.