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

Core API Documentation

Plans for People

Memberships and passes for a person.

Front

GET /api/v2/front/people/:person_id/plans

Lists plans for a person. Paginate using the page parameter.

Parameters

include_holdsbooleanInclude active and upcoming holds on each plan.
filterstring

Filter plans returned by:

activestringPlans that are currently active with visits available
active_with_upcomingstringPlans that are active or not yet started
currentstringPlans with start and end dates encompassing today's date
inactivestringPlans that are not current or have no visits remaining
upcomingstringPlans with visits available that have yet to start
usablestringPlans that are active and not on hold

Show curl example

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

RESPONSE
{
  "plans": [
    {
      "id": 1,
      "count": 10,
      "type": "Pack",
      "person_ids": [
        1
      ],
      "name": "10 Pack",
      "description": "10 Pack",
      "price_cents": 10000,
      "consider_member": false,
      "plan_product_id": 1,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "created_at": "2015-06-24T23:27:03Z",
      "updated_at": "2015-06-24T23:27:03Z",
      "remaining_count": 2,
      "billing": {
        "interval_unit": "month",
        "interval_count": 1,
        "days": [],
        "days_of_month": [
          3
        ],
        "months_of_year": []
      }
    },
    {
      "id": 2,
      "count": null,
      "type": "Membership",
      "person_ids": [
        1
      ],
      "name": "Unlimited Membership",
      "description": "Unlimited Membership",
      "price_cents": 10000,
      "consider_member": true,
      "plan_product_id": 2,
      "start_date": "2015-06-24",
      "end_date": null,
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "limit_period": "monthly",
      "created_at": "2015-06-24T23:37:03Z",
      "updated_at": "2015-06-24T23:37:19Z",
      "rollover_count": null,
      "last_visit": {
        "id": 7,
        "event_occurrence": {
          "id": 5,
          "start_at": "2015-06-25T13:00:00Z"
        }
      },
      "billing": {
        "interval_unit": "year",
        "interval_count": 1,
        "days": [],
        "days_of_month": [
          3
        ],
        "months_of_year": [
          "January"
        ]
      }
    },
    {
      "id": 3,
      "count": null,
      "type": "Prepaid",
      "person_ids": [
        1
      ],
      "name": "6mo Unlimited",
      "description": "6mo Unlimited",
      "price_cents": 60000,
      "consider_member": true,
      "plan_product_id": 3,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "limit_period": "monthly",
      "created_at": "2015-06-24T23:37:09Z",
      "updated_at": "2015-06-24T23:37:19Z",
      "rollover_count": null,
      "next_invoice": {
        "id": 10,
        "invoice_date": "2015-07-24",
        "total": {
          "currency_iso": "USD",
          "price_cents": 60000,
          "price_string": "$600"
        }
      },
      "billing": {
        "interval_unit": "month",
        "interval_count": 1,
        "days": [],
        "days_of_month": [
          3
        ],
        "months_of_year": []
      }
    }
  ],
  "total_count": 3
}

Desk

GET /api/v2/desk/people/:person_id/plans

Lists plans for a person. Paginate using the page parameter.

Parameters

include_holdsbooleanInclude active and upcoming holds on each plan.
filterstring

Filter plans returned by:

activestringPlans that are currently active with visits available
active_with_upcomingstringPlans that are active or not yet started
currentstringPlans with start and end dates encompassing today's date
inactivestringPlans that are not current or have no visits remaining
upcomingstringPlans with visits available that have yet to start
usablestringPlans that are active and not on hold

Show curl example

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

RESPONSE
{
  "plans": [
    {
      "id": 1,
      "count": 10,
      "type": "Pack",
      "person_ids": [
        1
      ],
      "name": "10 Pack",
      "description": "10 Pack",
      "price_cents": 10000,
      "consider_member": false,
      "plan_product_id": 1,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "created_at": "2015-06-24T23:27:03Z",
      "updated_at": "2015-06-24T23:27:03Z",
      "remaining_count": 2,
      "billing": {
        "interval_unit": "month",
        "interval_count": 1,
        "days": [],
        "days_of_month": [],
        "months_of_year": []
      }
    },
    {
      "id": 2,
      "count": null,
      "type": "Membership",
      "person_ids": [
        1
      ],
      "name": "Unlimited Membership",
      "description": "Unlimited Membership",
      "price_cents": 10000,
      "consider_member": true,
      "plan_product_id": 2,
      "start_date": "2015-06-24",
      "end_date": null,
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "limit_period": "monthly",
      "created_at": "2015-06-24T23:37:03Z",
      "updated_at": "2015-06-24T23:37:19Z",
      "rollover_count": null,
      "last_visit": {
        "id": 7,
        "event_occurrence": {
          "id": 5,
          "start_at": "2015-06-25T13:00:00Z"
        }
      },
      "billing": {
        "interval_unit": "week",
        "interval_count": 1,
        "days": [
          "Sunday"
        ],
        "days_of_month": [],
        "months_of_year": []
      }
    },
    {
      "id": 3,
      "count": null,
      "type": "Prepaid",
      "person_ids": [
        1
      ],
      "name": "6mo Unlimited",
      "description": "6mo Unlimited",
      "price_cents": 60000,
      "consider_member": true,
      "plan_product_id": 3,
      "start_date": "2015-06-24",
      "end_date": "2016-06-23",
      "staff_member_id": null,
      "location_id": null,
      "cancelled_at": null,
      "limit_period": "monthly",
      "created_at": "2015-06-24T23:37:09Z",
      "updated_at": "2015-06-24T23:37:19Z",
      "rollover_count": null,
      "next_invoice": {
        "id": 10,
        "invoice_date": "2015-07-24",
        "total": {
          "currency_iso": "USD",
          "price_cents": 60000,
          "price_string": "$600"
        }
      },
      "billing": {
        "interval_unit": "month",
        "interval_count": 1,
        "days": [],
        "days_of_month": [
          3
        ],
        "months_of_year": []
      }
    }
  ],
  "total_count": 3
}