Skip to main content

Add Membership

Add a membership card to one or more passengers in a flight booking. This endpoint allows you to associate frequent flyer or loyalty program memberships with passengers.


Endpoint​

  • URL: /api/v1/flight/addmembership
  • 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>

Request​

Body Schema​

FieldTypeRequiredDescription
systemstringYesBooking system code
bookingCodestringYesBooking code
passengersarrayNoList of passengers (see PassengerInfo)

PassengerInfo (PaxInfo)​

See Passenger Info Object for the complete passenger schema, including membership, document, seatMaps, baggages, and ancillaries.


Response​

200 OK​

FieldTypeDescription
systemstringSystem name (e.g., VN, VJ, 1A)
statusbooleanSuccess status
errorobjectError code object (see ErrorCode)
descriptionstringError description (if any)
trackingIdstringTracking log ID
trackingTimestringTracking timestamp (ISO 8601)

ErrorCode​

FieldTypeDescription
idintegerError code ID
messagestringError message

Business Rules​

  • Each membership must be associated with a valid passenger.
  • Duplicate or invalid membership IDs will result in an error.
  • All required fields for each passenger and membership must be provided.

Sample Request​

{
"system": "VN",
"bookingCode": "ABC123",
"passengers": [
{
"index": 1,
"passengerId": "PAX001",
"membership": {
"airline": "VN",
"membershipId": "MEM123",
"level": "GOLD",
"skyTeamLevel": null
}
}
]
}

Sample Response​

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "track-004",
"trackingTime": "2024-07-01T13:30:00Z"
}

Error Codes​

This endpoint may return the following error codes:

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


Validation Questions​

  • What types of memberships are supported?
  • Can a passenger have multiple memberships?
  • What happens if a membership is already associated with another booking?

Compliance​

  • GDPR
  • PCI-DSS

Traceability​

  • Requirement: MEM-001, MEM-002