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_type | Answer format |
|---|---|
TEXT, TEXTAREA, EMAIL, PHONE | string |
DATE | YYYY-MM-DD |
NUMBER | JSON number, such as 42 or 1.5 |
BOOL | true or false |
CHOICE | one option code |
MULTI_CHOICE | array of option codes, such as ["en", "ru"] |
COUNTRY | ISO 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.
action | Effect while the condition holds |
|---|---|
SHOW | The field is shown; otherwise it is hidden and never required. |
REQUIRE | The field is required; otherwise it is optional. |
ELIGIBLE | The traveller can apply; otherwise they cannot. |
| Operator | Holds when the answer… |
|---|---|
EQ | equals the first of values |
NEQ | differs from the first of values |
IN, ANY, ALL | is one of values |
NOT_IN | is 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 itslabel. - 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.