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

codeMeaning
missing_api_keyNo X-API-Key header was sent.
invalid_api_keyThe key is unknown or revoked, or the account is disabled.

404 Not Found

codeMeaning
visa_type_not_foundNo visa type has this id.
order_not_foundNo order with this reference belongs to your account.
result_not_foundThe order has no result file with this id.

409 Conflict

codeMeaning
order_not_editableThe order is no longer a draft.
not_editable_itemThe order is action_required and the answer or document you tried to change is not in action_required.items.
option_unavailableThe visa option is no longer offered; create a new order for another one.
form_changedThe application form changed after the order was created; create a new order.
duplicate_client_referenceYou already have an order with this client_reference; details holds its reference.
idempotency_conflictThe Idempotency-Key was already used with a different request.
idempotency_in_progressA request with this Idempotency-Key is still running.

422 Unprocessable Entity

codeMeaning
validation_errorA parameter or body field is missing or malformed; details lists each problem.
unknown_countryA country code is not supported for that parameter.
visa_type_unavailableThe visa type is not offered for this traveller and destination.
option_not_foundThe option does not belong to the visa type.
invalid_answersSome answers are not valid; details lists each with its field key, a code and a message.
order_incompleteSubmit 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_requiredYour account has applicant emails switched on, so create needs applicant.email; details[0].field names it. See Applicant communication.
message_too_longA message is longer than 4000 characters.
upload_rejectedThe 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

codeMeaning
upstream_unavailableWe 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.