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

Webhooks API Documentation

Punchcard

Punchcards track the amount of event occurrences the people associated with the punchcard can attend. A new punchcard starts every week if the plan is a weekly plan, every month if the plan is a monthly plan, etc.

Resource Attributes

data.punchcards[0]
idintegerThe punchcard's ID.
countintegerThe number of punches provided by the punchcard.
remainingintegerThe number of punches remaining on the punchcard.
start_datedateThe first day the punchcard is active.
end_datedateThe last day the punchcard is active.
peopleobject

idintegerPerson's ID.
namestringPerson's full name.
emailstringPerson's email address. Email address formatting is enforced.
planobject

Details of the associated plan.

idintegerID for this plan.
descriptionstringDescription of this plan.
typestringType of this plan. One of ['Pack', 'Prepaid', 'Membership'].
countintegerThe number of punches each punchcard starts with for the duration of the limit period.
limit_periodstringLimit period for this plan if any (e.g. 'weekly', 'monthly'). The 'count' variable relates to this time period.
updated_attimestampTimestamp for when the punchcard was last updated.

punchcard.started

Triggers when a punchcard becomes active for the current limit period.

Payload Example

Punchcard Started Webhook Payload

{
  "topic": "punchcard.started",
  "business_id": 1,
  "data": {
    "punchcards": [
      {
        "id": 1,
        "count": 10,
        "remaining": 10,
        "start_date": "2012-08-31",
        "end_date": "2012-09-06",
        "people": [
          {
            "id": 1,
            "name": "Zula Jacobi",
            "email": "zula.jacobi@example.com"
          }
        ],
        "plan": {
          "id": 1,
          "name": "Summer Strong",
          "description": "",
          "type": "Membership",
          "count": 1,
          "limit_period": "week"
        },
        "updated_at": "2012-09-03T09:05:02Z"
      }
    ]
  }
}

punchcard.updated

Triggers when a certain properties of a punchcard are updated.

The specific list of fields that trigger an update are:

Changes to these fields trigger a notification
count
remaining
start_date
end_date
data
punchcardsarrayArray of one updated punchcard.
previousobject

Previous values of the resource. The following are supported:

countintegerThe number of punches provided by the punchcard.
remainingintegerThe number of punches remaining on the punchcard.
start_datedateThe first day the punchcard is active.
end_datedateThe last day the punchcard is active.
updated_attimestampTimestamp for when the punchcard was last updated.

punchcard.updated

Triggers when a punchcard is updated.

Payload Example

Punchcard Updated Webhook Payload

{
  "topic": "punchcard.updated",
  "business_id": 80,
  "data": {
    "punchcards": [
      {
        "id": 77,
        "count": 5,
        "remaining": 5,
        "start_date": "2012-08-31",
        "end_date": "2012-09-02",
        "people": [
          {
            "id": 117,
            "name": "Nicholaus Greenholt",
            "email": "nicholaus_greenholt@example.com"
          }
        ],
        "plan": {
          "id": 77,
          "name": "MyString",
          "description": "MyString",
          "type": "Membership",
          "count": 1,
          "limit_period": "week"
        },
        "updated_at": "2012-09-03T09:05:46Z"
      }
    ],
    "previous": {
      "count": 10,
      "end_date": "2012-09-06",
      "remaining": 10,
      "updated_at": "2012-09-03T09:05:02Z"
    }
  }
}

punchcard.deleted

Triggers when a punchcard is deleted.

Payload Example

Punchcard Deleted Webhook Payload

{
  "topic": "punchcard.deleted",
  "business_id": 1,
  "data": {
    "punchcards": [
      {
        "id": 1,
        "count": 10,
        "remaining": 10,
        "start_date": "2012-08-31",
        "end_date": "2012-09-06",
        "people": [
          {
            "id": 1,
            "name": "Zula Jacobi",
            "email": "zula.jacobi@example.com"
          }
        ],
        "plan": {
          "id": 1,
          "name": "Summer Strong",
          "description": "",
          "type": "Membership",
          "count": 1,
          "limit_period": "week"
        },
        "updated_at": "2012-09-03T09:05:02Z"
      }
    ]
  }
}