> For the complete documentation index, see [llms.txt](https://resources.atriptech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.atriptech.com/api-wen-dang/api-can-kao/yu-ding-hou-api/ti-qu-pnr.md).

# 提取 PNR

{% hint style="info" %}
遇到 API 接入问题时，可登录 [Eva](https://www.atriptech.com/) 寻求帮助。
{% 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"},"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":[],"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":{}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://resources.atriptech.com/api-wen-dang/api-can-kao/yu-ding-hou-api/ti-qu-pnr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
