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

{
  "id": "fzUb152JIMiDvIJEQ6kv4",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "/api/v1/prescriptions/{id}/refills/{refill}",
    "servers": [],
    "name": "Update Prescriptions",
    "description": "Update Prescriptions for Pet",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "refill",
          "type": "integer",
          "description": "Refill Id"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "vet_id",
              "kind": "required",
              "type": "integer",
              "description": "",
              "example": 1
            },
            {
              "name": "type",
              "kind": "optional",
              "type": "integer",
              "description": "`0` - External `1` - In House\n",
              "example": 0
            },
            {
              "name": "refilled_at",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "example": "2020-01-01"
            },
            {
              "name": "label",
              "kind": "optional",
              "type": "string",
              "description": "",
              "example": "1/2 Tablet every day"
            },
            {
              "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/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"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url /api/v1/prescriptions/{id}/refills/{refill} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"vet_id\": 1\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   \"vet_id\": 1\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/api/v1/prescriptions/{id}/refills/{refill}\", 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/prescriptions/{id}/refills/{refill}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"vet_id\": 1\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 = \"/api/v1/prescriptions/{id}/refills/{refill}\"\n\npayload = json.dumps({\n   \"vet_id\": 1\n})\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    \"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}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}