Preview an order
/v1/order-previewsRequires orders:write and catalog:read. Supply exactly one of patientId, patientExternalId, or inline patient details. External-ID lookup additionally requires patients:read; inline details require patients:write. Resolves defaults and explicit edits for 1–20 prescriptions. Reuses stored patient details when identifiers match; otherwise previews inline details without creating a patient. Complete previews contain an orders.create input. Does not create records, reserve prices, sign, charge or transmit. No idempotency key is required. Creation and signing recheck current requirements.
Request example
Replace example values with your Test data. Check the field rules below before you send a request.
{
"otcItems": [
{
"catalogItemId": "cat_01j2y8m6jcc9tt24af5pw9x1bc",
"quantity": 1
}
],
"practiceId": "prac_01j2y8m6jcc9tt24af5pw9x1bc",
"patientId": "pat_01j2y8m6jcc9tt24af5pw9x1bc",
"patientExternalId": "<string>",
"patient": {
"address": {
"city": "<string>",
"line1": "<string>",
"line2": null,
"postalCode": "<string>",
"state": "<string>",
"country": "US"
},
"clinicalProfile": {
"currentMedications": [
"<string>"
],
"heightInches": 0,
"reviewedAt": "<string>",
"weightPounds": 0
},
"dateOfBirth": "<string>",
"email": "<string>",
"externalId": "<string>",
"externalIdentities": [
{
"source": "<string>",
"value": "<string>"
}
],
"addresses": [
{
"id": "addr_01j2y8m6jcc9tt24af5pw9x1bc",
"address": {
"city": "<string>",
"country": "US",
"line1": "<string>",
"line2": null,
"postalCode": "<string>",
"state": "<string>"
},
"label": "<string>",
"preferredShipping": false,
"recipientName": "<string>"
}
],
"encounters": [
{
"notes": "<string>",
"occurredAt": "<string>",
"providerName": "<string>",
"type": "<string>"
}
],
"gender": "f",
"locationId": "loc_01j2y8m6jcc9tt24af5pw9x1bc",
"metadata": "<string>",
"medicalRecordNumber": "<string>",
"measurements": [
{
"heightCentimeters": 0,
"recordedAt": "<string>",
"source": "<string>",
"weightKilograms": 0
}
],
"name": {
"first": "<string>",
"last": "<string>",
"middle": "<string>",
"preferred": "<string>"
},
"phone": "<string>",
"programs": [
{
"endedAt": "<string>",
"name": "<string>",
"startedAt": "<string>",
"status": "active"
}
]
},
"userId": "user_01j2y8m6jcc9tt24af5pw9x1bc",
"prescriber": {
"id": "prov_01j2y8m6jcc9tt24af5pw9x1bc",
"npi": "<string>",
"externalId": "<string>",
"profile": {
"email": "<string>",
"phone": "<string>"
}
},
"shippingAddressId": "addr_01j2y8m6jcc9tt24af5pw9x1bc",
"externalOrderId": "<string>",
"prescriptions": [
{
"medicationId": "cat_01j2y8m6jcc9tt24af5pw9x1bc",
"externalPrescriptionId": "<string>",
"preset": "<string>",
"expectedRevision": "<string>",
"overrides": {
"sig": {
"format": "structured",
"fields": {
"dose": null,
"doseUnit": null,
"frequency": null,
"route": null,
"prn": null,
"duration": null,
"indication": null,
"maxDailyUse": null,
"titrationSchedule": null
}
},
"quantity": {
"value": 0,
"unit": "<string>"
},
"daysSupply": 0,
"refills": 0,
"clinical": {
"compoundingReason": null,
"medicationReviewStatus": null,
"diagnosisReviewStatus": null,
"currentMedications": null,
"diagnoses": null,
"observations": null
},
"dispensing": {
"dispenseUponAcceptance": false,
"shippingOptionId": "shp_01j2y8m6jcc9tt24af5pw9x1bc",
"shippingAmountCents": 0,
"shippingDestinationType": "patient",
"pharmacyNotes": "<string>",
"requestedFillDate": "<string>",
"substitutionPermitted": false
}
}
}
],
"shipping": {
"selection": "manual"
}
}curl -X POST 'https://api.affinityrx.com/v1/order-previews' \
-H "Authorization: Bearer $AFFINITY_API_KEY" \
-H 'Affinity-Version: 2026-09-28' \
-H 'Content-Type: application/json' \
--data @request.jsonResponse example
These examples show the body structure. Values can differ. Select a status code to see its response.
{
"clinicalRequirementsSatisfied": false,
"clinicalIssues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
],
"clinicalRequirements": [
{
"field": "<string>",
"label": "<string>",
"type": "allergy_review",
"required": false,
"status": "missing"
}
],
"otcItems": [
{
"catalogItemId": "cat_01j2y8m6jcc9tt24af5pw9x1bc",
"name": "<string>",
"quantity": 0,
"unitPriceCents": 0,
"subtotalCents": 0
}
],
"shippingGroups": [
{
"key": "<string>",
"pharmacy": "<string>",
"label": "<string>",
"temperature": "ambient",
"amountCents": 0,
"itemCount": 0,
"prescriptionIndexes": [
0
]
}
],
"totals": {
"currency": "USD",
"medicationSubtotalCents": 0,
"supplySubtotalCents": 0,
"shippingTotalCents": 0,
"estimatedTotalCents": 0
},
"object": "order_preview",
"livemode": false,
"prescriptions": [
{
"medicationId": "cat_01j2y8m6jcc9tt24af5pw9x1bc",
"revision": "<string>",
"directions": "<string>",
"structuredSig": {
"dose": "<string>",
"doseUnit": "<string>",
"frequency": "<string>",
"route": "<string>",
"prn": false,
"duration": "<string>",
"indication": "<string>",
"maxDailyUse": "<string>",
"titrationSchedule": "<string>"
},
"format": "structured",
"quantity": {
"value": 0,
"unit": "<string>"
},
"daysSupply": 0,
"daysSupplySource": "manual",
"refills": 0,
"shippingOptions": [
{
"amountCents": "<string>",
"carrier": "<string>",
"currency": "USD",
"estimatedDaysMax": "<string>",
"estimatedDaysMin": "<string>",
"id": "shp_01j2y8m6jcc9tt24af5pw9x1bc",
"label": "<string>",
"serviceLevel": "<string>",
"temperature": "ambient"
}
],
"shippingOptionId": "shp_01j2y8m6jcc9tt24af5pw9x1bc",
"medicationSubtotalCents": 0,
"shippingAmountCents": 0
}
],
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
],
"status": "complete",
"orderInput": {
"otcItems": "<string>",
"practiceId": "prac_01j2y8m6jcc9tt24af5pw9x1bc",
"userId": "user_01j2y8m6jcc9tt24af5pw9x1bc",
"prescriber": {
"id": "prov_01j2y8m6jcc9tt24af5pw9x1bc",
"npi": "<string>",
"externalId": "<string>",
"profile": {
"email": null,
"phone": "<string>"
}
},
"shippingAddressId": "addr_01j2y8m6jcc9tt24af5pw9x1bc",
"externalOrderId": "<string>",
"prescriptions": [
{
"externalPrescriptionId": "<string>",
"clinical": {
"compoundingReason": {
"category": null,
"context": null
},
"medicationReviewStatus": "not_reviewed",
"diagnosisReviewStatus": "not_reviewed",
"currentMedications": null,
"diagnoses": null,
"observations": null
},
"pharmacyId": "pharm_01j2y8m6jcc9tt24af5pw9x1bc",
"daysSupply": 1,
"dispensing": {
"dispenseUponAcceptance": false,
"shippingOptionId": "shp_01j2y8m6jcc9tt24af5pw9x1bc",
"shippingAmountCents": 0,
"shippingDestinationType": "patient",
"pharmacyNotes": "<string>",
"requestedFillDate": "<string>",
"substitutionPermitted": false
},
"directions": "<string>",
"medicationId": "cat_01j2y8m6jcc9tt24af5pw9x1bc",
"quantity": 0,
"quantityUnit": "<string>",
"refills": 0,
"structuredSig": {
"dose": "<string>",
"doseUnit": "<string>",
"duration": "<string>",
"frequency": "<string>",
"indication": "<string>",
"maxDailyUse": "<string>",
"prn": false,
"route": "<string>",
"titrationSchedule": "<string>"
}
}
],
"patientId": "pat_01j2y8m6jcc9tt24af5pw9x1bc",
"patient": {
"address": {
"city": null,
"line1": null,
"line2": null,
"postalCode": "<string>",
"state": "<string>",
"country": null
},
"clinicalProfile": {
"currentMedications": "<string>",
"heightInches": null,
"reviewedAt": null,
"weightPounds": null
},
"dateOfBirth": "<string>",
"email": "<string>",
"externalId": "<string>",
"externalIdentities": "<string>",
"addresses": "<string>",
"encounters": [
{
"notes": null,
"occurredAt": "<string>",
"providerName": null,
"type": null
}
],
"gender": "f",
"locationId": "loc_01j2y8m6jcc9tt24af5pw9x1bc",
"metadata": "<string>",
"medicalRecordNumber": "<string>",
"measurements": [
{
"heightCentimeters": null,
"recordedAt": "<string>",
"source": null,
"weightKilograms": null
}
],
"name": {
"first": "<string>",
"last": "<string>",
"middle": null,
"preferred": null
},
"phone": "<string>",
"programs": [
{
"endedAt": null,
"name": null,
"startedAt": "<string>",
"status": "active"
}
]
}
}
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 400,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 401,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 403,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 404,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 409,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}{
"code": "<string>",
"data": "<string>",
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"status": 429,
"title": "<string>",
"traceId": "<string>",
"type": "<string>"
}Implementation specification
Use these field types and limits to build your integration. Download the OpenAPI document for the complete contract.
Headers
Affinity-VersionstringSelects the HTTP API contract for this request only. When omitted, API-key requests use their service account’s stored version. Does not change the stored default.
Pin requests to 2026-09-28.
Request body specification application/json
otcItemsobject[] | nullShow otcItems fields
Any of · 1: object[]
Array items · object
catalogItemIdstringrequiredPattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
quantityintegerrequiredMinimum: 1
Maximum: 100
Any of · 2: null
null
practiceIdstringrequiredPattern: ^prac_[0-7][0-9a-hjkmnp-tv-z]{25}$
patientIdstring | nullShow patientId fields
Any of · 1: string
string
Pattern: ^pat_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
patientExternalIdstring | nullShow patientExternalId fields
Any of · 1: string
string
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
patientobject | nullShow patient fields
Any of · 1: object
addressobject | null | nullShow address fields
Any of · 1: object | null
Any of · 1: object
cityanyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show city fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line1anyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show line1 fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line2any | null | nullShow line2 fields
Any of · 1: any | null
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
postalCodestringrequiredstatestringrequiredcountrystring | nullShow country fields
Any of · 1: string
string
Allowed: "US"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
clinicalProfileobject | nullShow clinicalProfile fields
Any of · 1: object
currentMedicationsstring[]requiredMaximum items: 100
Show currentMedications fields
Array items · string
string
Pattern: ^[^\u0000\p{Cs}]*$
heightInchesnumber | string | null | nullShow heightInches fields
Any of · 1: number | string | null
Any of · 1: number | string
Any of · 1: number
number
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
reviewedAtstring | null | nullShow reviewedAt fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
weightPoundsnumber | string | null | nullShow weightPounds fields
Any of · 1: number | string | null
Any of · 1: number | string
Any of · 1: number
number
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
dateOfBirthstringrequiredPattern: ^\d{4}-\d{2}-\d{2}$
emailstring | null | nullShow email fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
externalIdstring | nullShow externalId fields
Any of · 1: string
string
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
externalIdentitiesobject[] | nullShow externalIdentities fields
Any of · 1: object[]
Array items · object
sourcestringrequiredPattern: ^[^\u0000\p{Cs}]*$
valuestringrequiredPattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
addressesobject[] | nullShow addresses fields
Any of · 1: object[]
Array items · object
idstring | nullShow id fields
Any of · 1: string
string
Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
addressobjectrequiredNo additional properties
Show address fields
cityanyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show city fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
countrystring | nullShow country fields
Any of · 1: string
string
Allowed: "US"
Any of · 2: null
null
line1anyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show line1 fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line2any | null | nullShow line2 fields
Any of · 1: any | null
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
postalCodestringrequiredstatestringrequiredlabelstringrequiredPattern: ^[^\u0000\p{Cs}]*$
preferredShippingbooleanrequiredrecipientNameany | nullrequiredShow recipientName fields
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
encountersobject[] | nullShow encounters fields
Any of · 1: object[]
Array items · object
notesstring | nullrequiredShow notes fields
Any of · 1: string
string
Maximum length: 5000
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
occurredAtstringrequiredproviderNamestring | nullrequiredShow providerName fields
Any of · 1: string
string
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
typestringrequiredPattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
genderstring | nullShow gender fields
Any of · 1: string
string
Allowed: "f", "m", "o", "u"
Any of · 2: null
null
locationIdstring | nullShow locationId fields
Any of · 1: string
string
Pattern: ^loc_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
metadataobject | nullShow metadata fields
Any of · 1: object
object
Any of · 2: null
null
medicalRecordNumberstring | null | nullShow medicalRecordNumber fields
Any of · 1: string | null
Any of · 1: string
string
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
Any of · 2: null
null
measurementsobject[] | nullShow measurements fields
Any of · 1: object[]
Array items · object
heightCentimetersnumber | string | nullrequiredShow heightCentimeters fields
Any of · 1: number | string
Any of · 1: number
number
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
recordedAtstringrequiredsourcestringrequiredPattern: ^[^\u0000\p{Cs}]*$
weightKilogramsnumber | string | nullrequiredShow weightKilograms fields
Any of · 1: number | string
Any of · 1: number
number
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
nameobjectrequiredNo additional properties
Show name fields
firstanyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show first fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
lastanyrequiredPattern: ^[^\u0000\p{Cs}]*$
Show last fields
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
middleany | null | nullShow middle fields
Any of · 1: any | null
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
preferredany | null | nullShow preferred fields
Any of · 1: any | null
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
phonestring | null | nullShow phone fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
programsobject[] | nullShow programs fields
Any of · 1: object[]
Array items · object
endedAtstring | nullrequiredShow endedAt fields
Any of · 1: string
string
Any of · 2: null
null
namestringrequiredPattern: ^[^\u0000\p{Cs}]*$
startedAtstringrequiredstatusstringrequiredAllowed: "active", "completed", "paused"
Any of · 2: null
null
Any of · 2: null
null
userIdstring | nullShow userId fields
Any of · 1: string
string
Pattern: ^user_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
prescriberobject | nullShow prescriber fields
Any of · 1: object
idstring | nullShow id fields
Any of · 1: string
string
Pattern: ^prov_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
npistring | nullShow npi fields
Any of · 1: string
string
Any of · 2: null
null
externalIdstring | nullShow externalId fields
Any of · 1: string
string
Any of · 2: null
null
profileobject | nullShow profile fields
Any of · 1: object
emailstring | nullShow email fields
Any of · 1: string
string
Pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$
Any of · 2: null
null
phonestring | nullShow phone fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
shippingAddressIdstring | nullShow shippingAddressId fields
Any of · 1: string
string
Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
externalOrderIdstring | nullShow externalOrderId fields
Any of · 1: string
string
Maximum length: 200
Any of · 2: null
null
prescriptionsobject[]requiredMinimum items: 1
Maximum items: 20
Show prescriptions fields
Array items · object
medicationIdstringrequiredPattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
externalPrescriptionIdany | nullShow externalPrescriptionId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\p{Cc}\p{Cs}]*$
Any of · 2: null
null
presetstring | nullShow preset fields
Any of · 1: string
string
Maximum length: 100
Any of · 2: null
null
expectedRevisionstring | nullShow expectedRevision fields
Any of · 1: string
string
Maximum length: 100
Any of · 2: null
null
overridesobject | nullShow overrides fields
Any of · 1: object
sigobject | nullShow sig fields
Any of · 1: object
Any of · 1: object
formatstringrequiredAllowed: "structured"
fieldsobjectrequiredNo additional properties
Show fields fields
dosestringrequireddoseUnitstringrequiredfrequencystringrequiredroutestringrequiredprnboolean | nullShow prn fields
Any of · 1: boolean
boolean
Any of · 2: null
null
durationstring | nullShow duration fields
Any of · 1: string
string
Any of · 2: null
null
indicationstring | nullShow indication fields
Any of · 1: string
string
Any of · 2: null
null
maxDailyUsestring | nullShow maxDailyUse fields
Any of · 1: string
string
Any of · 2: null
null
titrationSchedulestring | nullShow titrationSchedule fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: object
formatstringrequiredAllowed: "free_text"
textstringrequiredAny of · 3: object
formatstringrequiredAllowed: "template"
templateIdstringrequiredMaximum length: 100
templateRevisionstringrequiredMaximum length: 100
valuesobjectrequiredAny of · 2: null
null
quantityobject | null | nullShow quantity fields
Any of · 1: object | null
Any of · 1: object
valuenumberrequiredunitstringrequiredAny of · 2: null
null
Any of · 2: null
null
daysSupplyinteger | null | nullShow daysSupply fields
Any of · 1: integer | null
Any of · 1: integer
integer
Any of · 2: null
null
Any of · 2: null
null
refillsinteger | nullShow refills fields
Any of · 1: integer
integer
Minimum: 0
Maximum: 99
Any of · 2: null
null
clinicalobject | null | nullShow clinical fields
Any of · 1: object | null
Any of · 1: object
compoundingReasonobject | nullShow compoundingReason fields
Any of · 1: object
categorystring | nullShow category fields
Any of · 1: string
string
Allowed: "alcohol_free", "drug_shortage", "commercial_product_discontinued", "modified_release", "inactive_ingredient_sensitivity", "inactive_ingredient_toxicity", "concentration_adjustment", "alternate_route", "dosage_form_unavailable", "flavor_adjustment", "tablet_burden", "patient_cannot_use_commercial_product", "no_approved_product_available", "no_rationale_required", "other_patient_specific_need"
Any of · 2: null
null
contextstring | nullShow context fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
medicationReviewStatusstring | nullShow medicationReviewStatus fields
Any of · 1: string
string
Allowed: "not_reviewed", "none", "recorded"
Any of · 2: null
null
diagnosisReviewStatusstring | nullShow diagnosisReviewStatus fields
Any of · 1: string
string
Allowed: "not_reviewed", "none", "recorded"
Any of · 2: null
null
currentMedicationsstring[] | nullShow currentMedications fields
Any of · 1: string[]
Array items · string
string
Any of · 2: null
null
diagnosesobject[] | nullShow diagnoses fields
Any of · 1: object[]
Array items · object
codestringrequireddisplaystringrequiredAny of · 2: null
null
observationsobject[] | nullShow observations fields
Any of · 1: object[]
Array items · object
displaystringrequiredunitstringrequiredvaluenumber | stringrequiredShow value fields
Any of · 1: number
number
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
dispensingobject | nullShow dispensing fields
Any of · 1: object
dispenseUponAcceptanceboolean | nullShow dispenseUponAcceptance fields
Any of · 1: boolean
boolean
Any of · 2: null
null
shippingOptionIdstring | nullShow shippingOptionId fields
Any of · 1: string
string
Pattern: ^shp_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
shippingAmountCentsinteger | nullReviewed customer shipping rate for the selected service. Preview supplies this value. Shared group rates must not be summed per prescription.
Show shippingAmountCents fields
Any of · 1: integer
integer
Minimum: 0
Any of · 2: null
null
shippingDestinationTypestring | nullShow shippingDestinationType fields
Any of · 1: string
string
Allowed: "patient"
Any of · 2: null
null
pharmacyNotesstring | nullShow pharmacyNotes fields
Any of · 1: string
string
Any of · 2: null
null
requestedFillDatestring | nullShow requestedFillDate fields
Any of · 1: string
string
Pattern: ^\d{4}-\d{2}-\d{2}$
Any of · 2: null
null
substitutionPermittedboolean | nullShow substitutionPermitted fields
Any of · 1: boolean
boolean
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
shippingobject | nullShow shipping fields
Any of · 1: object
selectionstring | nullShow selection fields
Any of · 1: string
string
Allowed: "manual", "lowest_cost", "fastest"
Any of · 2: null
null
Any of · 2: null
null
Response specifications
200Successful response
application/json
clinicalRequirementsSatisfiedbooleanrequiredclinicalIssuesobject[]requiredShow clinicalIssues fields
Array items · object
codestringrequiredpathstringrequiredmessagestringrequiredclinicalRequirementsobject[]requiredShow clinicalRequirements fields
Array items · object
fieldstringrequiredlabelstringrequiredtypestringrequiredAllowed: "allergy_review", "medication_review", "diagnosis_review", "diagnosis"
requiredbooleanrequiredstatusstringrequiredAllowed: "missing", "satisfied"
otcItemsobject[]requiredMaximum items: 20
Show otcItems fields
Array items · object
catalogItemIdstringrequiredPattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
namestringrequiredquantityintegerrequiredunitPriceCentsintegerrequiredsubtotalCentsintegerrequiredshippingGroupsobject[]requiredMaximum items: 20
Show shippingGroups fields
Array items · object
keystringrequiredpharmacystringrequiredlabelstringrequiredtemperaturestringrequiredAllowed: "ambient", "refrigerated"
amountCentsintegerrequireditemCountintegerrequiredprescriptionIndexesinteger[]requiredZero-based indexes into the preview prescriptions array. This is an estimated shipping charge group, not a guarantee of one physical package.
Show prescriptionIndexes fields
Array items · integer
integer
totalsobjectrequiredNo additional properties
Show totals fields
currencystringrequiredAllowed: "USD"
medicationSubtotalCentsinteger | nullrequiredShow medicationSubtotalCents fields
Any of · 1: integer
integer
Any of · 2: null
null
supplySubtotalCentsinteger | nullrequiredShow supplySubtotalCents fields
Any of · 1: integer
integer
Any of · 2: null
null
shippingTotalCentsinteger | nullrequiredShow shippingTotalCents fields
Any of · 1: integer
integer
Any of · 2: null
null
estimatedTotalCentsinteger | nullrequiredShow estimatedTotalCents fields
Any of · 1: integer
integer
Any of · 2: null
null
objectstringrequiredAllowed: "order_preview"
livemodebooleanrequiredprescriptionsobject[]requiredShow prescriptions fields
Array items · object
medicationIdstringrequiredPattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
revisionstringrequiredMaximum length: 100
directionsstringrequiredstructuredSigobject | nullrequiredShow structuredSig fields
Any of · 1: object
dosestringrequireddoseUnitstringrequiredfrequencystringrequiredroutestringrequiredprnbooleanrequireddurationstring | nullShow duration fields
Any of · 1: string
string
Any of · 2: null
null
indicationstring | nullShow indication fields
Any of · 1: string
string
Any of · 2: null
null
maxDailyUsestring | nullShow maxDailyUse fields
Any of · 1: string
string
Any of · 2: null
null
titrationSchedulestring | nullShow titrationSchedule fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
formatstringrequiredAllowed: "structured", "free_text"
quantityobject | nullrequiredShow quantity fields
Any of · 1: object
valuenumberrequiredunitstringrequiredAny of · 2: null
null
daysSupplyinteger | nullrequiredShow daysSupply fields
Any of · 1: integer
integer
Any of · 2: null
null
daysSupplySourcestringrequiredAllowed: "manual", "calculated", "preset", "missing"
refillsintegerrequiredshippingOptionsobject[]requiredMaximum items: 50
Show shippingOptions fields
Array items · object
amountCentsanyrequiredShow amountCents fields
All of · 1: any
any
Minimum: 0
carrierstring | nullrequiredShow carrier fields
Any of · 1: string
string
Any of · 2: null
null
currencystringrequiredAllowed: "USD"
estimatedDaysMaxany | nullrequiredShow estimatedDaysMax fields
Any of · 1: any
All of · 1: any
any
Minimum: 0
Any of · 2: null
null
estimatedDaysMinany | nullrequiredShow estimatedDaysMin fields
Any of · 1: any
All of · 1: any
any
Minimum: 0
Any of · 2: null
null
idanyrequiredShow id fields
All of · 1: any
any
Pattern: ^shp_[0-7][0-9a-hjkmnp-tv-z]{25}$
labelstringrequiredserviceLevelstringrequiredtemperaturestringrequiredAllowed: "ambient", "refrigerated"
shippingOptionIdstring | nullrequiredShow shippingOptionId fields
Any of · 1: string
string
Pattern: ^shp_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
medicationSubtotalCentsinteger | nullrequiredShow medicationSubtotalCents fields
Any of · 1: integer
integer
Any of · 2: null
null
shippingAmountCentsinteger | nullrequiredShow shippingAmountCents fields
Any of · 1: integer
integer
Any of · 2: null
null
issuesobject[]requiredShow issues fields
Array items · object
codestringrequiredpathstringrequiredmessagestringrequiredstatusstringrequiredAllowed: "complete", "incomplete"
orderInputobject | nullrequiredShow orderInput fields
Any of · 1: object
otcItemsany | nullShow otcItems fields
Any of · 1: any
Array items · object
catalogItemIdanyrequiredShow catalogItemId fields
All of · 1: any
any
Pattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
quantityanyrequiredShow quantity fields
All of · 1: any
any
Minimum: 1
Maximum: 100
All of · 1: any
any
Maximum items: 20
Any of · 2: null
null
practiceIdstringrequiredPattern: ^prac_[0-7][0-9a-hjkmnp-tv-z]{25}$
userIdany | nullShow userId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^user_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
prescriberobject | nullShow prescriber fields
Any of · 1: object
idany | nullShow id fields
Any of · 1: any
All of · 1: any
any
Pattern: ^prov_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
npistring | nullShow npi fields
Any of · 1: string
string
Any of · 2: null
null
externalIdstring | nullShow externalId fields
Any of · 1: string
string
Any of · 2: null
null
profileobject | nullShow profile fields
Any of · 1: object
emailany | nullShow email fields
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\s@]+@[^\s@]+\.[^\s@]+$
Any of · 2: null
null
phonestring | nullShow phone fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
shippingAddressIdany | nullShow shippingAddressId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
externalOrderIdany & any & any & any | nullShow externalOrderId fields
Any of · 1: any & any & any & any
All of · 1: any
any
Minimum length: 1
All of · 2: any
any
Maximum length: 200
All of · 3: any
any
Pattern: \S
All of · 4: any
any
Pattern: ^[^\p{Cc}\p{Cs}]*$
Any of · 2: null
null
prescriptionsobject[]requiredShow prescriptions fields
Array items · object
externalPrescriptionIdany & any & any & any | nullShow externalPrescriptionId fields
Any of · 1: any & any & any & any
All of · 1: any
any
Minimum length: 1
All of · 2: any
any
Maximum length: 200
All of · 3: any
any
Pattern: \S
All of · 4: any
any
Pattern: ^[^\p{Cc}\p{Cs}]*$
Any of · 2: null
null
clinicalobject | nullShow clinical fields
Any of · 1: object
compoundingReasonobject | nullShow compoundingReason fields
Any of · 1: object
categorystring | nullShow category fields
Any of · 1: string
string
Allowed: "alcohol_free", "drug_shortage", "commercial_product_discontinued", "modified_release", "inactive_ingredient_sensitivity", "inactive_ingredient_toxicity", "concentration_adjustment", "alternate_route", "dosage_form_unavailable", "flavor_adjustment", "tablet_burden", "patient_cannot_use_commercial_product", "no_approved_product_available", "no_rationale_required", "other_patient_specific_need"
Any of · 2: null
null
contextstring | nullShow context fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
medicationReviewStatusstring | nullShow medicationReviewStatus fields
Any of · 1: string
string
Allowed: "not_reviewed", "none", "recorded"
Any of · 2: null
null
diagnosisReviewStatusstring | nullShow diagnosisReviewStatus fields
Any of · 1: string
string
Allowed: "not_reviewed", "none", "recorded"
Any of · 2: null
null
currentMedicationsany | nullShow currentMedications fields
Any of · 1: any
Array items · string
string
All of · 1: any
any
Maximum items: 100
Any of · 2: null
null
diagnosesany | nullShow diagnoses fields
Any of · 1: any
Array items · object
codestringrequireddisplaystringrequiredAll of · 1: any
any
Maximum items: 20
Any of · 2: null
null
observationsany | nullShow observations fields
Any of · 1: any
Array items · object
displaystringrequiredunitstringrequiredvalueany | stringrequiredShow value fields
Any of · 1: any
All of · 1: any
any
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
All of · 1: any
any
Maximum items: 20
Any of · 2: null
null
Any of · 2: null
null
pharmacyIdany | nullShow pharmacyId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^pharm_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
daysSupplyintegerrequiredMinimum: 1
Maximum: 365
dispensingobjectrequiredNo additional properties
Show dispensing fields
dispenseUponAcceptanceboolean | nullShow dispenseUponAcceptance fields
Any of · 1: boolean
boolean
Any of · 2: null
null
shippingOptionIdstring | nullShow shippingOptionId fields
Any of · 1: string
string
Pattern: ^shp_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
shippingAmountCentsinteger | nullReviewed customer shipping rate for the selected service. Preview supplies this value. Shared group rates must not be summed per prescription.
Show shippingAmountCents fields
Any of · 1: integer
integer
Minimum: 0
Any of · 2: null
null
shippingDestinationTypestring | nullShow shippingDestinationType fields
Any of · 1: string
string
Allowed: "patient"
Any of · 2: null
null
pharmacyNotesstring | nullShow pharmacyNotes fields
Any of · 1: string
string
Any of · 2: null
null
requestedFillDatestring | nullShow requestedFillDate fields
Any of · 1: string
string
Pattern: ^\d{4}-\d{2}-\d{2}$
Any of · 2: null
null
substitutionPermittedboolean | nullShow substitutionPermitted fields
Any of · 1: boolean
boolean
Any of · 2: null
null
directionsstringrequiredmedicationIdstringrequiredPattern: ^cat_[0-7][0-9a-hjkmnp-tv-z]{25}$
quantitynumberrequiredquantityUnitstringrequiredrefillsintegerrequiredMinimum: 0
Maximum: 99
structuredSigobject | nullShow structuredSig fields
Any of · 1: object
dosestringrequireddoseUnitstringrequireddurationstring | nullShow duration fields
Any of · 1: string
string
Any of · 2: null
null
frequencystringrequiredindicationstring | nullShow indication fields
Any of · 1: string
string
Any of · 2: null
null
maxDailyUsestring | nullShow maxDailyUse fields
Any of · 1: string
string
Any of · 2: null
null
prnboolean | nullShow prn fields
Any of · 1: boolean
boolean
Any of · 2: null
null
routestringrequiredtitrationSchedulestring | nullShow titrationSchedule fields
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
patientIdstring | nullShow patientId fields
Any of · 1: string
string
Pattern: ^pat_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
patientobject | nullShow patient fields
Any of · 1: object
addressobject | null | nullShow address fields
Any of · 1: object | null
Any of · 1: object
cityany & anyrequiredShow city fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line1any & anyrequiredShow line1 fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line2any & any | null | nullShow line2 fields
Any of · 1: any & any | null
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
postalCodestringrequiredstatestringrequiredcountrystring | nullShow country fields
Any of · 1: string
string
Allowed: "US"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
clinicalProfileobject | nullShow clinicalProfile fields
Any of · 1: object
currentMedicationsanyrequiredShow currentMedications fields
Array items · any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 1: any
any
Maximum items: 100
heightInchesany | string | null | nullShow heightInches fields
Any of · 1: any | string | null
Any of · 1: any | string
Any of · 1: any
All of · 1: any
any
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
reviewedAtstring | null | nullShow reviewedAt fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
weightPoundsany | string | null | nullShow weightPounds fields
Any of · 1: any | string | null
Any of · 1: any | string
Any of · 1: any
All of · 1: any
any
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
dateOfBirthanyrequiredShow dateOfBirth fields
All of · 1: any
any
Pattern: ^\d{4}-\d{2}-\d{2}$
emailstring | null | nullShow email fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
externalIdany | nullShow externalId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
externalIdentitiesany | nullShow externalIdentities fields
Any of · 1: any
Array items · object
sourceanyrequiredShow source fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
valueanyrequiredShow value fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 1: any
any
Maximum items: 50
Any of · 2: null
null
addressesany | nullShow addresses fields
Any of · 1: any
Array items · object
idany | nullShow id fields
Any of · 1: any
All of · 1: any
any
Pattern: ^addr_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
addressobjectrequiredNo additional properties
Show address fields
cityany & anyrequiredShow city fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
countrystring | nullShow country fields
Any of · 1: string
string
Allowed: "US"
Any of · 2: null
null
line1any & anyrequiredShow line1 fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
line2any & any | null | nullShow line2 fields
Any of · 1: any & any | null
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
postalCodestringrequiredstatestringrequiredlabelanyrequiredShow label fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
preferredShippingbooleanrequiredrecipientNameany & any | nullrequiredShow recipientName fields
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
All of · 1: any
any
Maximum items: 50
Any of · 2: null
null
encountersobject[] | nullShow encounters fields
Any of · 1: object[]
Array items · object
notesany & any | nullrequiredShow notes fields
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Maximum length: 5000
Any of · 2: null
null
occurredAtstringrequiredproviderNameany | nullrequiredShow providerName fields
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
typeanyrequiredShow type fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
genderstring | nullShow gender fields
Any of · 1: string
string
Allowed: "f", "m", "o", "u"
Any of · 2: null
null
locationIdany | nullShow locationId fields
Any of · 1: any
All of · 1: any
any
Pattern: ^loc_[0-7][0-9a-hjkmnp-tv-z]{25}$
Any of · 2: null
null
metadataobject | nullShow metadata fields
Any of · 1: object
object
Any of · 2: null
null
medicalRecordNumberany | null | nullShow medicalRecordNumber fields
Any of · 1: any | null
Any of · 1: any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
Any of · 2: null
null
Any of · 2: null
null
measurementsobject[] | nullShow measurements fields
Any of · 1: object[]
Array items · object
heightCentimetersany | string | nullrequiredShow heightCentimeters fields
Any of · 1: any | string
Any of · 1: any
All of · 1: any
any
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
recordedAtstringrequiredsourceanyrequiredShow source fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
weightKilogramsany | string | nullrequiredShow weightKilograms fields
Any of · 1: any | string
Any of · 1: any
All of · 1: any
any
Greater than: 0
Any of · 2: string
string
Allowed: "Infinity", "-Infinity", "NaN"
Any of · 2: null
null
Any of · 2: null
null
nameobjectrequiredNo additional properties
Show name fields
firstany & anyrequiredShow first fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
lastany & anyrequiredShow last fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
middleany & any | null | nullShow middle fields
Any of · 1: any & any | null
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
preferredany & any | null | nullShow preferred fields
Any of · 1: any & any | null
Any of · 1: any & any
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
All of · 2: any
any
Pattern: ^[^\p{Cc}\u200B\u2028-\u202E\u2066-\u2069]*$
Any of · 2: null
null
Any of · 2: null
null
phonestring | null | nullShow phone fields
Any of · 1: string | null
Any of · 1: string
string
Any of · 2: null
null
Any of · 2: null
null
programsobject[] | nullShow programs fields
Any of · 1: object[]
Array items · object
endedAtstring | nullrequiredShow endedAt fields
Any of · 1: string
string
Any of · 2: null
null
nameanyrequiredShow name fields
All of · 1: any
any
Pattern: ^[^\u0000\p{Cs}]*$
startedAtstringrequiredstatusstringrequiredAllowed: "active", "completed", "paused"
Any of · 2: null
null
Any of · 2: null
null
Any of · 2: null
null
400HTTP 400
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
401Unauthorized
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
403Forbidden
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
404Not found
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
409Conflict
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri
429Too many requests
application/json
codestringrequireddataobjectdetailstringrequiredinstancestringrequiredrequestIdstringrequiredstatusintegerrequiredMinimum: 400
Maximum: 599
titlestringrequiredtraceIdstringtypestringrequiredFormat: uri