Skip to main content
Yes. Sending prescriptions directly to Blend over the API is an alternative to routing them through Surescripts, and is available for non-controlled substances only at this time. Post to /api/v1/prescriptions/electronic_prescriptions with either NCPDP SCRIPT XML (application/xml) or a JSON body. In JSON you supply a patient, a prescriber, and either a single medication or an array of medications. Blend then matches the prescription to a patient, a prescriber, and one of your products — you do not have to resolve those links yourself. A prescription can be sent before or after the patient and the order exist. Blend matches whenever the data is available, so ordering is not a constraint.

Send one prescription

Key fields:
  • product_code — your own code for the prescription product. Send this or prescription_product_id (the Blend UUID); you don’t need both.
  • units — an NCPDP quantity-unit code, not a word. C48480 is Capsule, C48542 is Tablet, C28253 is Milligram. Pull the full list from GET /prescriptions/quantity_units, which returns each code alongside its term and definition.
  • patient — reference an existing patient by id or external_id, or pass a full new-patient object to create one inline.
  • medications — use the array form when one prescription carries several drugs; each becomes its own prescription in Blend.

Sending SCRIPT XML instead

If you already generate NCPDP SCRIPT, post the raw XML with Content-Type: application/xml. Blend parses <ProductCode>, <DrugDescription>, and <Note> looking for matches against your products’ product_code, sku, id, or name.

Attaching it to an order

An order can be created before or after the prescription. If the order already exists, pass its id or order_number in the order object. If it doesn’t, create it afterwards with POST /orders and optionally list the prescription in electronic_prescription_ids to help matching along. To do all of it in one request, use the composite endpoint.

Create an electronic prescription

POST /prescriptions/electronic_prescriptions

Get quantity units

Valid NCPDP units codes

Get electronic prescription

Add include_xml=true for raw SCRIPT

Composite creation

Prescription + order in one call