Skip to main content

Delete Membership

Remove one or more membership cards from passengers in a flight booking. This endpoint allows you to disassociate frequent flyer or loyalty program memberships from passengers.


Endpoint​

  • URL: /api/v1/flight/deletemembership
  • 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
membershipsarrayNoList of membership codes to remove

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​

  • Only valid membership codes can be removed.
  • All required booking and membership information must be provided.
  • Attempting to remove a non-existent membership will result in an error.

Sample Request​

{
"system": "VN",
"bookingCode": "ABC123",
"memberships": ["MEM123"]
}

Sample Response​

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

Error Codes​

This endpoint may return the following error codes:

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


Validation Questions​

  • Can a membership be removed if it is required for a fare or benefit?
  • What happens if the membership code does not exist in the booking?
  • Are there restrictions on removing multiple memberships at once?

Compliance​

  • GDPR
  • PCI-DSS

Traceability​

  • Requirement: MEM-003, MEM-004