# Extract PNR

{% hint style="info" %}
💬 **Need help?** If you're stuck, ask Eva on ATRIP for instant diagnostics.

<a href="https://www.atriptech.com/" class="button primary" data-icon="comments">Ask Eva</a>
{% endhint %}

## Extract PNR

> This API is used to directly connect to airlines and extract PNR information. The content displayed by this API reflects the current PNR information on the airline side, such as flight schedule and ticket status. Atlas extracts airline information truthfully and will not do any modification.\
> \
> \*\*Endpoint:\*\*\
> <https://sandbox.atriptech.com/extractPnr.do>

```json
{"openapi":"3.0.1","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Other Functions"}],"security":[],"paths":{"/extractPnr.do":{"post":{"summary":"Extract PNR","deprecated":false,"description":"This API is used to directly connect to airlines and extract PNR information. The content displayed by this API reflects the current PNR information on the airline side, such as flight schedule and ticket status. Atlas extracts airline information truthfully and will not do any modification.\n\n**Endpoint:**\nhttps://sandbox.atriptech.com/extractPnr.do","tags":["Other Functions"],"parameters":[{"name":"Accept","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"","required":true,"schema":{"type":"string"}},{"name":"Accept-Encoding","in":"header","description":"","required":true,"schema":{"type":"string","default":"gzip"}},{"name":"x-atlas-client-id","in":"header","description":"","required":true,"schema":{"type":"string","default":"<YOUR_CLIENT_ID>"}},{"name":"x-atlas-client-secret","in":"header","description":"","required":true,"schema":{"type":"string","default":"<YOUR_CLIENT_SECRET>"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"airlinePnr":{"type":"string","description":"The airline PNR"},"carrier":{"type":"string","description":"2-letter IATA code for the airline"},"passengers":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["firstName","lastName"]}},"contact":{"type":"object","properties":{"email":{"type":"string","description":"Contact email."}},"required":["email"]},"routing":{"type":"object","properties":{"fromSegments":{"type":"array","items":{"type":"object","properties":{"arrAirport":{"type":"string","description":"3-letter iata code for the arrival airport at which the segment is scheduled to arrive."},"arrTime":{"type":"string","description":"The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `yyyy-MM-dd HH:mm`."},"dptAirport":{"type":"string","description":"3-letter iata code for the airport at which the segment is scheduled to depart."},"depTime":{"type":"string","description":"The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`yyyy-MM-dd HH:mm`."},"flightNumber":{"type":"string","description":"Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number."}},"required":["arrAirport","arrTime","dptAirport","depTime","flightNumber"]}},"retSegments":{"type":"array","items":{"type":"object","properties":{"arrAirport":{"type":"string","description":"3-letter iata code for the arrival airport at which the segment is scheduled to arrive."},"arrTime":{"type":"string","description":"The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `yyyy-MM-dd HH:mm`."},"dptAirport":{"type":"string","description":"3-letter iata code for the airport at which the segment is scheduled to depart."},"depTime":{"type":"string","description":"The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`yyyy-MM-dd HH:mm`."},"flightNumber":{"type":"string","description":"Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number."}},"required":["arrAirport","arrTime","dptAirport","depTime","flightNumber"]},"nullable":true}},"required":["fromSegments"],"description":"The original flight segment information at the time of order generation"},"timeout":{"type":"integer","default":15000,"description":"The maximum response duration, in milliseconds. Note: This time is estimated due to the impact of network transmission.","nullable":true}},"required":["airlinePnr","carrier","passengers","contact","routing"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","enum":[99005,99006,99007]},"msg":{"type":"string","nullable":true},"airlinePnr":{"type":"string","description":"Airline PNR(not Atlas)"},"pnrStatus":{"type":"string","enum":["OnHold","Ticketed","Cancelled","Unknown"]},"pnrUsed":{"type":"string","description":"pnr usage status","enum":["used","unused"],"nullable":true},"currency":{"type":"string","description":"The currency of fare","nullable":true},"totalPrice":{"type":"string","nullable":true},"routing":{"type":"object","properties":{"fromSegments":{"type":"array","items":{"type":"object","properties":{"aircraftCode":{"type":"string","description":"IATA Code of aircraft type","nullable":true},"arrAirport":{"type":"string","description":"3-letter iata code for the arrival airport at which the segment is scheduled to arrive."},"arrTerminal":{"type":"string","description":"The terminal at the destination airport where the segment is scheduled to arrive.","nullable":true},"arrTime":{"type":"string","description":"The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `YYYYMMDD`."},"carrier":{"type":"string","description":"IATA code of marketing carrier."},"codeShare":{"type":"boolean","description":"A flag used to identify whether it is a code share flight."},"depAirport":{"type":"string","description":"3-letter iata code for the airport at which the segment is scheduled to depart."},"depTerminal":{"type":"string","description":"The terminal at the departure airport from which the segment is scheduled to depart.","nullable":true},"depTime":{"type":"string","description":"The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`YYYYMMSS`."},"duration":{"type":"integer","description":"The duration of the segment in munites."},"flightNumber":{"type":"string","description":"Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number."},"operatingCarrier":{"type":"string","description":"2-letter iata code for the operating carrier. The airline actually operating this segment. This may differ from the marketing carrier in the case of a \"codeshare\", where one airline sells flights operated by another airline.","nullable":true},"operatingFlightnumber":{"type":"string","description":"Operating flight number.","nullable":true}},"required":["arrAirport","arrTime","carrier","codeShare","depAirport","depTime","duration","flightNumber"]}},"retSegments":{"type":"array","items":{"type":"object","properties":{"aircraftCode":{"type":"string","description":"IATA Code of aircraft type","nullable":true},"arrAirport":{"type":"string","description":"3-letter iata code for the arrival airport at which the segment is scheduled to arrive."},"arrTerminal":{"type":"string","description":"The terminal at the destination airport where the segment is scheduled to arrive.","nullable":true},"arrTime":{"type":"string","description":"The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `YYYYMMDD`."},"carrier":{"type":"string","description":"IATA code of marketing carrier."},"codeShare":{"type":"boolean","description":"A flag used to identify whether it is a code share flight."},"depAirport":{"type":"string","description":"3-letter iata code for the airport at which the segment is scheduled to depart."},"depTerminal":{"type":"string","description":"The terminal at the departure airport from which the segment is scheduled to depart.","nullable":true},"depTime":{"type":"string","description":"The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`YYYYMMSS`."},"duration":{"type":"integer","description":"The duration of the segment in munites."},"flightNumber":{"type":"string","description":"Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number."},"operatingCarrier":{"type":"string","description":"2-letter iata code for the operating carrier. The airline actually operating this segment. This may differ from the marketing carrier in the case of a \"codeshare\", where one airline sells flights operated by another airline.","nullable":true},"operatingFlightnumber":{"type":"string","description":"Operating flight number.","nullable":true}},"required":["arrAirport","arrTime","carrier","codeShare","depAirport","depTime","duration","flightNumber"]},"nullable":true}},"required":["fromSegments"],"description":"The current flight schedule. It may be different from that at the time of booking (flight schedule change)."},"paxTicketInfos":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Echo the passenger's name, in the format of last name/first name"},"ticketNos":{"type":"array","items":{"type":"string","description":"Airline PNRs. The array count would be the same as ticketnos count"},"description":"Ticket numbers. There may be two tickets for the round trip, in which case the number of arrays is two."},"airlinePNRs":{"type":"array","items":{"type":"string"},"description":"A list containing airline PNR. There may be two PNRs for the round trip, in which case the number of arrays is two."},"ancillaries":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"Unique identifier for the ancillary product."},"segmentIndex":{"type":"integer","description":"The index of segment the ancillary applies to."},"currency":{"type":"string","description":"The currency in which Atlas settles transactions with you"},"ancillaryPrice":{"type":"number","description":"Price for this ancillary."},"auxBaggageElement":{"type":"object","properties":{"isAllWeight":{"type":"boolean","description":"Mark whether the`weight`field restricts the total weight or the weight of a single piece.\n- `true`: The weight is for all the pieces\n- `false`: The weight is for each piece"},"piece":{"type":"integer","description":"The maximum number of pieces that can be purchased per person.\n- `0`: No Limitation about piece\n- `>0`: Maximum pieces"},"size":{"type":"string","description":"Maximum size for the baggage","nullable":true},"weight":{"type":"integer","description":"The maximum weight that can be purchased per person.\n- `0`: No limitation for weight\n- `>0`: Weight limit (KG)"}},"description":"Baggage specification limitations. This node is valid only when the ancillary type (`categoryCode`) is baggage.","required":["isAllWeight","piece","weight"],"nullable":true},"auxSeatElement":{"type":"object","properties":{"row":{"type":"string","description":"Seat row"},"column":{"type":"string","description":"Seat column"}},"required":["row","column"],"description":"Seat selection for the specific passenger","nullable":true},"vendorCurrency":{"type":"string","description":"The currency in which the vendor charges for the ancillary. If the fare does not allow for the VCC pass-through or BYOA payment, this information will be`null`."},"vendorPrice":{"type":"integer","description":"The price charged by the vendor for the ancillary. If the fare does not allow for the VCC pass-through or BYOA payment, this information will be`null`."},"displayCurrency":{"type":"string","description":"Display currency","nullable":true},"displayPrice":{"type":"number","description":"Display price","nullable":true}},"required":["currency","ancillaryPrice","productCode","segmentIndex"]},"description":"Ancillaries selection for the specific passenger","nullable":true},"contactEmails":{"type":"array","items":{"type":"string"},"description":"Passenger contact email address.","nullable":true},"contactPhones":{"type":"array","items":{"type":"string"},"description":"Passenger contact phone number.","nullable":true},"ticketStatus":{"type":"string","description":"Ticket status","enum":["OPEN_FOR_USE","REFUND","USED","PARTIALLY_USED","NOSHOW","UNKNOWN"]}},"required":["ticketStatus","name","ticketNos","airlinePNRs"]},"description":"Ticket information for each passenger."},"contact":{"type":"object","properties":{"email":{"type":"string","description":"Contact email.","nullable":true},"companyName":{"type":"string","description":"Company name.","nullable":true}}}},"required":["airlinePnr","routing","paxTicketInfos","contact","pnrStatus","status","pnrUsed"]}}},"headers":{}}}}}}}
```
