FlexyAPI documentation

API documentation

Step 1 – Basic check

One request that confirms your token and your connection to the API are correct.

Before you go further, make sure your system talks to the API correctly. The check endpoint authenticates your token exactly like every other endpoint does: if the check passes, your token is correct.

curl https://provider-staging.flexy.gr/api/v1/health/auth/ \
  -H "Authorization: Bearer <token>"

Replace <token> with the staging token shown on your partner page.

Everything is correct

The API answers with HTTP 200:

{
  "health": {
    "status": "ok",
    "environment": "staging",
    "client": {
      "name": "Default API Key"
    }
  }
}
FieldMeaning
statusAlways ok: your token was accepted.
environmentThe environment that answered. For your tests it must be staging.
client.nameThe API key the token belongs to.

Something is wrong

Errors follow the error format. Find the row with the HTTP status and the errors[0].code you received:

HTTPcodeCauseWhat to do
401not_authenticatedThe request sent no token.Send the header Authorization: Bearer <token>.
401token_not_validThe token was not recognised: it was not copied in full, it belongs to another environment, or the key has been deactivated.Copy the staging token again and call the staging URL.
401authentication_failedWith detail equal to API call quota exceeded: your account has no calls left.Email us at [email protected].
403permission_deniedYou sent a user login token instead of the API token.Use the API token we sent you.
301—The URL does not end with /, so the answer is a redirect with no body.Call /api/v1/health/auth/ with the trailing slash.

Once you get 200, your connection is ready. Continue with step 2.