---
title: Update Prescription for Pet
slug: update-prescription-for-pet
docTags: 
createdAt: 2026-04-21T15:22:49.957Z
---

{
  "id": "xr1CaM8sa_jyWCTzth4HO",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://developer.digitail.io/api/v1/pets/{id}/prescriptions/{prescription}",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/pets/{id}/prescriptions/{prescription}",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/pets/{id}/prescriptions/{prescription}",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Update Prescription for Pet",
    "description": "<p>Permissions needed: ACCESS_PATIENTS\nUpdate Prescriptions for Pet</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "prescription",
          "type": "integer",
          "description": "Prescription Id"
        }
      ],
      "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": "vet_id",
              "kind": "optional",
              "type": "integer",
              "description": "",
              "example": 1
            },
            {
              "name": "product_id",
              "kind": "optional",
              "type": "integer",
              "description": "",
              "example": 1
            },
            {
              "name": "product_name",
              "kind": "optional",
              "type": "string",
              "description": "<p>(required when product_id is  null)</p>"
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "integer",
              "description": "<p><code>0</code> - External <code>1</code> - In House</p>",
              "example": 0,
              "enum": [
                "0",
                "1"
              ]
            },
            {
              "name": "quantity",
              "kind": "optional",
              "type": "integer",
              "description": "",
              "example": 5
            },
            {
              "name": "unit_id",
              "kind": "optional",
              "type": "integer",
              "description": "",
              "example": 1
            },
            {
              "name": "unit",
              "kind": "optional",
              "type": "string",
              "description": "<p>(required when unit_id is  null)</p>",
              "example": "Tablet"
            },
            {
              "name": "label",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Label",
              "example": "1/2 Tablet every day"
            },
            {
              "name": "prescribed_at",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "example": "2020-01-01",
              "format": "date"
            },
            {
              "name": "expiration_date",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "example": "2020-01-01",
              "format": "date"
            },
            {
              "name": "status",
              "kind": "optional",
              "type": "string<ACTIVE | INACTIVE>",
              "description": "",
              "example": "ACTIVE",
              "enum": [
                "ACTIVE",
                "INACTIVE"
              ]
            },
            {
              "name": "internal_notes",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "",
              "example": "Internal notes"
            }
          ],
          "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~1%7Bid%7D~1prescriptions/post/responses/201/content/application~1json/schema/properties/data",
                "customType": "data",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "ZrVMpL0kF3rxk78OENs8X",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://developer.digitail.io/api/v1/pets/{id}/prescriptions/{prescription} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "oC3QrMZAw8o-jO85pAV1e",
          "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}/prescriptions/{prescription}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "EpxnY7kk0uCUaQ_Mk2V9C",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/pets/{id}/prescriptions/{prescription}\")\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": "HYcaTLe42VqXxRbaCo5Rh",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/pets/{id}/prescriptions/{prescription}\"\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": "ZrVMpL0kF3rxk78OENs8X"
    },
    "results": {
      "languages": [
        {
          "id": "d4La4zZOfm3YM1hzy0LGJ",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {}\n}"
        }
      ],
      "selectedLanguageId": "d4La4zZOfm3YM1hzy0LGJ"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}