Skip to main content
EpiqScripts home page
Search...
⌘K
Overview
Introduction
Patients
Patients
Client Key Validation
Prescribers
POST
Create single prescriber for single clinic
GET
Get prescribers by clinic ID
GET
Health check
Prescriptions
DEL
Cancel Order
POST
Create a Refill Request by Prescription ID
POST
Create Single/multiple prescriptions for a patients in one call
POST
Fill Order
GET
Get Order Details
GET
Get Refill Prescription Status by ID
GET
Get Refills Remaining for an Rx ID
GET
Health check endpoint
EpiqScripts home page
Search...
⌘K
Search...
Navigation
Overview
Introduction
API reference
API reference
Overview
Introduction
Copy page
EpiqScripts API documentation
Copy page
Create Patient for clinic
***⚕️ Patient Creation — Field Reference*** This endpoint creates new patient records for a single clinic. All validations follow ***CreatePatientDto*** constraints. --- ### 🛡️ Security #### **Headers** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **x-api-key** |**String** |**API Key for authentication** |**Y** | | **clinicId** | **String** |**Clinic ID in header overrides route parameter**| **Y** --- ### 🩺 Demographics #### **Patient Info** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **ext_userid** |**String** |Optional unique identifier, this is user_id/username in client systems, will be used in callbacks to send information. | **N**| | **First Name** |**String** |Letters only -- <Badge color="green">**mandatory**</Badge> |**Y** | | **Last Name** |**String** |Letters, spaces, hyphens, apostrophes allowed -- <Badge color="green">**mandatory**</Badge> |**Y** | | **Middle Name** |**String** | <Badge color="gray">**optional**</Badge> |**N** | | **Date of Birth** |**String** | Must follow 'YYYY-MM-DD' -- <Badge color="green">**mandatory**</Badge> |**Y** | | **Gender** | **String**| 'M', 'F', or 'O' (case-insensitive) -- <Badge color="green">**mandatory**</Badge> |**Y** | | **isSmoker** | **boolean**| Accepts 'y/yes/true/n/no/false' -- <Badge color="gray">**optional**</Badge> |**N** | | **isPregnant** |**boolean** |Same boolean pattern -- <Badge color="gray">**optional**</Badge> | **N**| | **isDiabetic** | **boolean**|Same boolean pattern -- <Badge color="gray">**optional**</Badge> |**N** | | **heightInInches** |**Number** |If provided needs to be a positive number -- <Badge color="gray">**optional**</Badge> |**N** | | **weightInPounds** | **Number**|If provided needs to be a positive number and below 600 lbs -- <Badge color="gray">**optional**</Badge>| **N**| --- ### 📞 Contact & Address #### **Contact** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **Email** |**String** |Conditional mandatory — required only if SMS consent is not given. |**Y** | | **Phone** |**String** |Must be 10 digits; '+1' allowed -- <Badge color="green">**mandatory**</Badge> |**Y** | #### **Address** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **Address1** |**String** | Standard special characters are allowed. P O Boxes not allowed -- <Badge color="green">**mandatory**</Badge>|**Y**| | **Address2** |**String** |If present standard special characters are allowed -- <Badge color="gray">**optional**</Badge> |**N**| | **City** |**String** |Standard special characters allowed for cities are allowed -- <Badge color="green">**mandatory**</Badge> |**Y**| | **State** |**String** |US two character state codes are allowed -- <Badge color="green">**mandatory**</Badge> |**Y**| | **ZipCode** |**Number** |Standard 5 digit zip code is allowed no characters are allowed -- <Badge color="green">**mandatory**</Badge> |**Y**| --- ### 🆔 Identity #### **Identification** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **Driver License #** |**String** |Encouraged to provide as it will be a mandatory field for Controlled Drugs.(future) -- <Badge color="gray">**optional**</Badge> |**Y** | | **Driver License State** |**String** |**Required if license # is provided** — valid US state code. |**Y/N** | | **SSN** |**String** |**mandatory if driver license number is not provided**; must be valid SSN format -- <Badge color="gray">**optional**</Badge> |**Y/N** | #### ✍️ **Consents** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **authSmsConsent** |**boolean** |Boolean-style ('y/yes/true/n/no/false') -- <Badge color="green">**mandatory**</Badge> |**Y**| | **smsConsent** |**boolean** |<Badge color="gray">**optional**</Badge> |**N**| | **dataRatesSmsConsent** |**boolean** |Defaults to **true** -- <Badge color="gray">**optional**</Badge> |**N**| --- ### 🧬 Risk Factors [allergies, conditions, medications] #### **Risk Factors** | **Field** | **Type** | **Description** | **Required** | |--------|-------------|-------------|-------------| | **riskFactors** | **JSON** | Object includes allergies, medications, conditions. Must follow validation rules -- <Badge color="green">**mandatory**</Badge>| **Y** | |**allergies** | **string**|Uses <code>"code":"description"</code> format -- <Badge color="green">**mandatory**</Badge> | **Y** | --- ### ⚠️ Notes & Limits | Notice | Details | |--------|---------| | **Request Limit** | This endpoint allows **up to 10 patients per request**. | | **Validation** | All field-level, boolean, date, and clinic/API checks are applied before processing. Unless otherwise specified objects are required and need to be present. | --- ### ⛔ Possible Errors | Status Code | Error | Description | Solution | |--------|---------|----------------|----------| |401| Authentication failed| Invalid API key or clinicId combination| Correct combination of ClinicId and API key to be provided | |400| Validation failed| First name is required and can only contain letters (A-Z, a-z). No spaces, hyphens, apostrophes, numbers, special, binary, or SQL injection characters allowed. | First name cannot be empty. Provide name satisfying the conditions | |400| Validation failed| Last name is required and can only contain letters (A-Z, a-z). No spaces, hyphens, apostrophes, numbers, special, binary, or SQL injection characters allowed. |Last Name cannot be empty. Provide name satisfying the conditions | |400| Validation failed| Date of Birth is required, must be in YYYY-MM-DD format, year must be after 1900, and age must be 18 or older | DOB should be in proper format. | |400| Validation failed| gender is required and must be one of 'M', 'F', or 'O' | Provide proper Gender | |400| Validation failed| email must be a valid, email address and only contain letters, numbers, @, and . (no multiple consecutive dots or more than one @ symbol)|| |400| Validation failed| phone must be 10 digits, optionally prefixed by +1, and contain only numbers|| |400| Validation failed| primaryLanguage must be a supported language code (EN, ES, FR, DE, ZH, HI) || |400| Validation failed| heightInches must be > 1 and < 210|| |400| Validation failed| weightPounds must be > 1 and < 600|| |400| Validation failed| address.address1 isrequired, must not contain 'P.O Box', 'PO Box', or 'Post Office Box', cannot have special, binary, or SQL injection characters, and must not contain script injection || |400| Validation failed| address.zipCode must be exactly 5 digits or 9 digits in format 12345-1234|| |400| Validation failed| identity.driverLicenseState is required when driverLicenseNumber is present|| |400| Validation failed| identity must have either driverLicenseNumber or socialSecurityNumber present and not null | | |400| Validation failed| socialSecurityNumber must be in the format NNN-NN-NNNN (9 digits, no letters) || |400| Bad Request| Invalid allergies format. Expected "CODE:DESCRIPTION | Allergy format should be 00000: None or 00000xxxxx: Description|
Next
⌘I