curl -X POST -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
https://apitest.tunimobile.com/v1/session/
{
"status": "success",
"code": 200,
"message": "OK",
"data": {
"id": 501,
"startAt": "2026-10-28 08:00:00",
"endAt": "2026-10-28 18:30:12",
"terminal": "88 - N/A",
"byOperator": { "orange": 45, "tt": 20, "ooredoo": 10, "total": 75 },
"byValue": { "5dt": 12, "1dt": 15, "total": 27 },
"byValueAndOperator": [
{ "operator": "orange", "value": 5, "total": 9 },
{ "operator": "tt", "value": 1, "total": 20 }
],
"logo": "https://api.tunimobile.com/images/avatars_bw/123.png"
}
}
Sales sessions
Open / close a sales session
Close the terminal’s current session, get its summary, and open a new one.
curl -X POST -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
https://apitest.tunimobile.com/v1/session/
{
"status": "success",
"code": 200,
"message": "OK",
"data": {
"id": 501,
"startAt": "2026-10-28 08:00:00",
"endAt": "2026-10-28 18:30:12",
"terminal": "88 - N/A",
"byOperator": { "orange": 45, "tt": 20, "ooredoo": 10, "total": 75 },
"byValue": { "5dt": 12, "1dt": 15, "total": 27 },
"byValueAndOperator": [
{ "operator": "orange", "value": 5, "total": 9 },
{ "operator": "tt", "value": 1, "total": 20 }
],
"logo": "https://api.tunimobile.com/images/avatars_bw/123.png"
}
}
A session groups the vouchers sold by one terminal over a period (for example one shift or one day). A terminal always has one open session: the first one is created when the terminal is registered.
This call closes the current session, returns its summary, and opens a new one. Use it for the end-of-shift report.
No body. Mind the trailing slash in the path:
/session/.Headers
string
required
The terminal API key.
Response
201: summary of the session that was just closed (empty array [] if there was none).
integer
Session id.
string
Session start.
string
Session end.
string
Terminal id and name.
object
Sales amount in TND per operator, at the shop’s selling prices, and
total.object
Number of vouchers sold per value (
1dt, 5dt) and total.object[]
Number of vouchers per operator and value.
string
Shop logo to print on the report.
Errors
| HTTP | error.details | Meaning |
|---|---|---|
404 | Terminal not found | api-key header missing or unknown |
curl -X POST -H "api-key: 6f1c2a9e-4b7d-4e0a-9c55-2d8f3b1a7e10" \
https://apitest.tunimobile.com/v1/session/
{
"status": "success",
"code": 200,
"message": "OK",
"data": {
"id": 501,
"startAt": "2026-10-28 08:00:00",
"endAt": "2026-10-28 18:30:12",
"terminal": "88 - N/A",
"byOperator": { "orange": 45, "tt": 20, "ooredoo": 10, "total": 75 },
"byValue": { "5dt": 12, "1dt": 15, "total": 27 },
"byValueAndOperator": [
{ "operator": "orange", "value": 5, "total": 9 },
{ "operator": "tt", "value": 1, "total": 20 }
],
"logo": "https://api.tunimobile.com/images/avatars_bw/123.png"
}
}