POST/v2/cart/create-pnr

Create 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

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

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