Webhooks API Documentation
Person Plan
Resource Attributes
| data.person_plans[0] | |||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | integer | ID of the person_plan association. | |||||||||||||||||||||||||||||||||||||||||||||
| created_at | timestamp | Timestamp for when this person became associated with this plan. | |||||||||||||||||||||||||||||||||||||||||||||
| deactivated_at | timestamp | Timestamp for when this person was removed from this plan, if applicable. | |||||||||||||||||||||||||||||||||||||||||||||
| exhausted_at | timestamp | Timestamp for when this person_plan was exhausted, if applicable. | |||||||||||||||||||||||||||||||||||||||||||||
| updated_at | timestamp | Timestamp for when this person_plan was updated, if applicable. | |||||||||||||||||||||||||||||||||||||||||||||
| person | object | Details of the person for this person_plan.
| |||||||||||||||||||||||||||||||||||||||||||||
| plan | object | Details of the plan for this person_plan.
| |||||||||||||||||||||||||||||||||||||||||||||
| plan_product | object | Details of the plan product for this person_plan.
| |||||||||||||||||||||||||||||||||||||||||||||
person_plan.created
Triggers whenever a new person_plan is created.
Payload Example
PersonPlan Created Webhook Payload
{
"topic": "person_plan.created",
"business_id": 1,
"data": {
"person_plans": [
{
"id": 1,
"created_at": "2012-09-03T09:05:01Z",
"deactivated_at": null,
"exhausted_at": null,
"updated_at": "2012-09-03T09:05:01Z",
"person": {
"id": 1,
"name": "Kiel Kuhic",
"email": "kuhic_kiel@pike13.com"
},
"plan": {
"id": 1,
"description": "Super Cool Plan",
"type": "Prepaid",
"plan_product_id": 2,
"count": 1,
"staff_member_id": 2,
"location_id": null,
"price": "10,000.00",
"price_cents": "1000000",
"limit_period": "weekly",
"start_date": "2012-09-03",
"end_date": "2012-10-02",
"cancelled_at": null,
"updated_at": "2012-09-03T09:05:01Z",
"created_at": "2012-09-03T09:05:01Z"
},
"plan_product": {
"id": 2,
"consider_member": true
}
}
]
}
}
person_plan.updated
Triggers whenever a person_plan is updated.
The specifc list of fields that trigger an update are:
| Changes to these fields trigger a notification | ||
|---|---|---|
| person_id | integer | The person on the plan |
| deactivated_at | timestamp | The date this plan was deactivated |
| exhausted_at | string | The date the person plan was exhausted |
This topic supports
| data | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| person_plans | array | Array of one person plan updated in the business. | ||||||||||||
| previous | object | Previous values of the resource. The following are supported:
| ||||||||||||
Payload Example
PersonPlan Updated Webhook Payload
{
"topic": "person_plan.updated",
"business_id": 1,
"data": {
"person_plans": [
{
"id": 1,
"created_at": "2012-09-03T09:05:01Z",
"deactivated_at": "2012-09-02T01:21:22Z",
"exhausted_at": "2012-08-01T09:15:21Z",
"updated_at": "2012-09-03T09:05:01Z",
"person": {
"id": 1,
"name": "Kiel Kuhic",
"email": "kuhic_kiel@pike13.com"
},
"plan": {
"id": 1,
"description": "Super Cool Plan",
"type": "Prepaid",
"plan_product_id": 2,
"count": 1,
"staff_member_id": 2,
"location_id": null,
"price": "10,000.00",
"price_cents": "1000000",
"limit_period": "weekly",
"start_date": "2012-09-03",
"end_date": "2012-10-02",
"cancelled_at": null
},
"plan_product": {
"id": 2,
"consider_member": true
}
}
],
"previous": {
"person_id": 8,
"deactivated_at": null,
"exhausted_at": null,
"updated_at": "2019-02-20T17:00:00Z"
}
}
}