View Categories

Place an order for a pet.

< 1 min read

POST/store/order

Code Samples #

  • 💻 cURL
  • 📄 JavaScript
  • 🐍 Python
  • 🐘 PHP
  • 🔷 C#
  • Java
Copy
curl --request POST \
  --url '/api/v3/store/order' \
  --header 'Content-Type: application/json' \
  --data '{
    "id": 10,
    "petId": 198772,
    "quantity": 7,
    "shipDate": "2024-01-15T09:30:00Z",
    "status": "approved",
    "complete": true
}'

Place A new order in the store.

Request Body #

Content type: application/json

FieldTypeRequiredDescription
idinteger (int64)Optional
petIdinteger (int64)Optional
quantityinteger (int32)Optional
shipDatestring (date-time)Optional
statusstringOptionalOrder Status Allowed: placed, approved, delivered
completebooleanOptional
📋
Example request
Copy
{
    "id": 10,
    "petId": 198772,
    "quantity": 7,
    "shipDate": "2024-01-15T09:30:00Z",
    "status": "approved",
    "complete": true
}

Responses #

200 — successful operation #

FieldTypeRequiredDescription
idinteger (int64)Optional
petIdinteger (int64)Optional
quantityinteger (int32)Optional
shipDatestring (date-time)Optional
statusstringOptionalOrder Status Allowed: placed, approved, delivered
completebooleanOptional
📋
Example 200 response
Copy
{
    "id": 10,
    "petId": 198772,
    "quantity": 7,
    "shipDate": "2024-01-15T09:30:00Z",
    "status": "approved",
    "complete": true
}

400 — Invalid input #

422 — Validation exception #

default — Unexpected error #

Response #

200
{
    "id": 10,
    "petId": 198772,
    "quantity": 7,
    "shipDate": "2024-01-15T09:30:00Z",
    "status": "approved",
    "complete": true
}

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.