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

Core API Documentation

Packs (Passes)

A pack is a type of non-recurring plan that grants people a fixed number of visits.

Desk Only

GET /api/v2/desk/packs/:id

Returns the details of a pack.

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/packs/1 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "packs": [
    {
      "id": 3,
      "count": 10,
      "person_ids": [
        1
      ],
      "description": "10 Pack",
      "price_cents": 10000,
      "rollover_count": null,
      "pack_product_id": 1,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "created_at": "2015-06-24T18:41:02Z",
      "updated_at": "2015-06-24T18:41:02Z"
    }
  ]
}

POST /api/v2/desk/pack_products/:pack_product_id/packs

Creates a pack.

Show curl example

REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v2/desk/pack_products/1/packs \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"pack": {"person_ids": [1]}}'

RESPONSE
{
  "packs": [
    {
      "id": 3,
      "count": 10,
      "person_ids": [
        1
      ],
      "description": "10 Pack",
      "price_cents": 10000,
      "rollover_count": null,
      "pack_product_id": 1,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "created_at": "2015-06-24T18:41:02Z",
      "updated_at": "2015-06-24T18:41:02Z"
    }
  ]
}

Attributes

person_idsarrayArray of person ids. Required. Including more than one person ID allows clients to share a pack.
start_datedateDate the pack becomes effective. Optional. Default to today.
end_datedateDate the pack expires. Defaults to start date plus the pack products expiration period.
countintegerNumber of visits the pack can cover. Optional. If not supplied it will default to the pack product definition.
descriptionstringDescription of the pack. Optional.
price_centsintegerThe cost of the pack in cents. Defaults to the pack product definition.
staff_member_idintegerStaff member id. If set, this pack will only automatically apply to visits where the given staff member is an instructor.
location_idintegerLocation id. If set, this pack will only automatically apply to visits at the given location.
visits_sharedintegerIf a pack applies to multiple people, you can choose whether the visits should be shared among them, or if they should each get their own set of visits. Optional. Defaults to true when plan only applies to one person and false when it applies to multiple people.
DELETE /api/v2/desk/packs/:id

Destroys a pack. A pack with a closed bill can't be deleted; the response is a 422 Unprocessable Entity with an errors object.

Show curl example

REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/packs/1 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE