跳到主要内容

订购宠物

为宠物下达一份购买订单。

POST https://petstore3.swagger.io/api/v3/store/order

示例

cURL
POST "https://petstore3.swagger.io/api/v3/store/order" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d '{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}'

响应

状态码描述
200操作成功
400订单无效
default意外错误
响应示例

200: 操作成功

Response
{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}

参数

请求正文
参数名类型描述
bodyOrder 对象必填。 宠物的 Order 对象。