Errors
Every error, on every endpoint, has the same shape:
{ "error": { "code": "validation_failed", "message": "The request is not valid", "requestId": "req_01937e2b4c5d6e7f8091a2b3c4d5e6f7", "details": { "issues": [{ "path": "quantity", "message": "Too many decimals for this investment" }] } }}codeis stable and machine-readable. Switch on it.messageis for people and may change. Never parse it.requestIdidentifies the request in IDEALX’s logs. Log it, and quote it when you contact support.detailsis optional and depends on the code:issuesfor validation,audienceorscopefor a refused key,checksfor a blocked proposal,from/tofor a state change that is not allowed.
Handling
Section titled “Handling”| Status | What to do |
|---|---|
400 |
Fix the request (an id of the wrong kind, a bad Idempotency-Key). Do not retry as is. |
401 |
The key is missing, revoked, expired or from the other environment. Stop and alert someone. |
403 |
The key lacks a scope, is the wrong kind of key, or the action is never possible with a key. Read details. |
404 |
It does not exist, or the key may not see it (another person’s account, a portfolio outside the mandate). |
409 |
Not possible in its current state (not enough cash, an order already filled, a check blocks a proposal). Read the state again before deciding. |
422 |
A field is missing or wrong; details.issues lists each with its path. |
429 |
Too many requests. Wait Retry-After seconds. |
5xx |
IDEALX’s side. Retry with backoff and the same Idempotency-Key. |
The full list of codes, with examples, is in the error catalogue.