Visa APIv1
Errors and versioning
The error envelope, every error code, rate limits, and how the API changes.
Every error uses the same envelope. Branch on code; message is for humans and may change.
{
"error": {
"code": "visa_type_unavailable",
"message": "This visa type is not offered for the given citizenship, residency and destination.",
"details": null
}
}Error codes
401 Unauthorized
code | Meaning |
|---|---|
missing_api_key | No X-API-Key header was sent. |
invalid_api_key | The key is unknown or revoked, or the account is disabled. |
404 Not Found
code | Meaning |
|---|---|
visa_type_not_found | No visa type has this id. |
order_not_found | No order with this reference belongs to your account. |
result_not_found | The order has no result file with this id. |
409 Conflict
code | Meaning |
|---|---|
order_not_editable | The order is no longer a draft. |
not_editable_item | The order is action_required and the answer or document you tried to change is not in action_required.items. |
option_unavailable | The visa option is no longer offered; create a new order for another one. |
form_changed | The application form changed after the order was created; create a new order. |
duplicate_client_reference | You already have an order with this client_reference; details holds its reference. |
idempotency_conflict | The Idempotency-Key was already used with a different request. |
idempotency_in_progress | A request with this Idempotency-Key is still running. |
422 Unprocessable Entity
code | Meaning |
|---|---|
validation_error | A parameter or body field is missing or malformed; details lists each problem. |
unknown_country | A country code is not supported for that parameter. |
visa_type_unavailable | The visa type is not offered for this traveller and destination. |
option_not_found | The option does not belong to the visa type. |
invalid_answers | Some answers are not valid; details lists each with its field key, a code and a message. |
order_incomplete | Submit was refused because answers or documents are missing; details holds answers (as in missing; after an action_required request, a document you did not upload again appears with the code not_fixed) and documents (upload keys). |
applicant_email_required | Your account has applicant emails switched on, so create needs applicant.email; details[0].field names it. See Applicant communication. |
message_too_long | A message is longer than 4000 characters. |
upload_rejected | The file cannot be accepted; details[0].reason says why: unsupported_type, too_large, type_mismatch, file_too_small, image_too_small, image_too_large, unreadable_image or unreadable_pdf. |
503 Service Unavailable
code | Meaning |
|---|---|
upstream_unavailable | We could not reach the visa data right now. Retry after a short delay. |
An unknown path or an unsupported method returns http_404 or http_405 in the same envelope. The API reference lists which endpoint returns which code.
Rate limits
Requests may be rate-limited. If you receive 429 Too Many Requests, retry with exponential backoff, and honour a Retry-After header if one is present.
Versioning and changes
/api/v1 is stable. Changes that cannot break a working integration ship without notice: new endpoints, new optional parameters, new response fields, new error codes and new values in lists such as order statuses. Build your client to ignore fields it does not know and to handle an unfamiliar code or status gracefully.
A breaking change, such as removing a field or changing its meaning, comes with a new version in the path (/api/v2). We tell you before it ships, and /api/v1 is not changed underneath you.