Credentials upload¶
Set or change your own insurer accounts (username, password, codes) yourself, without sending them to us.
Prerequisites
- A valid bearer token, as for every other call. See Getting started.
- Your client needs the role
credentials:manage. Ask Support to enable it. Without it you get403.
- You change only your own client's credentials.
- You can change the insurers you already have. To add a new insurer, contact Support.
- Answers never contain values, only key names and whether each one is set.
The steps¶
GETto see each insurer's keys and their state.PUTonce per insurer, with the whole block.PATCHlater, to change only some keys.- Changes reach your next calls within about 20 seconds. Check with Health checks.
1. See what is set¶
curl -s "https://api.insurancegateway.gr/clients/me/credentials" \
-H "Authorization: Bearer $TOKEN"
{
"clientId": "your-client-id",
"providers": [
{
"provider": "Apeiron",
"keys": [
{ "key": "Password", "status": "set" },
{ "key": "Username", "status": "set" }
],
"unknownKeys": [],
"valid": true,
"problems": [],
"fullUploadDone": false
}
],
"availableProviders": [ "Allianz", "...", "Ydrogeios" ]
}
| Field | Meaning |
|---|---|
keys |
Every key this insurer accepts. status: set (has a value), empty (present without a value), missing (absent) |
unknownKeys |
Keys in your block that this insurer does not use. Your next PUT removes them |
valid |
false = the insurer will reject your calls until the settings in problems are filled in; null = not checked |
fullUploadDone |
true once you have sent the whole block with PUT. Until then, PATCH is refused |
The example key names above are only an illustration: each insurer has its own. Always use the
names that GET lists for that insurer.
2. Send the whole block (PUT)¶
curl -s -X PUT "https://api.insurancegateway.gr/clients/me/credentials/apeiron" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "Username": "my-user", "Password": "my-password" }'
- The body is flat JSON: one key, one text value.
- It replaces the whole block for that insurer. A key you leave out is removed, so send every key you need. Other insurers do not change.
- For nested keys use
__, e.g.Users__TPL__Password. - Before saving, we run the same check as every call. If it fails, nothing changes and you
get
400withinvalidSettings(setting names only).
3. Change only some keys (PATCH)¶
Only after your own PUT for that insurer (fullUploadDone: true).
curl -s -X PATCH "https://api.insurancegateway.gr/clients/me/credentials/apeiron" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{ "Password": "my-new-password" }'
- Only the keys you send change; the rest stay. An empty value (
"") blanks a key. - Same keys, limits and check as
PUT. - If you have not sent the whole block, or it was changed on our side since, you get
409and nothing changes. Send the whole block withPUTagain. This keeps your new password from ending up next to a username that is not yours.
Removing an insurer¶
There is no DELETE, on purpose: you could not restore a block you removed. Contact
Support.
Limits¶
- 1 to 64 keys per call, each value up to 1,024 characters, body up to 16 KB.
- No line breaks or other control characters in values.
- Server addresses (URLs) cannot be uploaded: we set them.
- 10 calls per minute.
Errors¶
| Status | category |
Meaning |
|---|---|---|
400 |
client_credentials_invalid_request |
Unknown insurer or key, or a value not accepted (errors names the key) |
400 |
client_credentials_invalid |
The credentials fail the check (invalidSettings); nothing was saved |
403 |
client_credentials_forbidden |
Your client lacks the role credentials:manage |
404 |
client_credentials_file_not_found |
No credentials file opened for your client yet; contact Support |
404 |
client_credentials_provider_not_configured |
No block for that insurer; contact Support to add it |
409 |
client_credentials_full_upload_required |
PATCH before a full PUT, or after a change on our side; send the whole block with PUT |
413 |
client_credentials_body_too_large |
Body over 16 KB |
429 |
— | More than 10 calls a minute; wait and retry |
503 |
client_credentials_store_busy / client_credentials_store_unavailable |
Temporary problem; retry shortly |
Full route details: Interactive docs.