Skip to content

Create a prescription request

POST
/prescription
curl --request POST \
--url https://client-api.abi.ai/prescription \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "userId": "abi12345", "question": "I need help renewing my prescription.", "indicationSurvey": "{\"indication\":\"renewal\"}", "survey": { "id": 42, "answers": [ { "id": 1001, "answer": { "id": 2001 } }, { "id": 1002, "answer": { "text": "No known allergies." } } ] }, "pharmacyId": "pharmacy12345" }'

Start a form-based, asynchronous prescription review. Submit the user’s question and the required serialized indication-survey payload. The optional normalized survey object can be supplied when answers are collected from Abi’s survey endpoints; when present, those answers are used to build the stored survey payload.

Media typeapplication/json

Supply either the configured serialized indication-survey payload or normalized survey answers. Use the latter when collecting answers from Abi’s survey template.

object
userId
required

Abi user identifier for the prescription request.

string
Example
abi12345
question
required

Medical question supplied by the user.

string
Example
I need help renewing my prescription.
indicationSurvey
required

Serialized JSON indication-survey payload for integrations that construct their own approved payload.

string
Example
{"indication":"renewal"}
survey
object
id
required

Indication-survey identifier from the template.

integer
Example
42
answers
required
Array<object>
object
id
required

Question identifier supplied by the survey template.

integer
Example
1001
answer
required

Use id for a choice answer or text for an open-ended answer.

object
id

Selected choice identifier.

integer
Example
2001
text

Open-ended answer text.

string
Example
No known allergies.
Example
{
"id": 42,
"answers": [
{
"id": 1001,
"answer": {
"id": 2001
}
},
{
"id": 1002,
"answer": {
"text": "No known allergies."
}
}
]
}
pharmacyId

Pharmacy identifier when required by the configured journey.

string
Example
pharmacy12345
Example
{
"userId": "abi12345",
"question": "I need help renewing my prescription.",
"indicationSurvey": "{\"indication\":\"renewal\"}",
"survey": {
"id": 42,
"answers": [
{
"id": 1001,
"answer": {
"id": 2001
}
},
{
"id": 1002,
"answer": {
"text": "No known allergies."
}
}
]
},
"pharmacyId": "pharmacy12345"
}

Form-based prescription request created and queued for healthcare-professional review.

Media typeapplication/json

Current state and available artifacts for a prescription request.

object
consultationId

Identifier for the consultation behind the prescription request.

string
userId

Abi user identifier.

string
status

Current prescription workflow status returned by the consultation service.

string
Allowed values: new open claimed resolved canceled closed closedworating onGoingVideoCall videoCallEnded waitingforrating waitingForInfo waitingForSwap
createdAt
string format: date-time
questions
Array<object>
object
question

The question submitted by the user.

string
answer

The response provided by the healthcare professional

string
attachments

Images or documents provided through the approved journey.

Array<string>
professional

Information about the professional who resolved a consultation, when available.

object
name
string
title
string
specialties
Array<string>
licenses
Array<object>
object
licenseNumber
string
countries
Array<string>
profileUrl
string format: uri
createdAt

Time this question was recorded.

string format: date-time
prescription
object
pdfUrl

Short-lived URL of the prescription file

string format: uri
integration

Configured prescription integration.

string
duration
string
instructions
string
createdAt
string format: date-time
quantity
string
medication
string
frequency
string
prescriptionDetail

Detailed prescription data returned when available.

object
key
additional properties
any
lastClaim

Latest professional claim

object
professional

Information about the professional who resolved a consultation, when available.

object
name
string
title
string
specialties
Array<string>
licenses
Array<object>
object
licenseNumber
string
countries
Array<string>
profileUrl
string format: uri
indicationSurveyUrl

Short-lived URL for the completed indication survey.

string format: uri
isRefused

Whether a healthcare professional refused the request.

boolean
rating

User rating

number
>= 1 <= 5
caseConsultationPdf

A consultation document that is available to retrieve.

object
status
string
Allowed values: CREATING CREATED
type
string
Allowed values: PDF
url

Short-lived download URL when the file is ready.

string format: uri
paymentInformation

Payment information returned for consultations that require a user payment.

object
userIsRequiredToPay

Whether payment is required before the consultation can proceed.

boolean
url

Payment URL when payment is required.

string format: uri
price

Price of the consultation

number
currency

ISO 4217 currency code

string
sickNotes

Sick notes issued for this prescription request

Array<object>
object
key
additional properties
any
referrals

Referrals issued for this prescription request

Array<object>
object
key
additional properties
any
Example
{
"consultationId": "8910zyx321cba",
"status": "open",
"userId": "abi12345",
"createdAt": "2025-08-28T10:12:30.000Z",
"indicationSurveyUrl": "https://clientdomain.example/surveys/8910zyx321cba",
"questions": [
{
"question": "I need help renewing my prescription.",
"attachments": []
}
]
}

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}