Skip to content

Close a prescription request

PATCH
/prescription/{prescriptionId}/close
curl --request PATCH \
--url https://client-api.abi.ai/prescription/8910zyx321cba/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rating": 5 }'

Close a prescription request after the healthcare response has been provided. Optionally include a rating from 1 to 5; without a rating, the request is returned with status closedworating.

prescriptionId
required
string

The prescription request’s consultation identifier.

Example
8910zyx321cba
Media typeapplication/json

Optionally record the user’s rating when closing the consultation.

object
rating

Optional user rating for the completed consultation.

number
>= 1 <= 5
Example
5

Prescription request closed after the healthcare response was provided. The response status is closed when a rating is submitted and closedworating otherwise.

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": "closed",
"userId": "abi12345",
"createdAt": "2025-08-28T10:12:30.000Z",
"rating": 5,
"isRefused": false,
"indicationSurveyUrl": "https://clientdomain.example/surveys/8910zyx321cba"
}

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"
}

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"
}