跳到主要内容

按 ID 查找购买订单

按其 ID 查找购买订单。

GET https://petstore3.swagger.io/api/v3/store/order/{orderId}

示例​

cURL
curl -X GET "https://petstore3.swagger.io/api/v3/store/order/1" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

响应​

状态码描述
200操作成功
400提供的 ID 无效
404未找到订单
default意外错误

响应示例​

200: Successful operation

响应
{
"id": 1,
"petId": 210,
"quantity": 1,
"shipDate": "2026-11-14T15:13:06.939Z",
"status": "placed",
"complete": false
}

参数​

路径参数​

参数名类型描述
orderId整数要获取的购买订单的 ID