Close a prescription request
const url = 'https://client-api.abi.ai/prescription/8910zyx321cba/close';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"rating":5}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The prescription request’s consultation identifier.
Example
8910zyx321cbaRequest Body
Section titled “Request Body”Optionally record the user’s rating when closing the consultation.
object
Optional user rating for the completed consultation.
Example
5Responses
Section titled “Responses”Prescription request closed after the healthcare response was provided. The response status is closed when a rating is submitted and closedworating otherwise.
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": "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.
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"}Request could not be completed.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}