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.
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
| id | integer | The id of the waitlist entry. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| person_id | integer | The id of the waitlisted person. | ||||||||||
| event_occurrence_id | integer | The id of the class to waitlist into. | ||||||||||
| state | string | State of the waitlist entry. Will be one of the following:
|
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
Parameters
| from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
|---|---|---|
| to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
| event_occurrence_id | integer | Optional - Scope to an event occurrence. |
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
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_id | integer | The 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_id | integer | The id of the class to waitlist into. |
DELETE /api/v2/front/waitlist_entries/:id
Deletes the waitlist entry.
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.
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
| id | integer | The id of the waitlist entry. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| person_id | integer | The id of the waitlisted person. | ||||||||||
| event_occurrence_id | integer | The id of the class to waitlist into. | ||||||||||
| state | string | State of the waitlist entry. Will be one of the following:
| ||||||||||
| created_at | timestamp | When the waitlist entry was created. | ||||||||||
| updated_at | timestamp | When 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
Parameters
| from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
|---|---|---|
| to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
| event_occurrence_id | integer | Optional - Scope to an event occurrence. |
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.
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_id | integer | The id of the person being waitlisted. Defaults to the current person if a value is not specified. |
|---|---|---|
| event_occurrence_id | integer | The id of the class to waitlist into. |
PUT /api/v2/desk/waitlist_entries/:id
Updates a waitlist entry.
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
| id | integer | The id of the waitlist entry. | ||||
|---|---|---|---|---|---|---|
| state_event | string | 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:
|
DELETE /api/v2/desk/waitlist_entries/:id
Deletes the waitlist entry.
REQUEST
$ curl -X DELETE https://mybiz.pike13.com/api/v2/desk/waitlist_entries/1 \
-H "Authorization: Bearer XXXXXXXXXXXXXXX"