Update Refill for Prescription
1 min
PATCH
https://developer.digitail.io/api/v1/prescriptions/{id}/refills/{refill}
Path Parameters
- refillintegerrequiredDescription
Body Parameters
- bodyobjectrequired
- vet_idintegerrequiredExample
- typeintegerDescriptionAllowed01
- refilled_atstring<date>ExampleFormatdate
- labelstringExample
- internal_notesstringExample
Responses
200
- object
- datadata
curl
curl --request PATCH \
--url https://developer.digitail.io/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("https://developer.digitail.io/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("https://developer.digitail.io/api/v1/prescriptions/{id}/refills/{refill}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"vet_id": 1
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://developer.digitail.io/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": {}
}