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

Core API Documentation

Waitlist Entries

The People on the waitlist for an Event Occurrence.

Front

GET /api/v2/front/waitlist_entries/:id

Returns the details of a waitlist_entry.

Show curl example

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

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ]
}

Attributes

idintegerThe id of the waitlist entry.
person_idintegerThe id of the waitlisted person.
event_occurrence_idintegerThe id of the class to waitlist into.
statestring

State of the waitlist entry. Will be one of the following:

pendingA spot is being reserved until the person completes the waitlist process.
waitingThe person is waiting for a spot to open in the class. This is the default state.
enrolledThe person has been enrolled in the class from the waitlist.
removedThe person has been removed from the waitlist.
expiredThe person was waitlisted when the class was completed
GET /api/v2/front/people/:person_id/waitlist_entries

Lists waitlist entries for a person. Access is restricted to the authenticated person and their dependents. Paginate using the page parameter.

Parameters

fromtimestampOptional, but must be included if specifying to - Start of time range filter.
totimestampOptional, but must be included if specifying from - End of time range filter.
event_occurrence_idintegerOptional - Scope to an event occurrence.

Show curl example

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

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    },
    {
      "id": 2,
      "person_id": 1,
      "event_occurrence_id": 2,
      "state": "enrolled",
      "event_occurrence": {
        "id": 2,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-13T07:00:00Z",
        "end_at": "2015-06-13T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ],
  "total_count": 2
}

POST /api/v2/front/waitlist_entries

Creates a waitlist entry whichs adds an authenticated person or a person's dependent to the waitlist.

Returns 422 with the restriction description when the person cannot join the waitlist, including when the business prevents clients with unpaid invoices from enrolling.

Show curl example

REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v2/front/waitlist_entries \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"waitlist_entry": {"person_id": 1, "event_occurrence_id": 1}}'

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ]
}

Attributes

person_idintegerThe id of the person being waitlisted. Must be the id of the authenticated person or one of their dependents. Defaults to the current person if a value is not specified.
event_occurrence_idintegerThe id of the class to waitlist into.
DELETE /api/v2/front/waitlist_entries/:id

Deletes the waitlist entry.

Show curl example

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

Desk

GET /api/v2/desk/waitlist_entries/:id

Returns the details of a waitlist_entry.

Show curl example

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

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "created_at": "2014-09-12T23:14:13Z",
      "updated_at": "2014-09-12T23:14:13Z",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ]
}

Attributes

idintegerThe id of the waitlist entry.
person_idintegerThe id of the waitlisted person.
event_occurrence_idintegerThe id of the class to waitlist into.
statestring

State of the waitlist entry. Will be one of the following:

pendingA spot is being reserved until the person completes the waitlist process.
waitingThe person is waiting for a spot to open in the class. This is the default state.
enrolledThe person has been enrolled in the class from the waitlist.
removedThe person has been removed from the waitlist.
expiredThe person was waitlisted when the class was completed
created_attimestampWhen the waitlist entry was created.
updated_attimestampWhen the waitlist entry was last updated.
GET /api/v2/desk/people/:person_id/waitlist_entries
GET /api/v2/desk/event_occurrences/:event_occurrence_id/waitlist_entries

Lists waitlist entries for a person or event occurrence. Paginate using the page parameter.

Parameters

fromtimestampOptional, but must be included if specifying to - Start of time range filter.
totimestampOptional, but must be included if specifying from - End of time range filter.
event_occurrence_idintegerOptional - Scope to an event occurrence.

Show curl example

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

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "created_at": "2014-09-12T23:14:13Z",
      "updated_at": "2014-09-12T23:14:13Z",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    },
    {
      "id": 2,
      "person_id": 2,
      "event_occurrence_id": 1,
      "state": "enrolled",
      "created_at": "2014-09-13T11:12:13Z",
      "updated_at": "2014-09-13T13:14:15Z",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "Jane Client",
        "email": "janeclient@example.com"
      }
    }
  ],
  "total_count": 2
}

POST /api/v2/desk/waitlist_entries

Creates a waitlist entry for a person.

Show curl example

REQUEST
$ curl -X POST https://mybiz.pike13.com/api/v2/desk/waitlist_entries \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"waitlist_entry": {"person_id": 1, "event_occurrence_id": 1}}'

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "waiting",
      "created_at": "2014-09-12T23:14:13Z",
      "updated_at": "2014-09-12T23:14:13Z",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ]
}

Attributes

person_idintegerThe id of the person being waitlisted. Defaults to the current person if a value is not specified.
event_occurrence_idintegerThe id of the class to waitlist into.
PUT /api/v2/desk/waitlist_entries/:id

Updates a waitlist entry.

Show curl example

REQUEST
$ curl -X PUT https://mybiz.pike13.com/api/v2/desk/waitlist_entries/1 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"waitlist_entry": {"state_event": "enroll"}}'

RESPONSE
{
  "waitlist_entries": [
    {
      "id": 1,
      "person_id": 1,
      "event_occurrence_id": 1,
      "state": "enrolled",
      "created_at": "2014-09-12T23:14:13Z",
      "updated_at": "2014-09-13T10:11:12Z",
      "event_occurrence": {
        "id": 1,
        "name": "Class P",
        "state": "active",
        "start_at": "2015-06-10T07:00:00Z",
        "end_at": "2015-06-10T07:30:00Z",
        "service_id": 1,
        "event_id": 1,
        "location_id": 1
      },
      "person": {
        "id": 1,
        "name": "John Client",
        "email": "johnclient@example.com"
      }
    }
  ]
}

Attributes

idintegerThe id of the waitlist entry.
state_eventstring

Waitlist entries are state machines. They can be transitioned between states by using the write-only state_event attribute. The following transitions can be applied:

waitTransitions the waitlist entry into the "waiting" state.
enrollTransitions the waitlist entry into the "enrolled" state. This only affects the waitlist entry and will not add the person to the class roster.

Creating a Visit for a waitlisted person will both transition the associated waitlist entry to the "enrolled" stated and will enroll that person into the class.

This transition is not allowed on waitlist entries in the "removed" state.
DELETE /api/v2/desk/waitlist_entries/:id

Deletes the waitlist entry.

Show curl example

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