Passer une commande pour un animal de compagnie
Passer une commande pour un animal de compagnie.
POST https://petstore3.swagger.io/api/v3/store/order
Exemples
- API Key
- OAuth 2.0
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
}'
cURL
POST "https://petstore3.swagger.io/api/v3/store/order" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
-d '{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}'
Réponses
| Code | Description |
|---|---|
| 200 | Opération réussie |
| 400 | Commande non valide |
| default | Erreur inattendue |
Exemple de réponse
200: Opération réussie
Response
{
"id": 0,
"petId": 0,
"quantity": 0,
"shipDate": "2025-08-11T15:13:06.939Z",
"status": "placed",
"complete": false
}
Paramètres
Corps de la requête
| Nom | Type | Description |
|---|---|---|
body | Objet Order | Requis. L'objet Order correspondant à l'animal. |