---
title: Archive Pet
slug: archive-pet
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "xmGgcI8qfbKanciBxMDmh",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://developer.digitail.io/api/v1/pets/{id}/archive",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/pets/{id}/archive",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/pets/{id}/archive",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Archive Pet",
    "description": "<p>Permissions needed: ACCESS_PATIENTS\nArchive a Pet</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "clinic_id",
              "kind": "optional",
              "type": "integer",
              "description": "Clinic ID",
              "example": 766
            },
            {
              "name": "vet_id",
              "kind": "optional",
              "type": "integer",
              "nullable": true,
              "description": "Vet ID",
              "example": ""
            },
            {
              "name": "archive_type_id",
              "kind": "optional",
              "type": "integer",
              "description": "<p><code>1</code> - Deceased <code>2</code> - Moved away <code>3</code> - Change of owner <code>4</code> - Other</p>",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ]
            },
            {
              "name": "reason",
              "kind": "optional",
              "type": "string",
              "description": "<p>Reason/Comment</p>",
              "example": "We archived Daisy because she moved away."
            }
          ],
          "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": "",
        "jsonExample": ""
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "hXOO0kFv6BNzNxGLSKziA",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://developer.digitail.io/api/v1/pets/{id}/archive \\\n     --header 'accept: application/json'"
        },
        {
          "id": "4QVf-NpcU_eJuh6x3iXKG",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/pets/{id}/archive\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Wwb7mAnJQFt1QztYTa2C6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/pets/{id}/archive\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "PATpTdPrhXO0EN55e4kct",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/pets/{id}/archive\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "hXOO0kFv6BNzNxGLSKziA"
    },
    "results": {
      "languages": [
        {
          "id": "VX03HTRSFr93BjbyXNQBo",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "VX03HTRSFr93BjbyXNQBo"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}