Create Subscription
Subscription And Email Notifications
You can subscribe individuals to specific orders to be kept informed about the applicant’s progress through the Human API process. Work with your Customer Success Representative (or contact [email protected] to configure which events in an order lifecycle should trigger an email to subscribers.
Subscriber Email Notifications can be configured for:
- Order Status Notifications: Notifications for then the order changes overall status
- Order Event Notifications: Notifications about specific events or milestones
- Tasks
- Reminders: If the order requires input from the enduser, Human API can set up a schedule for "reminders". Subscribers can be configured to also receive the reminders.
Create a subscription
The example below shows how to subscribe an agent (John Smith) to receive important notifications about the policy identified by "policy_number":
POST /api/v1/subscriptions HTTP/1.1
Host: admin.humanapi.co
Content-Type: application/json
Cache-Control: no-cache
Authorization : Bearer your-client-token
{
"clientUserId": "policy_number",
"subscriberOffice" : "nw676",
"subscriberEmail" : "[email protected]",
"subscriberFirstName" : "John",
"subscriberLastName" : "Smith",
"role" : "producer"
}
Here is a description of different fields in the request payload:
Attribute | Type | Description |
---|---|---|
clientUserId | string | (required) Your unique identifier of the user, such as the policy number. |
subscriberEmail | (required) A valid email address to send notifications. | |
role | string | (required) Identifies the type of subscription. Always set its value to producer .We will introduce additional types of subscriptions in the future. |
subscriberOffice | string | (optional) A code of your choice, identifying the subscriber or their organization. |
subscriberFirstName | string | (optional) The subscriber’s first name. Used for friendly communications. |
subscriberLastName | string | (optional) The subscriber’s last name. Used for friendly communications |
A successful request will yield a 201 response with a body like the example below:
{
"id": "5318d0dd01d4d5001265c183",
"clientUserId": "policy_number",
"subscriberOffice": "nw676",
"subscriberEmail": "[email protected]",
"subscriberFirstName": "John",
"susbscriberLastName": "Smith",
"role": "producer",
"createdAt": "2020-08-21T18:23:21.445Z"
}
The response has an identifier of the subscription (id), which you should keep if you want to delete the subscription.
You can subscribe the same person to get notifications about multiple cases or multiple people to the same case by issuing individual POST calls.
Note
A subscription can only be created for existing orders or after the order is created.
Updated over 1 year ago