---
title: Add a new pet to the store JUST FOR TEST BODY ARRay
slug: custom-main-prod/add-a-new-pet-to-the-store-just-for-test-body-array
createdAt: 2025-06-24T07:41:50.931Z
---

{
  "id": "NStMjAGoV2I3-pTZtUEH9",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "//petstore.swagger.io/v2/example",
    "servers": [
      {
        "url": "//petstore.swagger.io/v2/example",
        "description": "Default server"
      },
      {
        "url": "//petstore.swagger.io/sandbox/example",
        "description": "Sandbox server"
      }
    ],
    "name": "Add a new pet to the store JUST FOR TEST BODY ARRay",
    "description": "Add new pet to the store inventory.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [],
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "integer",
                  "readOnly": true,
                  "description": "Pet ID",
                  "modelRef": "#/components/schemas/Id",
                  "customType": "Id",
                  "schema": []
                },
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "object",
                  "description": "Categories this pet belongs to",
                  "modelRef": "#/components/schemas/Category",
                  "customType": "Category",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Category ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Category name",
                      "example": ""
                    },
                    {
                      "name": "sub",
                      "kind": "optional",
                      "type": "object",
                      "description": "Test Sub Category",
                      "example": "",
                      "schema": [
                        {
                          "name": "prop1",
                          "kind": "optional",
                          "type": "string",
                          "description": "Dumb Property",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "The name given to a pet",
                  "example": "GuruIsExample",
                  "default": "FluffyIsDefault"
                },
                {
                  "name": "photoUrls",
                  "kind": "required",
                  "type": "string,integer,null",
                  "description": "The list of URL to a cute photos featuring pet",
                  "example": ""
                },
                {
                  "name": "friend",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/Pet",
                  "customType": "Pet",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Circular-Reference"
                    }
                  ]
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "Tags attached to the pet",
                  "modelRef": "#/components/schemas/Tag",
                  "customType": "Tag[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Tag ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Tag name",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "status",
                  "kind": "optional",
                  "type": "string<available | pending | sold>",
                  "description": "Pet status in the store",
                  "example": "",
                  "default": "pending"
                },
                {
                  "name": "petType",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of a pet",
                  "example": "k9"
                },
                {
                  "name": "huntingSkill",
                  "kind": "optional",
                  "type": "integer",
                  "example": ""
                }
              ],
              "modelRef": "#/components/schemas/Pet",
              "customType": "Pet"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "integer",
                  "readOnly": true,
                  "description": "Pet ID",
                  "modelRef": "#/components/schemas/Id",
                  "customType": "Id",
                  "schema": []
                },
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "object",
                  "description": "Categories this pet belongs to",
                  "modelRef": "#/components/schemas/Category",
                  "customType": "Category",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Category ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Category name",
                      "example": ""
                    },
                    {
                      "name": "sub",
                      "kind": "optional",
                      "type": "object",
                      "description": "Test Sub Category",
                      "example": "",
                      "schema": [
                        {
                          "name": "prop1",
                          "kind": "optional",
                          "type": "string",
                          "description": "Dumb Property",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "The name given to a pet",
                  "example": "GuruIsExample",
                  "default": "FluffyIsDefault"
                },
                {
                  "name": "photoUrls",
                  "kind": "required",
                  "type": "string,integer,null",
                  "description": "The list of URL to a cute photos featuring pet",
                  "example": ""
                },
                {
                  "name": "friend",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/Pet",
                  "customType": "Pet",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Circular-Reference"
                    }
                  ]
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "Tags attached to the pet",
                  "modelRef": "#/components/schemas/Tag",
                  "customType": "Tag[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Tag ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Tag name",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "status",
                  "kind": "optional",
                  "type": "string<available | pending | sold>",
                  "description": "Pet status in the store",
                  "example": "",
                  "default": "pending"
                },
                {
                  "name": "petType",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of a pet",
                  "example": "k9"
                },
                {
                  "name": "huntingSkill",
                  "kind": "optional",
                  "type": "integer",
                  "example": ""
                },
                {
                  "name": "packSize",
                  "kind": "required",
                  "type": "integer<int32>",
                  "description": "The size of the pack the dog is from",
                  "example": 0,
                  "default": 1
                }
              ],
              "type": "array",
              "modelRef": "#/components/schemas/Dog",
              "customType": "Dog[]"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "integer",
                  "readOnly": true,
                  "description": "Pet ID",
                  "modelRef": "#/components/schemas/Id",
                  "customType": "Id",
                  "schema": []
                },
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "object",
                  "description": "Categories this pet belongs to",
                  "modelRef": "#/components/schemas/Category",
                  "customType": "Category",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Category ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Category name",
                      "example": ""
                    },
                    {
                      "name": "sub",
                      "kind": "optional",
                      "type": "object",
                      "description": "Test Sub Category",
                      "example": "",
                      "schema": [
                        {
                          "name": "prop1",
                          "kind": "optional",
                          "type": "string",
                          "description": "Dumb Property",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "The name given to a pet",
                  "example": "GuruIsExample",
                  "default": "FluffyIsDefault"
                },
                {
                  "name": "photoUrls",
                  "kind": "required",
                  "type": "string,integer,null",
                  "description": "The list of URL to a cute photos featuring pet",
                  "example": ""
                },
                {
                  "name": "friend",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/Pet",
                  "customType": "Pet",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Circular-Reference"
                    }
                  ]
                },
                {
                  "name": "tags",
                  "kind": "optional",
                  "type": "array",
                  "description": "Tags attached to the pet",
                  "modelRef": "#/components/schemas/Tag",
                  "customType": "Tag[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "integer",
                      "readOnly": true,
                      "description": "Tag ID",
                      "modelRef": "#/components/schemas/Id",
                      "customType": "Id",
                      "schema": []
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "Tag name",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "status",
                  "kind": "optional",
                  "type": "string<available | pending | sold>",
                  "description": "Pet status in the store",
                  "example": "",
                  "default": "pending"
                },
                {
                  "name": "petType",
                  "kind": "optional",
                  "type": "string",
                  "description": "Type of a pet",
                  "example": "k9"
                },
                {
                  "name": "huntingSkill",
                  "kind": "optional",
                  "type": "integer",
                  "example": ""
                },
                {
                  "name": "honeyPerDay",
                  "kind": "required",
                  "type": "number",
                  "description": "Average amount of honey produced per day in ounces",
                  "example": 3.14
                }
              ],
              "modelRef": "#/components/schemas/HoneyBee",
              "customType": "HoneyBee"
            }
          ],
          "complexType": "oneOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "User Link Example",
            "code": "// User example in XML\n// https://foo.bar/examples/user-example.xml"
          },
          {
            "label": "use2r",
            "code": "// User example in XML aaa\n{\n  \"name\": \"Fluffy\",\n  \"petType\": \"Cat\",\n  \"color\": \"White\",\n  \"gender\": \"male\",\n  \"breed\": \"Persian\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ApiResponse",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/ApiResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url //petstore.swagger.io/v2/example \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"FluffyIsDefault\",\n     \"photoUrls\": \"\",\n     \"status\": \"pending\"\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"FluffyIsDefault\",\n   \"photoUrls\": \"\",\n   \"status\": \"pending\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"//petstore.swagger.io/v2/example\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"//petstore.swagger.io/v2/example\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"FluffyIsDefault\",\n   \"photoUrls\": \"\",\n   \"status\": \"pending\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"//petstore.swagger.io/v2/example\"\n\npayload = json.dumps({\n   \"name\": \"FluffyIsDefault\",\n   \"photoUrls\": \"\",\n   \"status\": \"pending\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// successful operation\n{\n  \"code\": \"\",\n  \"type\": \"\",\n  \"message\": \"\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// successful operation\n{\n  \"code\": \"\",\n  \"type\": \"\",\n  \"message\": \"\"\n}"
            },
            {
              "label": "User Link Example",
              "code": "// User example in XML\n// https://foo.bar/examples/user-example.xml"
            },
            {
              "label": "use2r",
              "code": "// User example in XML aaa\n{\n  \"name\": \"Fluffy\",\n  \"petType\": \"Cat\",\n  \"color\": \"White\",\n  \"gender\": \"male\",\n  \"breed\": \"Persian\"\n}"
            }
          ]
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "evp782Sq1QJyRfKutQgpV",
      "type": "paragraph",
      "children": [
        {
          "text": "Add new pet to the store inventory."
        }
      ]
    }
  ]
}