Electronic Prescriptions
Notifications
Orders
Patients
Prescribers
Products and Materials
Reports
Search
Webhooks
Electronic Prescriptions
Create a new electronic prescription
Deliver an electronic prescription to Blend either in SCRIPT XML or JSON.
POST
/
api
/
v1
/
electronic_prescriptions
Copy
curl --request POST \
--url https://api.byblend.com/api/v1/electronic_prescriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"medication": {
"days_supply": 30,
"description": "<string>",
"drug_name": "Levothyroxine",
"notes": "<string>",
"prescription_product_id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"product_code": "HC-RAPA31",
"quantity": 30,
"refills": 4,
"sig": "<string>",
"substitution_allowed": true,
"units": "C48480",
"written_at": "2025-04-25T00:00:00"
},
"order": {
"id": "<string>",
"order_number": "<string>"
},
"patient": {
"id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"external_id": "HEALTHCO_PATIENT_9271227"
},
"prescriber": {
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708"
}
}'
Copy
{
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"created_at": "2025-03-15T12:00:00Z",
"updated_at": "2025-03-15T12:00:00Z",
"customer_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"patient_id": "<string>",
"prescriber_id": "<string>",
"source": "surescripts",
"type": "NewRx",
"medication": {
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"customer_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"electronic_prescription_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"patient_id": "<string>",
"prescriber_id": "<string>",
"prescription_product_id": "<string>",
"days_supply": 30,
"description": "<string>",
"directions": "<string>",
"drug_name": "<string>",
"expires_at": "2026-04-25T00:00:00",
"fills_remaining": 3,
"name": "Topical Rapamycin",
"notes": "Please dispense 30 days supply",
"product_code": "<string>",
"product_code_type": "<string>",
"quantity": 30,
"refills": 2,
"serial_number": "100721",
"sig": "<string>",
"status": "new",
"strength": "<string>",
"substitution_allowed": true,
"units": "Milliliter",
"written_at": "2025-04-25T00:00:00"
},
"reference_number": "<string>",
"patient": {
"patientid": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"preferred_first_name": "<string>",
"preferred_last_name": "<string>",
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"phone": "<string>",
"email": "<string>",
"is_pregnant": true
},
"prescriber": {
"npi": "<string>",
"dea": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"phone": "<string>"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
By default, electronic prescriptions reference existing Blend patients. If you have configured Blend to create patients from electronic prescriptions, you must send all required patient data in your electronic prescription.
Response
200 - application/json
Successful response with electronic prescription
The response is of type object
.
Copy
curl --request POST \
--url https://api.byblend.com/api/v1/electronic_prescriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"medication": {
"days_supply": 30,
"description": "<string>",
"drug_name": "Levothyroxine",
"notes": "<string>",
"prescription_product_id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"product_code": "HC-RAPA31",
"quantity": 30,
"refills": 4,
"sig": "<string>",
"substitution_allowed": true,
"units": "C48480",
"written_at": "2025-04-25T00:00:00"
},
"order": {
"id": "<string>",
"order_number": "<string>"
},
"patient": {
"id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"external_id": "HEALTHCO_PATIENT_9271227"
},
"prescriber": {
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708"
}
}'
Copy
{
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"created_at": "2025-03-15T12:00:00Z",
"updated_at": "2025-03-15T12:00:00Z",
"customer_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"patient_id": "<string>",
"prescriber_id": "<string>",
"source": "surescripts",
"type": "NewRx",
"medication": {
"id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
"customer_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"electronic_prescription_id": "b658f16f-819c-4503-aede-bd555fc4ebfb",
"patient_id": "<string>",
"prescriber_id": "<string>",
"prescription_product_id": "<string>",
"days_supply": 30,
"description": "<string>",
"directions": "<string>",
"drug_name": "<string>",
"expires_at": "2026-04-25T00:00:00",
"fills_remaining": 3,
"name": "Topical Rapamycin",
"notes": "Please dispense 30 days supply",
"product_code": "<string>",
"product_code_type": "<string>",
"quantity": 30,
"refills": 2,
"serial_number": "100721",
"sig": "<string>",
"status": "new",
"strength": "<string>",
"substitution_allowed": true,
"units": "Milliliter",
"written_at": "2025-04-25T00:00:00"
},
"reference_number": "<string>",
"patient": {
"patientid": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"preferred_first_name": "<string>",
"preferred_last_name": "<string>",
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"phone": "<string>",
"email": "<string>",
"is_pregnant": true
},
"prescriber": {
"npi": "<string>",
"dea": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"phone": "<string>"
}
}
Assistant
Responses are generated using AI and may contain mistakes.