API reference / Requirements

post/v1/check/batch

A manifest: many travellers in one request

Operation
checkRequirementsBatch
Authentication
API key

Airlines check passengers in planeloads, not one at a time. Without this a 300-seat manifest is 300 round trips; the engine is pure and synchronous, so this is a loop and the caller saves the latency of all 300.

**Metered per check, not per request.** Three hundred passengers costs three hundred units, exactly as three hundred single calls would — batching is a latency feature, not a discount — and the quota is asserted against the whole batch, so batching cannot be used to slip past a ceiling.

**A bad row does not fail the batch.** One misspelled nationality must not cost a carrier the other 299 answers, so each row reports its own error and is individually not charged. The consequence is that this returns **200 even when every row failed** — read `failed` and each row’s `status`, which is why both are in the response rather than left to be inferred.

Every row gets its own `request_id`, readable at `GET /v1/checks/{requestId}`. The batch’s own `x-request-id` is not reused for the rows: that lookup returns one answer, and a dispute is always about one passenger.

Request

Body

checksobject[]required

Up to 500 checks. A widebody manifest clears a full A380 seat count with room to spare; anything larger is better served by a job that reports back than by a longer timeout.

Responses

200One result per submitted check, in order. Inspect `failed` before treating this as success.
resultsCheckBatchItem[]required

One entry per submitted check, in the order they were sent.

checkedintegerrequired

Rows that produced an answer, and were therefore metered.

failedintegerrequired

Rows refused before the engine ran. **Not metered** — a caller is not charged for work that did not happen.

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
429Rate limit exceeded for this tenant.
errorobjectrequired

Example

curl
curl -X POST https://api.haavisa.com/v1/check/batch \
  -H "Authorization: Bearer $HAAVISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "checks": []
  }'

More in Requirements

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