# Find purchase order by ID.

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.

[Find purchase order by ID.](https://clay-doc.github.io/clay-example-repo/api/petstore/store/get-order-by-id.md)

```sh
curl 'https://petstore3.swagger.io/api/v3/store/order/0'
```
## Authentication

No authentication needed.

## Parameters

::: fields
- `orderId` integer (int64) **required** *path*

  ID of order that needs to be fetched
:::

## Responses

::: tabs status
== 200

successful operation

:badge[application/json]{note} :badge[application/xml]{note} · Type: [Order](https://clay-doc.github.io/clay-example-repo/api/petstore/schemas/order.md)

::: fields
- `id` integer (int64)
- `petId` integer (int64)
- `quantity` integer (int32)
- `shipDate` string (date-time)
- `status` string

  Order Status

  Allowed values: `"placed"`, `"approved"`, `"delivered"`
- `complete` boolean
:::

::: code-group
```json [application/json]
{
  "id": 10,
  "petId": 198772,
  "quantity": 7,
  "shipDate": "2026-01-01T12:00:00Z",
  "status": "approved",
  "complete": true
}
```
```xml [application/xml]
<order>
  <id>10</id>
  <petId>198772</petId>
  <quantity>7</quantity>
  <shipDate>2026-01-01T12:00:00Z</shipDate>
  <status>approved</status>
  <complete>true</complete>
</order>
```
:::

== 400

Invalid ID supplied

== 404

Order not found

== default

Unexpected error
:::

---

All pages of these docs, as Markdown for language models: https://clay-doc.github.io/clay-example-repo/llms.txt
