Visa APIv1

Forms and translations

Read an application form, its fields, conditions and uploads, in English, Azerbaijani or Russian.

GET /api/v1/visa-types/{visa_type_id}/forms?residency=... returns the application form for each option of a visa type: sections of typed fields, presented in the order given, and uploads, the files the traveller has to provide.

Answer formats

Submit each answer under the field's key, in the format its field_type expects:

field_typeAnswer format
TEXT, TEXTAREA, EMAIL, PHONEstring
DATEYYYY-MM-DD
NUMBERJSON number, such as 42 or 1.5
BOOLtrue or false
CHOICEone option code
MULTI_CHOICEarray of option codes, such as ["en", "ru"]
COUNTRYISO 3166-1 alpha-3, uppercase, such as AZE

Answers come back in the same formats on every order, and the values of a condition on a COUNTRY field are alpha-3 codes too. A malformed answer is refused with invalid_answers.

Keys

Well-known fields have a descriptive key such as surname; every other field's key is an opaque id. Keys do not change when the form is republished; they change only if the question itself is removed and added again.

Files are not part of sections: uploads lists the files to provide, and an upload's field_key names the question it belongs to.

Conditions

Fields and uploads can carry conditions, each tying them to another field's answer (field is that field's key). A condition holds only once the source field is answered.

actionEffect while the condition holds
SHOWThe field is shown; otherwise it is hidden and never required.
REQUIREThe field is required; otherwise it is optional.
ELIGIBLEThe traveller can apply; otherwise they cannot.
OperatorHolds when the answer…
EQequals the first of values
NEQdiffers from the first of values
IN, ANY, ALLis one of values
NOT_INis none of values

Translations

Catalog text (countries, visa types and forms) is available in English (en), Azerbaijani (az) and Russian (ru). Send the language you want in Accept-Language:

curl "$PLUSVISA_API_URL/api/v1/countries" \
  -H "X-API-Key: $PLUSVISA_API_KEY" -H "Accept-Language: az"
  • Any other value, or no header, gives English. An unsupported language is never an error.
  • Each catalog response has Content-Language, the language it is in.
  • Text that has no translation yet is returned in English.
  • Codes, keys, ids and condition values are the same in every language. Always answer with an option's code, never its label.
  • Order responses, error messages and text written by our team (action-required messages, messages) are not translated.
  • If you cache catalog responses, cache them per language.