post https://api.aeronpay.in/api/serviceapi-prod/api/flight/release_pnr
Release PNR API
The Release PNR API allows you to release a PNR (Passenger Name Record) for flight bookings.
API Endpoint
POST /flight/release_pnr
Headers
Header | Type | Required | Description |
---|---|---|---|
client-id | string | Yes | Your unique Client ID |
client-secret | string | Yes | Your secure Client Secret key |
Content-Type | string | Yes | Must be application/json |
Request Structure
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
client_referenceId | string | Yes | Unique Client Reference ID for tracking the transaction |
booking_id | integer | Yes | Unique ID for the booking that needs to be released |
source | string | Yes | The source system identifier (e.g., "Amadeus", "Travelport", etc.) |
Example Request
{
"client_referenceId": "673678623163",
"booking_id": 1965951,
"source": "Amadeus"
}
Response Structure
Successful Response
When the PNR is successfully released, the API returns a JSON response with the following structure:
Field | Type | Description |
---|---|---|
status | string | Status of the operation (SUCCESS for successful releases) |
statusCode | string | HTTP status code as string ("200" for successful operations) |
message | string | Descriptive message about the operation result |
Example Response
{
"status": "SUCCESS",
"statusCode": "200",
"message": "PNR released successfully."
}
Response Status Codes
Status Code | Status | Description |
---|---|---|
200 | SUCCESS | PNR released successfully |
400 | FAILED | Bad request or invalid parameters |
404 | FAILED | Booking not found |
500 | ERROR | Internal server error |
Integration Example
const releaseBooking = async (clientReferenceId, bookingId, source) => {
const response = await fetch('/flight/release_pnr', {
method: 'POST',
headers: {
'client-id': 'your-client-id',
'client-secret': 'your-client-secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
client_referenceId: clientReferenceId,
booking_id: bookingId,
source: source
})
});
return await response.json();
};