Place an order for a pet
POSThttps://petstore.swagger.io/v2/store/order
Request
- application/json
Body
required
order placed for purchasing the pet
quantity int32
Possible values: >= 1
Default value: 1
shipDate date-time
Estimated ship date
status string
Possible values: [placed
, approved
, delivered
]
Order Status
requestId string
Unique Request Id
Responses
- 200
- 400
successful operation
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
id int64
petId int64
quantity int32
Possible values: >= 1
Default value: 1
shipDate date-time
Estimated ship date
status string
Possible values: [placed
, approved
, delivered
]
Order Status
complete boolean
Indicates whenever order was completed or not
{
"id": 0,
"petId": 0,
"quantity": 1,
"shipDate": "2024-07-03T19:28:01.808Z",
"status": "placed",
"complete": false
}
- Schema
- Example (from schema)
Schema
id int64
petId int64
quantity int32
Possible values: >= 1
Default value: 1
shipDate date-time
Estimated ship date
status string
Possible values: [placed
, approved
, delivered
]
Order Status
complete boolean
Indicates whenever order was completed or not
<root>
<id>0</id>
<petId>0</petId>
<quantity>1</quantity>
<shipDate>2024-07-03T19:28:01.808Z</shipDate>
<status>placed</status>
<complete>false</complete>
</root>
Invalid Order
- application/json
- Schema
- Example (from schema)
- Example
Schema
any
{
"status": 400,
"message": "Invalid Order"
}
{
"status": 400,
"message": "Invalid Order"
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://petstore.swagger.io/v2/store/order' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"quantity": 1,
"shipDate": "2024-07-03T19:28:01.772Z",
"status": "placed",
"requestId": "string"
}'
ResponseClear