API reference / Reference

get/v1/form-fields

The questions a destination’s application form asks

Operation
listFormFields
Authentication
API key

`/v1/documents` answers what to *send*; this answers what to *answer*, which is the other half of the same capture. Four portals ask four different sets of questions, and this is the only place that knows which — a client drawing the fields by hand asked Somalia for a father’s name no capture contains, and never asked Kenya where the traveller arrives, which its form requires.

Fields are grouped by `page` — **the portal’s own route** where the capture recorded one (`/form/apply/individual/contact-information`), and `map:<n>` where it did not. Grouping by `screen` alone was too coarse: Kenya has five screens and fourteen routes, so its four Trip Information tabs and its separate Travel Information page all arrived as a single step of thirty-six fields, every mode’s questions together.

Each field carries `options` already resolved: where a list lives in another file — Kenya’s 57 occupation codes, Djibouti’s marital statuses — it is returned inline, so a caller never has to know which capture keeps what where. An empty `options` means no list was captured, and a renderer should ask for text rather than offer an empty dropdown.

**`capture` is not decoration.** A step marked `title-only` had only its title read; a client that treated it as an empty step would drop real questions. `captured` dates the whole file, and `capture_boundary` says in the capture’s own words where the reading stopped.

Request

Parameters

destination_iso3queryrequiredstring

Responses

200Every question the destination asks, grouped by screen.
destination_iso3stringrequired

one of: ETHSOMDJIKEN

portalstringrequired
form_namestringrequired
operatorstringrequired
capturedstringrequired
capture_boundarystringrequired
screensobjectrequired
stepsFormFieldsStep[]required
next_cursorstringnullrequired
400The request body or query failed validation.
errorobjectrequired
401No key, an unknown key, a revoked key, or a key whose tenant is not active. All four return an identical body on purpose: distinguishing them would let a caller discover which partners we have.
errorobjectrequired
403The key is valid but does not hold the scope this route requires.
errorobjectrequired
404Not found, or not yours. A resource belonging to another tenant answers 404 rather than 403, because 403 would confirm the record exists.
errorobjectrequired

Example

curl
curl -X GET https://api.haavisa.com/v1/form-fields \
  -H "Authorization: Bearer $HAAVISA_API_KEY"?destination_iso3=<destination_iso3>

More in Reference

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.