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

Update Pet

PUT
/pets/{id}
Update information for an existing pet in the catalog.
Authentication: Requires write:pets scope or Bearer token

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
Path Params

Query Params

Header Params

Cookie Params

Body Params application/jsonRequired

Example
{
    "status": "PENDING"
}

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 --location --globoff --request PUT '/pets/?q_on_gp=q_on_gp_value&query_same_1=query_same_1_gp&q_on_gp_request_off=q_on_gp_request_off_value&glo_qparam_use_glo={{id_glo}}&glo_qparam_use_env={{id_env}}&glo_qparam_use_prior={{priority_env}}' \
--header 'h_on_gp: h_on_gp_value' \
--header 'header_same_1: header_same_1_gp' \
--header 'plat-form: {{header}}' \
--header 'h_on_gp_request_off: h_on_gp_case_off_value' \
--header 'glo_hparam_use_glo: {{id_glo}}' \
--header 'glo_hparam_use_env: {{id_env}}' \
--header 'glo_hparam_use_prior: {{priority_env}}' \
--header 'header_long: l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmnl=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn=end' \
--header 'Authorization: Bearer <token>' \
--header 'Cookie: c_on_gp=c_on_gp_value;c_on_gp_request_off=c_on_gp_request_off_value;c_on_gp=c_on_gp_value;cookie_same_1=cookie_same_1_gp;cookie_long=l=eBO-G2Fng9CH5uxF2Ofahurza77OSIOYYuPzaNbMiOCP_Xfp5gxlW6pndVL9C31Vh6DWR3-82bJHBeYBcIfEiOp2AJ-YF8Mmn;c1=cookieInGlobalCookie;c_on_gp_request_off=c_on_gp_request_off_value;glo_cparam_use_glo={{id_glo}};glo_cparam_use_env={{id_env}};glo_cparam_use_prior={{priority_env}};c1=cookieInGlobalHeader' \
--header 'Content-Type: application/json' \
--data '{
    "status": "PENDING"
}'

Responses

🟢200OK
application/json
Pet updated 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:55:08
Previous
slug-multiple modified
Next
Create User
Built with