POST
/v2/cart/create-pnrCreate the PNR
Turn a validated cart into an airline record locator. Markup is frozen here.
Bearer tokenAuthority: B2C_PNR_CREATEhttps://booking.aerolink.dev
The body handed to booking is built server-side. isPartialPayment is forced to false — customers pay in full. The cart is locked so two requests cannot book it at once. Later edits to a markup row do not change a sold booking.
cURL
bash
curl -X POST https://booking.aerolink.dev/v2/cart/create-pnr \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{"cartId":"66e1..."}'Request
JSON
{
"cartId": "66e1..."
}Body fields
cartIdstringrequired
Must be non-blank
cartIdstring required | Must be non-blank |
Response
200
{
"message": "Success",
"data": {
"id": "66f0...",
"refNo": "TRP-000123",
"pnr": "ABC123",
"status": "BOOKED",
"price": { "currencyCode": "BDT", "total": 46300 },
"bookingTime": 1788356966,
"issuedTime": 0,
"journeyDateTime": 1791000000,
"tripSummary": {},
"passengers": [],
"facilities": {}
}
}Response fields
idstringOrder id
refNostringHuman-readable reference
pnrstringAirline record locator
statusstringSee order statuses
priceB2cFareWhat the customer pays, markup included
bookingTime / issuedTime / journeyDateTimeepoch secondsissuedTime is 0 until ticketed
idstring | Order id |
refNostring | Human-readable reference |
pnrstring | Airline record locator |
statusstring | See order statuses |
priceB2cFare | What the customer pays, markup included |
bookingTime / issuedTime / journeyDateTimeepoch seconds | issuedTime is 0 until ticketed |
Business rules
- The cart is validated before booking. Ownership is checked first.
Errors
404Entity Not Found
Cart missing, blank, or owned by another customer
409This cart is being processed by another request…
The cart lock is already held
400validation failed
Cart validation fails, e.g. incomplete passengers
401 / 403UNAUTHORIZED
Missing token or missing B2C_PNR_CREATE
| HTTP | message | When |
|---|---|---|
| 404 | Entity Not Found | Cart missing, blank, or owned by another customer |
| 409 | This cart is being processed by another request… | The cart lock is already held |
| 400 | validation failed | Cart validation fails, e.g. incomplete passengers |
| 401 / 403 | UNAUTHORIZED | Missing token or missing B2C_PNR_CREATE |