Zamna Session API
The Session API from Zamna — 9 operation(s) for session.
The Session API from Zamna — 9 operation(s) for session.
openapi: 3.1.0
info:
title: Zamna Ready To Fly Session API
version: '2.18'
tags:
- name: Session
paths:
/session/{sessionId}:
get:
summary: Get MultiPax session
operationId: getSession
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
responses:
'200':
description: MultiPax session
content:
application/json:
schema:
$ref: '#/components/schemas/GetSessionResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}:
get:
summary: Get Pax session
operationId: getPaxSession
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
responses:
'200':
description: Pax session
content:
application/json:
schema:
$ref: '#/components/schemas/GetPaxSessionResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/address:
post:
summary: Add address to pax session
operationId: addAddress
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddAddressRequest'
required: true
responses:
'200':
description: Updated pax session
content:
application/json:
schema:
$ref: '#/components/schemas/AddAddressResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/answers:
post:
summary: Provide nationality and/or birthdate and/or set answers to questions
operationId: postAnswers
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetAnswersRequest'
required: true
responses:
'200':
description: Updated Pax session
content:
application/json:
schema:
$ref: '#/components/schemas/SetAnswersResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/apply-document/manual:
post:
summary: Apply manually provided non-travel document data
operationId: applyManualDocument
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyManualDocumentRequest'
required: true
responses:
'200':
description: Either error (rules mismatch), or success (with updated Pax session)
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyManualDocumentResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/apply-document/recognised:
post:
summary: Apply document recognised by /recognise-document
operationId: applyRecognisedDocument
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyRecognisedDocumentRequest'
required: true
responses:
'200':
description: Success (with updated Pax session) or Error (doc processing, id or rules mismatch)
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyRecognisedDocumentResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/apply-document/travel-document:
post:
summary: Apply manually provided travel document data
operationId: applyTravelDocument
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyTravelDocumentRequest'
required: true
responses:
'200':
description: Either error (id or rules mismatch), or success (with updated Pax session)
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyTravelDocumentResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/pax-session/{paxSessionId}/recognise-document:
post:
summary: Recognise document (photo, scan or PDF)
operationId: recogniseDocument
parameters:
- name: X-Request-Id
in: header
description: Request id to be returned in response header (auto generated if not specified)
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
- name: paxSessionId
in: path
description: Pax session id (prefixed with 'pax_')
required: true
schema:
type: string
example: pax_aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
method:
type: string
expected_document_types:
type: array
items:
type: string
page_index_to_process:
type: integer
files:
type: array
items:
type: string
format: binary
required: true
responses:
'200':
description: Success (with updated Pax session) or Error (doc processing, id or rules mismatch)
content:
application/json:
schema:
$ref: '#/components/schemas/RecogniseDocumentResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
/session/{sessionId}/set-consent:
post:
summary: Set consent for MultiPax session
operationId: setConsent
parameters:
- name: X-Request-Id
in: header
description: request id to be returned in response header (generated if not specified)
schema:
type: string
- name: Accept-Language
in: header
description: Locale to return content with
schema:
type: string
- name: sessionId
in: path
description: MultiPax session id
required: true
schema:
type: string
example: aae10767-d13b-4e5c-a9fe-0ab8f13b8087
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetConsentRequest'
required: true
responses:
'200':
description: Updated MultiPax session
content:
application/json:
schema:
$ref: '#/components/schemas/SetConsentResponse'
'401':
description: Unauthorized
security:
- BearerAuth: []
tags:
- Session
components:
schemas:
DocumentProvisionMethod:
type: string
enum:
- MANUAL
- SCAN
- UPLOAD
AllowedDocument:
type: object
description: Describes a document which can be used to resolve checklist item
properties:
type:
type: string
description: Type of document
example: USA_GREEN_CARD
document_format:
$ref: '#/components/schemas/AllowedDocumentFormat'
description: Document format - to represent in UI
example: BOOKLET
title:
type: string
description: Title (localised)
example: US Green Card
description:
description: Description (localised)
example: Verification of your US Green Card is required to travel
type:
- string
- 'null'
provision_methods:
type: array
items:
$ref: '#/components/schemas/DocumentProvisionMethod'
description: Allowed provision methods (MANUAL, SCAN, UPLOAD)
sides_configuration:
$ref: '#/components/schemas/DocumentSidesConfiguration'
description: Whether document has one or multiple sides (or files, ie PDF)
sides_expectation:
$ref: '#/components/schemas/DocumentSidesExpectation'
description: Whether one or multiple sides (or files, ie PDF) are requested from passenger
side_with_mrz:
$ref: '#/components/schemas/DocumentMrzConfiguration'
description: MRZ configuration
multipax_resolution_supported:
type: boolean
description: If true, document of this type can be applied to multiple pax sessions with a single apply (ie using multipax-apply-document/file)
example: 'true'
sample_image_src:
description: Sample image URL (optional)
example: https://zamna-webview.s3.eu-west-1.amazonaws.com/samples/col-id-card.png
type:
- string
- 'null'
country:
description: Document country code (iso alpha-3) - can be EURO
example: USA
type:
- string
- 'null'
expect_long_processing:
type: boolean
description: Whether to expect long processing on the backend - allows to show user a warning
page_index_to_process:
format: int32
description: Which page of the document is relevant - pass to /apply
type:
- integer
- 'null'
required:
- type
- document_format
- title
- provision_methods
- sides_configuration
- sides_expectation
- side_with_mrz
- multipax_resolution_supported
- expect_long_processing
ComposedAnd:
type: object
description: 'Composed checklist item requirement: And([ChecklistItemRequirement])'
properties:
as_text:
type: string
description: Requirement represented as text
example: expiryDate >= 2025-05-27 and docCountry = CAN
requirements:
type: array
items:
$ref: '#/components/schemas/ChecklistItemRequirement'
description: Embedded requirements as a list (... and ... and ...)
type:
type: string
required:
- as_text
- requirements
- type
FieldMismatch:
type: object
description: 'Rules mismatch: specific document field'
properties:
field:
type: string
description: Name of the mismatched document field
type:
type: string
required:
- field
- type
ApiManualDocument:
oneOf:
- $ref: '#/components/schemas/OnwardTicket'
discriminator:
propertyName: type
mapping:
onward-ticket: '#/components/schemas/OnwardTicket'
ComposedOr:
type: object
description: 'Composed checklist item requirement: Or([ChecklistItemRequirement])'
properties:
as_text:
type: string
description: Requirement represented as text
example: expiryDate >= 2025-05-27 or nationality in (GBR,USA)
requirements:
type: array
items:
$ref: '#/components/schemas/ChecklistItemRequirement'
description: Embedded requirements as a list (... or ... or ...)
type:
type: string
required:
- as_text
- requirements
- type
IcaoSex:
type: string
enum:
- M
- F
- X
ApplyManualDocumentRequest:
type: object
description: Request to provide manually entered non-travel document data to resolve checklist item(s)
properties:
document:
$ref: '#/components/schemas/ApiManualDocument'
ignore_mistakes:
type: boolean
required:
- document
- ignore_mistakes
AllowedDocumentFormat:
type: string
enum:
- BOOKLET
- ID_CARD
- EMBASSY_VISA
- PAPER
- PDF
NationalityInMismatch:
type: object
description: 'Rules mismatch: nationality'
properties:
expected:
type: array
items:
$ref: '#/components/schemas/IcaoNationality'
description: What was expected
actual:
$ref: '#/components/schemas/IcaoNationality'
description: What was provided
type:
type: string
required:
- expected
- actual
- type
ApplyTravelDocumentRequest:
type: object
description: Request to provide manually input travel document data to try resolve checklist item(s). When `checklist_item_id` is provided, travel document data applies directly to checklist item by its id. Otherwise, travel document data is applied to all checklist items with `TRAVEL_DOCUMENT` type.
properties:
travel_document:
$ref: '#/components/schemas/TravelDocument'
description: Travel document data
ignore_mistakes:
type: boolean
description: Whether to ignore potential data mismatches and accept travel document data provided (unless mismatch to booking data). It will be added to DCS, but not verified until scanned/uploaded
required:
- travel_document
- ignore_mistakes
QuestionTitle:
type: object
description: Question title and optional subtitle
properties:
name:
type: string
description: Question title
example: 'Since 01/01/2011, I have visited the following countries:'
subtitle:
description: Optional question subtitle
example: Cuba, North Korea
type:
- string
- 'null'
required:
- name
HaveDocumentQuestion:
type: object
description: A Yes/No question (boolean), manifested through a positive statement of 'I do have {document type}' format
properties:
id:
type: string
description: Question id
example: HelbxGxFg0gpdAdnumztVA==
is_relevant:
type: boolean
description: Whether question is relevant for this passenger, according to current answers to all questions
answer:
description: Question answer, if was provided
example: 'null'
type:
- boolean
- 'null'
question_title:
$ref: '#/components/schemas/QuestionTitle'
description: Question title (localised)
sample_image:
description: Question sample image (eg US Green Card specimen) with a title
anyOf:
- $ref: '#/components/schemas/QuestionSampleImage'
- type: 'null'
doc_category_order:
type: integer
format: int32
description: Document category sort order
doc_category_title:
type: string
description: Document category (localised)
example: Visa
doc_title:
type: string
description: Document title (localised)
example: US Green Card
country:
description: Document country code (iso alpha-3) - can be EURO
example: USA
type:
- string
- 'null'
type:
type: string
required:
- id
- is_relevant
- question_title
- doc_category_order
- doc_category_title
- doc_title
- type
FileTooLarge:
type: object
description: 'Doc recognition error: file is too large'
properties:
maxSize:
type: integer
format: int32
description: Max file size in bytes
type:
type: string
required:
- maxSize
- type
SetAnswersRequest:
type: object
description: Request to set nationality, birthdate, answers to questions and confirm/refute declarations
properties:
nationality:
description: Nationality, nullable
example: MEX
type:
- string
- 'null'
birthdate:
format: date
description: Birthdate, nullable
type:
- string
- 'null'
answers:
items:
$ref: '#/components/schemas/Answer'
description: List of answers, nullable
type:
- array
- 'null'
confirm_declarations:
items:
type: string
description: List of declaration ids to confirm
type:
- array
- 'null'
refute_declarations:
items:
type: string
description: List of declaration ids to refute
type:
- array
- 'null'
FromList:
type: object
description: Answer to `pick-from-list-question`
properties:
question_id:
type: string
description: Question id
example: PassportTypeInQuestion
value:
type: string
description: Answer value - chosen option id
example: DIPLOMATIC
type:
type: string
required:
- question_id
- value
- type
FileTypesNotSupported:
type: object
description: 'Doc recognition error: file type not supported'
properties:
provided_file_types:
type: array
items:
type: string
description: Which document types were provided
supported_file_types:
type: array
items:
type: string
description: Which document types are supported
type:
type: string
required:
- provided_file_types
- supported_file_types
- type
Check:
type: object
description: 'Checklist item requirement: agent check (eg "check: 2 blank pages")'
properties:
as_text:
type: string
description: Requirement represented as text
example: 'check: 2 blank pages'
type:
type: string
required:
- as_text
- type
ChecklistItemRequirement:
oneOf:
- $ref: '#/components/schemas/Not'
- $ref: '#/components/schemas/ComposedAnd'
- $ref: '#/components/schemas/ComposedOr'
- $ref: '#/components/schemas/FieldCompare'
- $ref: '#/components/schemas/FieldIn'
- $ref: '#/components/schemas/FieldNotIn'
- $ref: '#/components/schemas/Check'
discriminator:
propertyName: type
mapping:
not: '#/components/schemas/Not'
composed-and: '#/components/schemas/ComposedAnd'
composed-or: '#/components/schemas/ComposedOr'
field-compare: '#/components/schemas/FieldCompare'
field-in: '#/components/schemas/FieldIn'
field-not-in: '#/components/schemas/FieldNotIn'
check: '#/components/schemas/Check'
RequiredAction:
type: string
enum:
- PROVIDE_CONSENT_RESPONSE
- PROVIDE_NATIONALITY_OR_BIRTHDATE
- PROVIDE_ADDRESS
- ANSWER_QUESTIONS
- RESOLVE_ITEMS
ExpiryDateGteMismatch:
type: object
description: 'Rules mismatch: expiry date greater than or equal to'
properties:
expected:
type: string
format: date
description: What was expected
actual:
type: string
format: date
description: What was provided
type:
type: string
required:
- expected
- actual
- type
RecogniseDocumentResponse:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/RecogniseDocumentResult'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/RecogniseDocumentResponseError'
- type: 'null'
GetPaxSessionResponse:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/PaxSession'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorContainer'
- type: 'null'
RuleOrigin:
type: object
description: Origin of the rule
properties:
type:
$ref: '#/components/schemas/RuleType'
description: Type (ENTRY/TRANSIT/EXIT)
example: ENTRY
country:
type: string
description: Rule origin country
example: MEX
required:
- type
- country
SetAnswersResponse:
type: object
properties:
data:
anyOf:
- $ref: '#/components/schemas/PaxSession'
- type: 'null'
error:
anyOf:
- $ref: '#/components/schemas/ErrorContainer'
- type: 'null'
ChecklistStatus:
type: string
enum:
- ON_HOLD
- ACTIVE
- FINALIZED
FieldIn:
type: object
description: 'Checklist item requirement: field value IN list ({field} in [{values}], eg docSubType in [DIPLOMATIC,SERVICE])'
properties:
as_text:
type: string
description: Requirement represented as text
example: docSubType in (DIPLOMATIC, SERVICE)
field:
type: string
description: Field
example: docSubType
values:
type: array
items:
type: string
description: Allowed values
example: '["DIPLOMATIC", "SERVICE"]'
type:
type: string
required:
- as_text
- field
- values
- type
AddAddressResult:
type: object
properties:
updated_pax_session:
$ref: '#/components/schemas/PaxSession'
required:
- updated_pax_session
RuleType:
type: string
enum:
- ENTRY
- TRANSIT
- EXIT
ApplyDocumentError:
oneOf:
- $ref: '#/components/schemas/IdMismatches'
- $ref: '#/components/schemas/NoItemsToApplyDocumentTo'
- $ref: '#/components/schemas/RulesMismatches'
- $ref: '#/components/schemas/SignalsMismatches'
- $ref: '#/components/schemas/TravelDocumentRequired'
discriminator:
propertyName: type
mapping:
id-mismatches: '#/components/schemas/IdMismatches'
no-items-to-apply-document-to: '#/components/schemas/NoItemsToApplyDocumentTo'
rules-mismatches: '#/components/schemas/RulesMismatches'
signals-mismatches: '#/components/schemas/SignalsMismatches'
provide-passport: '#/components/schemas/TravelDocumentRequired'
DocumentMrzConfiguration:
type: string
enum:
- NONE
- DATA_PAGE
- CARD_FRONT
- CARD_BACK
OnwardTicket:
type: object
description: Manually entered return or onward ticket
properties:
travelDate:
type: string
format: date
type:
type: string
required:
- travelDate
- type
Pax:
type: object
description: Passenger basic data (first name, last name, birthdate)
properties:
first_name:
description: Given names, should be provided if last_name is null
example: JACK MARVO
type:
- string
- 'null'
last_name:
description: Last name, should be provided if first_name is null
example: SMITH VESSEN
type:
- string
- 'null'
birthdate:
format: date
description: Birthdate, if set in DCS
type:
- string
- 'null'
IdMismatches:
type: object
description: A record of mismatches to booking for document applied
properties:
given_name:
items:
type: string
description: Given names mismatch - a pair of (expected, actual); or null if no mismatch on the field
example: '[''JOHN'', ''MICHAEL'']'
type:
- array
- 'null'
surname:
items:
type: string
description: Last name mismatch - a pair of (expected, actual); or null if no mismatch on the field
example: '[''SMITH'', ''BLACK'']'
type:
- array
- 'null'
full_name:
items:
type: string
description: Full name mismatch (for relevant documents, eg Indian E-Visa) - a pair of (expected, actual); or null if no mismatch on the field
example: '[''JACK SMITH'', ''JACK BLACK'']'
type:
- array
- 'null'
number:
items:
type: string
description: Document number mismatch - a pair of (expected, actual); or null if no mismatch on the field
example: '[''1234567'', ''AA556743'']'
type:
- array
- 'null'
birthdate:
items:
type: string
format: date
description: Birthdate mismatch - a pair of (expected, actual); or null if no mismatch on the field
type:
- array
- 'null'
sex:
items:
$ref: '#/components/schemas/IcaoSex'
description: Sex mismatch - a pair of (expected, actual); or null if no mismatch on the field
example: '[''M'', ''F'']'
type:
- array
- 'null'
nationality:
items:
$ref: '#/components/schemas/IcaoNationality'
description: Nationality mismatch - a pair of (expected, actual); or null if no mismatch on the field
example: '[''USA'', ''MEX'']'
type:
- array
- 'null'
type:
type: string
required:
- type
DocumentSidesConfiguration:
type: string
enum:
- SINGLE_SIDE_OR_FILE
- MULTIPLE_SIDES_OR_FILES
ApplyManualDocumentResponseError:
type: object
properties:
general_error:
anyOf:
- $ref: '#/components/schemas/GeneralError'
- type: 'null'
operationError:
$ref: '#/components/schemas/ApplyDocumentError'
required:
- operationError
FieldCompare:
type: object
description: 'Checklist item requirement: compare field value ({field} {operator} {value}, eg expiryDate >= 2025-10-25)'
properties:
as_text:
type: string
description: Requirement represented as text
example: expiryDate >= 2025-05-27
field:
type: string
description: Field
example: expiryDate
operator:
$ref: '#/components/schemas/Operator'
description: Compare operator
example: GTE
value:
type: string
description: Value of the field to compare with - type depends on field
example: '2025-05-27'
type:
type: string
required:
- as_text
- field
- operato
# --- truncated at 32 KB (68 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zamna/refs/heads/main/openapi/zamna-session-api-openapi.yml