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 object
  • status string

    pet status in the store

    Values are available, pending, or sold.

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 object
  • status string

    pet status in the store

    Values are available, pending, or sold.

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 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 object
    • status string

      pet status in the store

      Values are available, pending, or sold.

    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 object
    • status string

      pet status in the store

      Values are available, pending, or sold.

  • Invalid input

curl \
 -X POST /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"}'
curl \
 -X POST /v3/pet \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/xml"
curl \
 -X POST /v3/pet \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'id=10&name=doggie&category=%7B%22id%22%3D%3E1%2C+%22name%22%3D%3E%22Dogs%22%7D&photoUrls=string&tags=%7B%22id%22%3D%3E42%2C+%22name%22%3D%3E%22string%22%7D&status=available'
Request example
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}
Request example
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">10</id>
  <name>doggie</name>
  <category>
    <id type="integer">1</id>
    <name>Dogs</name>
  </category>
  <photoUrls type="array">
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags type="array">
    <tag>
      <id type="integer">42</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</root>
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id type="integer">10</id>
  <name>doggie</name>
  <category>
    <id type="integer">1</id>
    <name>Dogs</name>
  </category>
  <photoUrls type="array">
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags type="array">
    <tag>
      <id type="integer">42</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</root>
Response examples (200)
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 42,
      "name": "string"
    }
  ],
  "status": "available"
}