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:

PropertyTypeDescription
timestampString - ISO 8601 date-time in GMTThe timestamp of the event.
eventIdString - UUIDA unique ID for the event.
orderIdString - UUIDA unique ID for the submitted order.
eventTypeStringThe event type.
eventGroupStringEvent category useful for grouping.
humanIdStringHuman API’s unique human ID.
clientIdStringUnique application ID.
userIdStringHuman API’s unique user ID.
clientUserIdStringExternal unique identifier like policy number or unique id.
clientDataObject (Optional)The customer_metadata field provided to Human API on order submission, if present.
eventPayloadObjectObject with event-type-specific data.

Event Payload for OrderSummaryUpdated

PropertyTypeDescription
orderStatusStringThe order status, one of "in progress", "pended", "completed", "cancelled".
timedOutBooleanIndicates whether the order timed out.
reportsAvailableBooleanIndicates whether there are records available.
reportsArray of output Objects (Optional)When available, includes details about available outputs.
dataAvailableBooleanIndicates report data is available.
fcraSuppressedBooleanIndicates the order is blocked.

Report Object

Reports object may not be present in the webhook payload, depends on the availability of medical records.

PropertyTypeDescription
idString - UUIDUnique output identifier.
nameStringName of the output.
baseReportNamesArray of Strings (optional)A list of unique values describing the output components included in the combined record. Only present in "combined" outputs.
fileExtensionStringThe format of the record (eg. 'pdf', 'html', 'json')
uriStringURI to get the file.