Add a new pet to the store

POST /pet

Add a new pet to the store

Body Required

Create a new pet in the store

  • id integer(int64)
  • name string Required
  • category object
    Hide category attributes Show category attributes object
  • photoUrls array[string] Required
  • tags array[object]
    Hide tags attributes Show tags attributes array[object]
  • status string

    pet status in the store

    Values are available, pending, or sold.

Responses

  • Successful operation

    Hide response attributes Show response attributes object
    • id integer(int64)
    • name string Required
    • category object
      Hide category attributes Show category attributes object
    • photoUrls array[string] Required
    • tags array[object]
      Hide tags attributes Show tags attributes array[object]
    • status string

      pet status in the store

      Values are available, pending, or sold.

  • Invalid input

POST /pet
curl \
 -X POST /api/v3/pet \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":42,"name":"string"}],"status":"available"}'
Request example
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}
Request examples
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}
Response examples (200)
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}
Response examples (200)
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}