---
title: Update Prescriptions
slug: import-test-pdf/0MW8-update-prescriptions
createdAt: 2025-10-28T16:28:34.269Z
---

{
  "id": "vJknQIODSAUDcYSsAJ0BE",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "/api/v1/pets/{id}/prescriptions/{prescription}",
    "servers": [],
    "name": "Update Prescriptions",
    "description": "Update Prescriptions for Pet",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "prescription",
          "type": "integer",
          "description": "Prescription Id"
        }
      ],
      "headerParameters": [],
      "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": "(<font color='red'>required</font> when <i>product_id</i> is  <i>null</i>)",
              "example": ""
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "integer",
              "description": "`0` - External `1` - In House\n",
              "example": 0
            },
            {
              "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": "(<font color='red'>required</font> when <i>unit_id</i> is  <i>null</i>)",
              "example": "Tablet"
            },
            {
              "name": "label",
              "kind": "optional",
              "type": "string",
              "description": "Label",
              "example": "1/2 Tablet every day"
            },
            {
              "name": "prescribed_at",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "example": "2020-01-01"
            },
            {
              "name": "expiration_date",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "example": "2020-01-01"
            },
            {
              "name": "status",
              "kind": "optional",
              "type": "string<ACTIVE | INACTIVE>",
              "description": "",
              "example": "ACTIVE"
            },
            {
              "name": "internal_notes",
              "kind": "optional",
              "type": "string",
              "description": "",
              "example": "Internal notes"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/Prescription",
                "customType": "Prescription",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "record_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "vet_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "pet_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": "",
                    "example": "Product name"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "integer",
                    "description": "`0` - External `1` - In House\n",
                    "example": 0
                  },
                  {
                    "name": "quantity",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "unit_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "unit",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Unit"
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Administer 1 tablet by mouth every 12 hours for 7 days"
                  },
                  {
                    "name": "prescribed_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2020-01-01T00:00:00Z"
                  },
                  {
                    "name": "expires_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2020-01-01T00:00:00Z"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<ACTIVE | INACTIVE>",
                    "description": "",
                    "example": "ACTIVE"
                  },
                  {
                    "name": "internal_notes",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Internal notes"
                  },
                  {
                    "name": "refills_received",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "max_refills",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 3
                  },
                  {
                    "name": "last_refill_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2020-01-01T00:00:00Z"
                  },
                  {
                    "name": "refills",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/Refill",
                    "customType": "Refill[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "prescription_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "record_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "vet_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "integer",
                        "description": "`0` - External `1` - In House\n",
                        "example": 0
                      },
                      {
                        "name": "label",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Refill"
                      },
                      {
                        "name": "refilled_at",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "example": "2020-01-01T00:00:00.000Z"
                      },
                      {
                        "name": "is_initial",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "",
                        "example": false
                      },
                      {
                        "name": "number",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "internal_notes",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Internal Notes"
                      }
                    ]
                  },
                  {
                    "name": "created_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2022-02-06T22:00:00.000000Z"
                  },
                  {
                    "name": "updated_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2022-02-06T22:00:00.000000Z"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url /api/v1/pets/{id}/prescriptions/{prescription} \\\n     --header 'accept: application/json'"
        },
        {
          "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 requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/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": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v1/pets/{id}/prescriptions/{prescription}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\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 = \"/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": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"record_id\": 1,\n    \"clinic_id\": 1,\n    \"vet_id\": 1,\n    \"pet_id\": 1,\n    \"product_id\": 1,\n    \"product_name\": \"Product name\",\n    \"type\": 0,\n    \"quantity\": 1,\n    \"unit_id\": 1,\n    \"unit\": \"Unit\",\n    \"label\": \"Administer 1 tablet by mouth every 12 hours for 7 days\",\n    \"prescribed_at\": \"2020-01-01T00:00:00Z\",\n    \"expires_at\": \"2020-01-01T00:00:00Z\",\n    \"status\": \"ACTIVE\",\n    \"internal_notes\": \"Internal notes\",\n    \"refills_received\": 1,\n    \"max_refills\": 3,\n    \"last_refill_at\": \"2020-01-01T00:00:00Z\",\n    \"refills\": [\n      {\n        \"id\": 1,\n        \"prescription_id\": 1,\n        \"record_id\": 1,\n        \"vet_id\": 1,\n        \"type\": 0,\n        \"label\": \"Refill\",\n        \"refilled_at\": \"2020-01-01T00:00:00.000Z\",\n        \"is_initial\": false,\n        \"number\": 1,\n        \"internal_notes\": \"Internal Notes\"\n      }\n    ],\n    \"created_at\": \"2022-02-06T22:00:00.000000Z\",\n    \"updated_at\": \"2022-02-06T22:00:00.000000Z\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}