Create a consultation
POST
/consultation
const url = 'https://example.com/consultation';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"example","questions":["example"]}'};
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://example.com/consultation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userId": "example", "questions": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
userId
required
string
questions
required
Array<string>
Examplegenerated
{ "userId": "example", "questions": [ "example" ]}Responses
Section titled “Responses”Consultation created.
Media typeapplication/json
The durable record of a user’s medical question and its Abi service workflow.
object
consultationId
The Abi identifier for the consultation.
string
userId
The Abi identifier of the user who submitted the consultation.
string
status
The current consultation workflow status.
string
createdAt
The date and time the consultation was created in Abi.
string
questions
The medical questions and, when available, their answers and professional information.
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
Example
{ "consultationId": "8910zyx321cba", "userId": "abi12345", "status": "open", "createdAt": "2020-11-27", "questions": [ { "professional": { "name": "John Doe", "title": "physician", "licenses": [ { "licenseNumber": "abi-XXX", "countries": [ "ie", "gb" ] } ] } } ]}