Skip to main content

Add Ancillary

Add one or more ancillary services (e.g., meals, insurance) to an existing booking.


Endpoint

  • URL: /api/v1/flight/addancillary
  • 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 (e.g., VN, VJ, 1A)
airlinestringNoAirline code (IATA 2-letter, e.g., VN, VJ, AF)
bookingCodestringYesBooking code (PNR)
servicesarray of ServiceInfoYesList of ancillary services to add

ServiceInfo Object

FieldTypeRequiredDescription
quantityintegerYesNumber of units to add
ancillaryValuestringYesEncoded ancillary value from getancillaries

Example Request:

{
"system": "VN",
"airline": "VN",
"bookingCode": "ABC123",
"services": [
{
"quantity": 1,
"ancillaryValue": "eyJ2YWx1ZSI6ICJNRUFMIiwgInByaWNlIjogMTUwMDAwfQ=="
}
]
}

Request Constraints & Business Rules

  • bookingCode must refer to an existing, valid booking.
  • services must use ancillaryValue from a valid getancillaries response.
  • Only available ancillaries for the flight/route can be added.
  • Some ancillaries may have quantity or time restrictions.

Response Structure

FieldTypeNullableDescription
systemstringYesName of the airline system
statusbooleanNotrue if successful, false if failed
errorErrorCode (object)YesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestring (date-time)YesTime for request tracking

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc123",
"trackingTime": "2025-07-01T07:00:00.000Z"
}

Error Codes

See Error Codes for details on possible error responses.


Security & Validation

  • All input is validated for type and required fields.
  • Only authenticated users can access this endpoint.
  • The endpoint is protected against tampering with ancillaryValue and bookingCode.

Validation Questions

  • Are there limits on the number or type of ancillaries that can be added per booking?
  • Is there a time window before departure when ancillaries can no longer be added?

For integration support, see Contact Support.