1. Pet
多站点验证multiple sites
  • Default module
    • Sample APIs
      • markdown_请检查图片是否访问正常
      • Find pet by ID
      • Add a new pet to the store
      • Update an existing pet
      • Deletes a pet
      • Finds Pets by status
  • module2
    • markdown2
    • markdown1
    • Pet
      • 无 slug
        GET
      • 1slug-a
        POST
      • slug-multiple modified
        GET
      • Update Pet
        PUT
    • User
      • Create User
      • Get User
    • Webhooks
      • Order Status Changed Event
      • Payment Succeeded Event
    • Websocket, Socket.IO & more
      • gRPC API
      • Other protocol API example
      • WebSocket example
      • Socket.IO example
      • Webhook example
      • GraphQL example
      • SSE example
      • SOAP example
    • Dashboard
      • Get Dashboard Stats
    • User Management
      • List Users
      • Get User Details
      • Update User Status
    • Order Management
      • List All Orders
      • Force Cancel Order
    • Audit Logs
      • Get Audit Log Details
  1. Pet

1slug-a

Testing
POST
/pets
Add a new pet to the store catalog, making it available for adoption.

Pet Lifecycle Workflow#

When a new pet enters the system:
1.
Intake: Staff creates a pet record with this endpoint (status: available)
2.
Profile: Pet details include species, breed, age, medical info, photos, and adoption fee
3.
Discovery: Pet appears in search results and listings
4.
Adoption Application: Potential adopters can apply through the adoption endpoints
5.
Adoption: Once approved, pet status changes to adopted
6.
Post-Adoption: Pet record is retained for historical purposes
Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
OAuth 2.0
Authorization Code
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.petstoreapi.com/authorize
Token URL: https://auth.petstoreapi.com/token
Refresh URL: https://auth.petstoreapi.com/refresh
Scopes:
write:pets-Create and update pets
or
Query Params

Header Params

Cookie Params

Body Params application/jsonRequired

Example
{
    "name": "Max",
    "species": "DOG",
    "breed": "Golden Retriever",
    "ageMonths": 24,
    "size": "LARGE",
    "color": "Golden",
    "gender": "MALE",
    "goodWithKids": true,
    "price": "250.00",
    "currency": "USD",
    "status": "AVAILABLE",
    "description": "Friendly golden retriever looking for an active family",
    "medicalInfo": {
        "vaccinated": true,
        "spayedNeutered": true,
        "microchipped": true,
        "specialNeeds": false,
        "healthNotes": "Up to date on all vaccinations"
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl -X POST 'https://api.petstoreapi.com/v1/pets' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "species": "dog",
    "name": "Buddy",
    "breed": "Golden Retriever",
    "ageMonths": 24,
    "size": "large",
    "color": "Golden",
    "gender": "male",
    "goodWithKids": true,

    "price": "150.00",
    "description": "Friendly golden retriever looking for an active family"
  }'

Responses

🟢201OK
application/json
Pet created successfully
Headers

Bodyapplication/json

Example
{
    "id": "019b4132-70aa-764f-b315-e2803d882a24",
    "species": "DOG",
    "name": "Whiskers",
    "breed": "Domestic Shorthair",
    "ageMonths": 18,
    "size": "SMALL",
    "color": "Orange Tabby",
    "gender": "MALE",
    "goodWithKids": true,
    "price": "75.00",
    "currency": "USD",
    "description": "string",
    "status": "AVAILABLE",
    "createdAt": "2025-12-21T13:56:23Z",
    "updatedAt": "2025-12-21T13:56:23Z",
    "tenantId": "550e8400-e29b-41d4-a716-446655440000",
    "photos": [
        "http://example.com"
    ],
    "medicalInfo": {
        "spayedNeutered": true,
        "vaccinated": true,
        "microchipped": true,
        "specialNeeds": true,
        "healthNotes": "string"
    }
}
🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠404NotFound
🟠429TooManyRequests
🔴500InternalServerError
Modified at 2026-07-13 05:58:04
Previous
无 slug
Next
slug-multiple modified
Built with