Get Order
The Get Order endpoint is used to retrieve information about an existing store order from the Petstore system.
This operation returns order details based on the order ID provided in the request path.
Endpoint
GET /store/order/{orderId}
Base URL
https://petstore.swagger.io/v2/store/order/{orderId}
Path Parameters
| Parameter |
Type |
Required |
Description |
| orderId |
integer |
Yes |
Unique identifier of the order |
| Header |
Required |
Description |
| accept |
No |
Specifies the expected response format |
| api_key |
No |
API key used for authorized requests |
The endpoint supports the following response formats:
| Content Type |
Usage |
| application/json |
JSON response payload |
| application/xml |
XML response payload |
Sample Request
Successful Response
Response Codes
| Status Code |
Description |
| 200 |
Order details retrieved successfully |
| 400 |
Invalid order ID supplied |
| 404 |
Order not found |
Error Response Example
{
"code": 404,
"type": "error",
"message": "Order not found"
}
Notes
- The
orderId value must reference an existing order record.
- Invalid or non-existing order IDs may return an error response.
- JSON is the preferred response format for most integrations.
- Authentication may be required for protected environments or restricted resources.