Order Summary Notification
Order Summary Notifications can be enabled to provide a summary of an order after the order status is updated. This event can be used to identify when an order has reached its terminal state (Completed or Cancelled).
This notification provides information about report availability, order state and whether order completed because timeout was reached.
Here is a sample payload of order summary notification:
[
{
"timestamp": "2022-09-29T17:22:26.406Z",
"eventId": "b2c02b0f-7c43-42d0-941e-c1baded6aa35",
"orderId": "cd3f23e0-c1a3-11ec-abe5-6bfedf51c8a8",
"eventType": "orders.OrderSummaryUpdated",
"eventGroup": "order",
"humanId": "128a11a292db0de2516a5feeaee8ac98",
"clientId": "774b9e333ec3e57b9f86b432be4da21a66901d81",
"userId": "6261a73f8f6b99987c2f5baa",
"clientUserId": "Policy_001",
"clientData": {
"property": "value"
},
"eventPayload": {
"orderStatus": "completed",
"timedOut": false,
"reportsAvailable": true,
"reports": [
{
"id": "cd3f23e0-c1a3-11ec-abe5-6bfedf51000",
"name": "healthcheck",
"fileExtension": "pdf",
"uri": "https://admin.humanapi.co/api/v1/user/reports/cd3f23e0-c1a3-11ec-abe5-6bfedf51000
},
{
"id": "cd3f23e0-c1a3-11ec-abe5-6bfedf51001",
"name": "combined",
"baseReportNames": [
"highlights",
"ccdraw"
],
"fileExtension": "pdf",
"uri": "https://admin.humanapi.co/api/v1/user/reports/cd3f23e0-c1a3-11ec-abe5-6bfedf51001"
}
],
"dataAvailable": true,
"fcraSuppressed": false
}
}
]
Note:
Order Summary notification payload is a JSON array
Here is the description of different properties in order summary notification:
Property | Type | Description |
---|---|---|
timestamp | String - ISO 8601 date-time in GMT | The timestamp of the event. |
eventId | String - UUID | A unique ID for the event. |
orderId | String - UUID | A unique ID for the submitted order. |
eventType | String | The event type. |
eventGroup | String | Event category useful for grouping. |
humanId | String | Human API’s unique human ID. |
clientId | String | Unique application ID. |
userId | String | Human API’s unique user ID. |
clientUserId | String | External unique identifier like policy number or unique id. |
clientData | Object (Optional) | The customer_metadata field provided to Human API on order submission, if present. |
eventPayload | Object | Object with event-type-specific data. |
Event Payload for OrderSummaryUpdated
Property | Type | Description |
---|---|---|
orderStatus | String | The order status, one of "in progress", "pended", "completed", "cancelled". |
timedOut | Boolean | Indicates whether the order timed out. |
reportsAvailable | Boolean | Indicates whether there are records available. |
reports | Array of output Objects (Optional) | When available, includes details about available outputs. |
dataAvailable | Boolean | Indicates report data is available. |
fcraSuppressed | Boolean | Indicates the order is blocked. |
Report Object
Reports object may not be present in the webhook payload, depends on the availability of medical records.
Property | Type | Description |
---|---|---|
id | String - UUID | Unique output identifier. |
name | String | Name of the output. |
baseReportNames | Array of Strings (optional) | A list of unique values describing the output components included in the combined record. Only present in "combined" outputs. |
fileExtension | String | The format of the record (eg. 'pdf', 'html', 'json') |
uri | String | URI to get the file. |
Updated 3 months ago