Pike13 For Developers
Get Started
Authentication
Core API
Reporting API
Webhooks API
Announcements

Webhooks API Documentation

Person Plan

Resource Attributes

data.person_plans[0]
idintegerID of the person_plan association.
created_attimestampTimestamp for when this person became associated with this plan.
deactivated_attimestampTimestamp for when this person was removed from this plan, if applicable.
exhausted_attimestampTimestamp for when this person_plan was exhausted, if applicable.
updated_attimestampTimestamp for when this person_plan was updated, if applicable.
personobject

Details of the person for this person_plan.

idintegerID for this person.
namestringName of this person.
emailstringEmail for this person.
planobject

Details of the plan for this person_plan.

idintegerID for this plan.
descriptionstringDescription of this plan.
typestringType of this plan. One of ['Pack', 'Prepaid', 'Membership'].
plan_product_idintegerID of product associated with this plan.
countintegerMaximium count (limit) for the number of punches for this plan during the 'limit_period'.
staff_member_idintegerStaff Member ID for this plan.
location_idintegerLocation ID for this plan.
pricestringPrice formatted in currency units for this plan.
price_centsintegerPrice in cents for this plan.
limit_periodstringLimit period for this plan if any. One of ['weekly', 'monthly'].
start_datedateStart date for this plan.
end_datedateEnd date for this plan.
cancelled_attimestampTimestamp for when this plan was cancelled, if applicable.
updated_attimestampTimestamp for when this plan was updated.
created_attimestampTimestamp for when this plan was created.
plan_productobject

Details of the plan product for this person_plan.

idintegerID for this plan_product.
consider_memberbooleanTrue if clients who buy this person_plan are considered members

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_idintegerThe person on the plan
deactivated_attimestampThe date this plan was deactivated
exhausted_atstringThe date the person plan was exhausted

This topic supports previous values within data:

data
person_plansarrayArray of one person plan updated in the business.
previousobject

Previous values of the resource. The following are supported:

person_idintegerID of the person for this person_plan
deactivated_attimestampThe date this plan was deactivated
exhausted_atstringThe date the person plan was exhausted
updated_atstringThe date the person plan was last updated

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