> 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-document/readme/booking-overview/query-order.md).

# Query Order

{% 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 %}

Use this page to check the latest booking state.

Start here when you need to:

* track ticketing after `pay.do`
* confirm whether an order is already paid or ticketed
* read airline PNR and ticket details after fulfillment

### FAQ

#### When should I call `queryOrderDetails.do`?

Call it after `order.do` or `pay.do` when you need the latest order state.

Use it as the main follow-up API until the booking reaches the final state.

#### What should I check in the order query response?

Check `orderStatus`, `ticketStatus`, airline PNR details, and ticket numbers.

Use these fields to confirm whether ticketing is still in progress or already complete.

### Main API

* `queryOrderDetails.do`

### Use this when you need

* Poll ticketing progress
* Retrieve booking and passenger details
* Confirm airline PNR and final status

### Common checks

* `orderStatus`
* `ticketStatus`
* Airline PNR details
* Ancillary and fare data

### What does order query help you decide?

Use it to decide:

* whether payment should be retried or not
* whether ticketing is still processing
* whether airline PNR and ticket numbers are already available
* whether post-booking actions can start

### Best practice

Use `queryOrderDetails.do` as the main status source after payment.

Webhook can help, but it should not be your only confirmation path.

If payment may already be in progress or completed, query the order before any retry.

### Related pages

* [Payment & Ticketing](/api-document/readme/booking-overview/payment-and-ticketing.md)
* [Post-ticketing Ancillaries](/api-document/readme/post-booking-overview/post-booking-operations/post-ticketing-ancillaries.md)
* [Webhook Overview](/api-document/readme/webhook-overview.md)
* [Booking APIs](/api-document/api-reference/booking-apis.md)

### Full API reference

See endpoint-level details here:

* [Query Order](/api-document/api-reference/booking-apis/query-order.md)


---

# 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-document/readme/booking-overview/query-order.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.
