Get pet's prescription by id
1 min
GET
/api/v1/pets/{id}/prescriptions/{prescription}
Path Parameters
- prescriptionintegerrequiredDescription
Query Parameters
- includestringDescription
Responses
200
- object
- dataPrescription
- idintegerExample
- record_idintegerExample
- clinic_idintegerExample
- vet_idintegerExample
- pet_idintegerExample
- product_idintegerExample
- product_namestringExample
- typeintegerDescription
- quantityintegerExample
- unit_idintegerExample
- unitstringExample
- labelstringExample
- prescribed_atstring<date-time>Example
- expires_atstring<date-time>Example
- statusstring<ACTIVE | INACTIVE>Example
- internal_notesstringExample
- refills_receivedintegerExample
- max_refillsintegerExample
- last_refill_atstring<date-time>Example
- refillsRefill[]
- idintegerExample
- prescription_idintegerExample
- record_idintegerExample
- vet_idintegerExample
- typeintegerDescription
- labelstringExample
- refilled_atstring<date-time>Example
- is_initialboolean
- numberintegerExample
- internal_notesstringExample
- created_atstring<date-time>Example
- updated_atstring<date-time>Example
curl
curl --request GET \
--url /api/v1/pets/{id}/prescriptions/{prescription} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/v1/pets/{id}/prescriptions/{prescription}", 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/pets/{id}/prescriptions/{prescription}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/pets/{id}/prescriptions/{prescription}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// successful operation
{
"data": {
"id": 1,
"record_id": 1,
"clinic_id": 1,
"vet_id": 1,
"pet_id": 1,
"product_id": 1,
"product_name": "Product name",
"type": 0,
"quantity": 1,
"unit_id": 1,
"unit": "Unit",
"label": "Administer 1 tablet by mouth every 12 hours for 7 days",
"prescribed_at": "2020-01-01T00:00:00Z",
"expires_at": "2020-01-01T00:00:00Z",
"status": "ACTIVE",
"internal_notes": "Internal notes",
"refills_received": 1,
"max_refills": 3,
"last_refill_at": "2020-01-01T00:00:00Z",
"refills": [
{
"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"
}
],
"created_at": "2022-02-06T22:00:00.000000Z",
"updated_at": "2022-02-06T22:00:00.000000Z"
}
}