Create a prescription request
const url = 'https://client-api.abi.ai/prescription';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Supply either the configured serialized indication-survey payload or normalized survey answers. Use the latter when collecting answers from Abi’s survey template.
object
Abi user identifier for the prescription request.
Example
abi12345Medical question supplied by the user.
Example
I need help renewing my prescription.Serialized JSON indication-survey payload for integrations that construct their own approved payload.
Example
{"indication":"renewal"}object
Indication-survey identifier from the template.
Example
42object
Question identifier supplied by the survey template.
Example
1001Use id for a choice answer or text for an open-ended answer.
object
Selected choice identifier.
Example
2001Open-ended answer text.
Example
No known allergies.Example
{ "id": 42, "answers": [ { "id": 1001, "answer": { "id": 2001 } }, { "id": 1002, "answer": { "text": "No known allergies." } } ]}Pharmacy identifier when required by the configured journey.
Example
pharmacy12345Example
{ "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"}Responses
Section titled “Responses”Form-based prescription request created and queued for healthcare-professional review.
Current state and available artifacts for a prescription request.
object
Identifier for the consultation behind the prescription request.
Abi user identifier.
Current prescription workflow status returned by the consultation service.
object
The question submitted by the user.
The response provided by the healthcare professional
Images or documents provided through the approved journey.
Information about the professional who resolved a consultation, when available.
object
object
Time this question was recorded.
object
Short-lived URL of the prescription file
Configured prescription integration.
Detailed prescription data returned when available.
object
Latest professional claim
object
Information about the professional who resolved a consultation, when available.
object
object
Short-lived URL for the completed indication survey.
Whether a healthcare professional refused the request.
User rating
A consultation document that is available to retrieve.
object
Short-lived download URL when the file is ready.
Payment information returned for consultations that require a user payment.
object
Whether payment is required before the consultation can proceed.
Payment URL when payment is required.
Price of the consultation
ISO 4217 currency code
Sick notes issued for this prescription request
object
Referrals issued for this prescription request
object
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.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}Request could not be completed.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}