Close a consultation
const url = 'https://client-api.abi.ai/consultation/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/consultation/8910zyx321cba/close \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "rating": 5 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The Abi identifier of the consultation.
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”Consultation closed. It is closed when a rating is supplied and closedworating otherwise.
The durable record returned by the consultation endpoints. Fields such as answers, professional information, files, and ratings appear as the consultation progresses.
object
The Abi identifier for the consultation.
The Abi identifier of the user who submitted the consultation.
The current consultation workflow status.
The date and time the consultation was created in Abi.
The medical questions and, when available, their answers and professional information.
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.
User rating recorded when the consultation was closed.
The healthcare professional associated with the latest claim
object
Information about the professional who resolved a consultation, when available.
object
object
Short-lived URL for the completed indication survey
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
Structured medical-advice classification when it is available for the consultation.
object
Sick notes issued for this consultation when available.
object
Referrals issued for this consultation when available.
object
Example
{ "consultationId": "8910zyx321cba", "status": "closed", "userId": "abi12345", "createdAt": "2025-08-28T10:12:30.000Z", "questions": [ { "question": "I have a burning sensation after dinner. Could this be acid reflux?", "answer": "It may be reflux. Avoid known triggers and consult a clinician if symptoms continue or worsen.", "attachments": [ "https://clientdomain.example/attachments/consultation-image.jpg" ], "professional": { "name": "Dr Jane Doe", "title": "physician" }, "createdAt": "2025-08-28T10:12:30.000Z" } ], "rating": 5, "lastClaim": { "professional": { "name": "Dr Jane Doe", "title": "physician" } }}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"}