View Categories

Updates a pet in the store with form data.

< 1 min read

POST/pet/{petId}

Code Samples #

  • 💻 cURL
  • 📄 JavaScript
  • 🐍 Python
  • 🐘 PHP
  • 🔷 C#
  • Java
Copy
curl --request POST \
  --url '/api/v3/pet/{petId}' \
  --header 'Authorization: Bearer YOUR_TOKEN'

Updates A pet resource based on the form data.

Path Parameters #

NameTypeRequiredDescription
petIdinteger (int64)RequiredID of pet that needs to be updated

Query Parameters #

NameTypeRequiredDescription
namestringOptionalName of pet that needs to be updated
statusstringOptionalStatus of pet that needs to be updated

Responses #

200 — successful operation #

FieldTypeRequiredDescription
idinteger (int64)Optional
namestringRequired
categoryobjectOptional
category.idinteger (int64)Optional
category.namestringOptional
photoUrlsarray of stringRequired
tagsarray of objectOptional
statusstringOptionalpet status in the store Allowed: available, pending, sold
📋
Example 200 response
Copy
{
    "id": 10,
    "name": "doggie",
    "category": {
        "id": 1,
        "name": "Dogs"
    },
    "photoUrls": [
        "string"
    ],
    "tags": [
        {
            "id": 1,
            "name": "string"
        }
    ],
    "status": "available"
}

400 — Invalid input #

default — Unexpected error #

Response #

200
{
    "id": 10,
    "name": "doggie",
    "category": {
        "id": 1,
        "name": "Dogs"
    },
    "photoUrls": [
        "string"
    ],
    "tags": [
        {
            "id": 1,
            "name": "string"
        }
    ],
    "status": "available"
}

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.