Skip to content

Format a webhook event

POST
/webhook/format-event
curl --request POST \
--url https://client-api.abi.ai/webhook/format-event \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "questionResolved", "userId": "abi12345", "caseId": "8910zyx321cba" }'
Media typeapplication/json

Format a registered standard event locally. Include userId and/or caseId only when the formatted payload needs that resource.

object
type
required

Registered event name to format.

string
Example
questionResolved
caseId

Consultation identifier to include as the case payload

string
Example
8910zyx321cba
userId

Abi user identifier to include as the user payload

string
Example
abi12345
Example
{
"type": "questionResolved",
"userId": "abi12345",
"caseId": "8910zyx321cba"
}

Webhook event formatted.

Media typeapplication/json

Standard event payload constructed from the registered event and any supplied resource identifiers. Health Navigator deliveries use their own v2 payloads.

object
eventName

Registered event name that will be delivered.

string
user

The Abi record representing a person who can use a configured service.

object
id
required

The unique identifier Abi assigns to the user account.

string
uniqueId

An optional identifier from the partner system.

string
firstName

The user’s first name.

string
lastName

The user’s surname.

string
email

The user’s email address.

string format: email
phone

The user’s mobile number including international dialing code (E.164).

string
address

The user’s address.

string
role

The user’s configured role.

string
Allowed values: patient tester
weight

The user’s weight

number
weightUnit

The unit used for weight.

string
nationalId

The user’s national identifier

string
dateOfBirth

The user’s date of birth.

string
gender

The user’s gender where supplied.

string
Allowed values: male female other
language
required

The language used to communicate with Abi.

string
country

The user’s nationality or country code.

string
location
required

The country where the user lives or is currently located.

string
origin
required

The country in which the user was born.

string
physicianCountry
required

The country in which responding healthcare professionals are licensed.

string
partnerName
required

The partner company recorded in Abi.

string
associatedAccounts

The permitted number of associated accounts for an enabled group-account policy.

integer
subscriptionStartDate

The date and time at which the user’s subscription starts.

string format: date-time
subscriptionEndDate

The date and time at which the user’s subscription ends

string format: date-time
termsAt

The recorded Terms and Conditions acceptance value

string
privacyAt

The recorded Privacy Notice acceptance value

string
extra

Additional agreed partner metadata for the user.

object
parentId

The parent account identifier for a group-account user

string
userStatus

The user’s current access status.

string
Allowed values: activeUser pendingActivation deactivatedUser
case

The durable record returned by the consultation endpoints. Fields such as answers, professional information, files, and ratings appear as the consultation progresses.

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
Allowed values: new open claimed resolved canceled closed closedworating onGoingVideoCall videoCallEnded waitingforrating waitingForInfo waitingForSwap
createdAt

The date and time the consultation was created in Abi.

string format: date-time
questions

The medical questions and, when available, their answers and professional information.

Array<object>
<= 3 items
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
rating

User rating recorded when the consultation was closed.

number
>= 1 <= 5
lastClaim

The healthcare professional associated with the latest 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
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
medicalAdvice

Structured medical-advice classification when it is available for the consultation.

object
therapy
string
therapyKey
string
referral
string
referralKey
string
outcome
string
category
integer
sickNotes

Sick notes issued for this consultation when available.

Array<object>
object
key
additional properties
any
referrals

Referrals issued for this consultation when available.

Array<object>
object
key
additional properties
any
Example
{
"eventName": "questionResolved",
"user": {
"id": "abi12345",
"firstName": "Jane",
"lastName": "Doe",
"email": "janedoe@example.com",
"gender": "female",
"phone": "+441234567890",
"origin": "gb",
"location": "es",
"country": "it",
"physicianCountry": "es",
"language": "en",
"dateOfBirth": "1994-10-07",
"partnerName": "Abi",
"uniqueId": "123abc789xyz",
"userStatus": "activeUser",
"associatedAccounts": 5
},
"case": {
"consultationId": "8910zyx321cba",
"status": "open",
"userId": "abi12345",
"questions": [
{
"question": "I have a burning sensation in my gut after dinner. Could this be acid reflux?",
"attachments": [
"https://clientdomain.example/image-provided-by-user/1.jpg",
"https://clientdomain.example/document-provided-by-user/2.pdf"
]
}
],
"createdAt": "2020-11-27"
}
}

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