Skip to main content

Add Document

Add a new identity document for one or more passengers in a booking.


Endpoint

  • URL: /api/v1/flight/adddocument
  • Method: POST
  • Auth Required: Yes (Bearer Token/X-API-KEY)
  • Content-Type: application/json

Authentication

This endpoint requires a valid JWT Bearer token in the Authorization header:

Authorization: Bearer <access_token>

Obtain tokens via /api/v1/sign-in (POST) with your credentials.


Request Structure

FieldTypeRequiredDescription
systemstringYesBooking system code
bookingCodestringYesBooking code (PNR)
passengersarrayYesList of passengers (see PaxInfo)

PaxInfo Object

  • See PaxInfo for passenger and document details.

Sample Request:

{
"system": "VN",
"bookingCode": "ABC123",
"passengers": [
{
"passengerId": "PAX1",
"type": "CHD",
"dateOfBirth": "2018-01-01",
"document": {
"type": "P",
"number": "C1234567",
"issueCountry": "VNM",
"issueDate": "2020-01-01",
"expiryDate": "2030-01-01",
"surName": "NGUYEN",
"givenName": "VAN A",
"national": "VNM",
"dateOfBirth": "2018-01-01",
"gender": true
}
}
]
}

Request Constraints & Business Rules

  • Only bookings that exist and are eligible for update can have documents added.
  • The bookingCode must match an existing booking.
  • If passenger document is provided, type (DocumentType), number, surName, givenName, and expiryDate are required.
  • If passenger document.type is I, expiryDate is optional.
  • For CHD and INF passengers, passenger dateOfBirth is required in the Add Document request.
  • For CHD and INF passengers, document dateOfBirth is required when document information is submitted.
  • Document types and formats must be valid and supported by the airline/system.
  • All changes are auditable via trackingId and trackingTime.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ)
statusbooleanNotrue if successful, false if failed
errorobjectYesError code object
descriptionstringYesError message or status description
trackingIdstringYesRequest tracking ID
trackingTimestringYesRequest tracking timestamp

Sample Response:

{
"system": "VN",
"status": true,
"description": "Document added successfully",
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z"
}

Error Codes

This endpoint may return the following error codes:

For a complete list of error codes, see Error Codes.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • All actions are logged and traceable.

Validation Questions

  • What are the allowed document types and formats?
  • Are there restrictions on the number of documents per passenger?
  • What happens if the booking does not exist or is not eligible for update?

For integration support, see Contact Support.