Skip to main content

Base URL

Every path in this documentation is relative to the base URL of the environment: Example: Log in on test is POST https://apitest.tunimobile.com/v1/login_check.

Request format

  • All endpoints use POST, except Log out, which uses GET.
  • Send the body as JSON with Content-Type: application/json.
  • Several endpoints are action endpoints (/user/do_action, /terminal/do_action, /voucher/do_action). The action field in the body picks the operation.

Response format

Most responses are wrapped in the same envelope.
Rely on the HTTP status code of the response. In the success envelope, code is always 200, even when the HTTP status is 201 Created.
  • On errors, error.details holds a short message: sometimes a code like voucher_not_found, sometimes a French sentence meant for display, like Solde de la boutique insuffisant. See the error reference.
  • Exceptions: login, token refresh and authentication errors (expired or invalid token) are not wrapped. They return a flat object such as {"code": 401, "message": "Invalid credentials."}.