---
title: Update a Pet (JSON)
slug: update-a-pet-json
docTags: 
createdAt: 2026-07-30T11:35:40.526Z
---

{
  "id": "LMrL39IbezZKzu7zPe2w_",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://developer.digitail.io/api/v1/pets/{id}",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/pets/{id}",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/pets/{id}",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Update a Pet (JSON)",
    "description": "<p>Permissions needed: UPDATE_PATIENTS\nUpdate Pet by ID, empty values will overwrite, omit key to leave unchanged.\nFor text-only updates (no photo). To upload a new avatar, use the multipart/form-data operation on this same path instead, since file uploads are not delivered on a native PATCH request body.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "nickname",
              "kind": "optional",
              "type": "string",
              "description": "Nickname",
              "example": "Fluffy"
            },
            {
              "name": "birthday",
              "kind": "optional",
              "type": "string",
              "description": "<p>Birthday (Y-m-d)</p>",
              "example": "2017-11-28"
            },
            {
              "name": "species_id",
              "kind": "optional",
              "type": "integer",
              "nullable": true,
              "description": "Species Id.",
              "example": 1
            },
            {
              "name": "breed_id",
              "kind": "optional",
              "type": "integer",
              "description": "Breed ID.",
              "example": 1
            },
            {
              "name": "crossbreed",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Set to true if crossbreed. Do not send empty value, omit the key completely</p>"
            },
            {
              "name": "crossbreed_details",
              "kind": "optional",
              "type": "string",
              "description": "<p>Crossbreed id (see breeds endpoint) Do not send empty value, omit the key completely</p>"
            },
            {
              "name": "color",
              "kind": "optional",
              "type": "string",
              "description": "Color",
              "example": "Pink"
            },
            {
              "name": "color_mask",
              "kind": "optional",
              "type": "array",
              "nullable": true,
              "description": "Color mask",
              "example": "",
              "itemType": "integer",
              "customType": "integer[]",
              "itemExample": 1,
              "itemDefault": ""
            },
            {
              "name": "distinctive_marks",
              "kind": "optional",
              "type": "string",
              "description": "Distinctive marks",
              "example": "One spot on right ear"
            },
            {
              "name": "gender",
              "kind": "optional",
              "type": "string<male | female | unknown>",
              "description": "Gender",
              "enum": [
                "male",
                "female",
                "unknown"
              ]
            },
            {
              "name": "observations",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p>Observations (Pet notes)</p>"
            },
            {
              "name": "chip_number",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Chip number",
              "example": "123456789"
            },
            {
              "name": "microchip_location",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Microchip  Location",
              "example": "Neck"
            },
            {
              "name": "insurance_number",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Insurance Number",
              "example": "123456789"
            },
            {
              "name": "insurance_provider",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Insurance Provider",
              "example": "Petplan"
            },
            {
              "name": "policy_id",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Policy ID",
              "example": "POLICY-123"
            },
            {
              "name": "passport",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Passport",
              "example": "123456789"
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Description"
            },
            {
              "name": "constitution",
              "kind": "optional",
              "type": "string",
              "description": "Constitution"
            },
            {
              "name": "conformation",
              "kind": "optional",
              "type": "string",
              "description": "Conformation"
            },
            {
              "name": "allergies",
              "kind": "optional",
              "type": "string",
              "description": "Allergies"
            },
            {
              "name": "blood_type_id",
              "kind": "optional",
              "type": "integer",
              "description": "<p>Blood Type Id (see blood-types endpoint) Do not send empty value, omit the key completely</p>"
            },
            {
              "name": "hormonal_status",
              "kind": "optional",
              "type": "integer",
              "description": "<p>Hormonal Status (0=neutered,1=normal,2=unknown)</p>",
              "enum": [
                "0",
                "1",
                "2"
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "passport",
          "name": "passport",
          "kind": "optional",
          "type": "oauth2",
          "description": "Laravel passport oauth2 security.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://digitail.test/oauth/authorize",
              "tokenUrl": "https://digitail.test/oauth/token",
              "refreshUrl": "https://digitail.test/oauth/token"
            }
          }
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/post/responses/201/content/application~1json/schema/properties/data",
                "customType": "data",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "hSk2ge8VwqjvFVv1twrlr",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://developer.digitail.io/api/v1/pets/{id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "WDoLVNI1_Qw4kSI1hftLX",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/pets/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Kp0e38YLDzxsEPqJT9QR3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/pets/{id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "TbuP4tRkBl-cx_9jWn5Ox",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/pets/{id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "hSk2ge8VwqjvFVv1twrlr"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {}\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}