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
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code |
| bookingCode | string | No | Booking code |
| memberships | array | No | List of membership codes to remove |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| system | string | System name (e.g., VN, VJ, 1A) |
| status | boolean | Success status |
| error | object | Error code object (see ErrorCode) |
| description | string | Error description (if any) |
| trackingId | string | Tracking log ID |
| trackingTime | string | Tracking timestamp (ISO 8601) |
ErrorCode
| Field | Type | Description |
|---|---|---|
| id | integer | Error code ID |
| message | string | Error 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.
Example Request
{
"system": "VN",
"bookingCode": "ABC123",
"memberships": ["MEM123"]
}
Example Response
{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "track-005",
"trackingTime": "2024-07-01T14:00:00Z"
}
Error Codes
See Error Codes for details.
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