Update Prescriptions
1 min
PATCH
/api/v1/prescriptions/{id}/refills/{refill}
Path Parameters
- refillintegerrequiredDescription
Body Parameters
- bodyobjectrequired
- vet_idintegerrequiredExample
- typeintegerDescription
- refilled_atstring<date>Example
- labelstringExample
- internal_notesstringExample
Responses
200
- object
- dataRefill
- idintegerExample
- prescription_idintegerExample
- record_idintegerExample
- vet_idintegerExample
- typeintegerDescription
- labelstringExample
- refilled_atstring<date-time>Example
- is_initialboolean
- numberintegerExample
- internal_notesstringExample
curl
curl --request PATCH \
--url /api/v1/prescriptions/{id}/refills/{refill} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"vet_id": 1
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"vet_id": 1
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/api/v1/prescriptions/{id}/refills/{refill}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/v1/prescriptions/{id}/refills/{refill}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"vet_id": 1
})
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/prescriptions/{id}/refills/{refill}"
payload = json.dumps({
"vet_id": 1
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// successful operation
{
"data": {
"id": 1,
"prescription_id": 1,
"record_id": 1,
"vet_id": 1,
"type": 0,
"label": "Refill",
"refilled_at": "2020-01-01T00:00:00.000Z",
"is_initial": false,
"number": 1,
"internal_notes": "Internal Notes"
}
}