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

Core API Documentation

Get Started

Follow these simple steps to register your app and get started with the Pike13 Core API.

JSON Conventions

Core JSON responses always contain a root key. That root key is the resource name (pluralized) and snake-cased. For example GET /api/v2/desk/people will return a JSON object of the form:

{
  "people": []
  ...
}

Endpoints for retrieving a single object also return them as a collection. GET /api/v2/desk/people/:id returns the same structure as above. This requires that the client only deal with one response format per resource.

“front” vs “desk”

People in Pike13 are categorized as clients and staff members.

The URL for interacting with the API as a client includes front in the path:

https://pike13.com/api/v2/front/people/1.json

The URL for interacting with the API as a staff member includes desk in the path:

https://pike13.com/api/v2/desk/people/1.json

Both of these endpoints fetch the details of a Person with some subtle differences:

  • The desk URL, is only accessible by staff and will include data that isn't necessarily visible to clients (like hidden custom fields). Any access token tied to a staff member can access this resource.
  • The front URL, is accessible by any access token granted to the owner of that account or an account that has privilege to view it (for example, when a dependent/provider relationship is involved).

Several but not all of the front endpoints do not require authentication and are accessible without an access token. This is analogous to anonymously visiting a website of a Pike13 business and viewing the schedule or list of locations. The data is public — no need to authenticate. Since they do not require an access token, they do require that your application's Client ID be supplied by query parameter.

{"error": "Application Client ID is required for unauthenticated requests"}

If you receive this error, include your Client ID in the query parameters like this:

https://mybiz.pike13.com/api/v2/front/event_occurrence.json?client_id=MYCLIENTID

Timezones and timestamps

Timezones are included whenever a timestamp is returned, but all timestamps are returned in UTC. This forces client applications to be conscious of timezones and translate them accordingly.

When specifying a timestamp in a filter, we recommend that you use ISO 8601 time formats, including the desired timezone offset. For example:

REQUEST
GET /api/v2/desk/people?created_since=2015-07-01T08:00:00-07:00

Locales

For user messages, such as validation errors, the locale can be set in the request headers. The header key is 'X-FD-Locale'. If this header is set to a value in the supported list below translations will be used when available.

If no locale is set in the header the default is the one set for the business. If none is set for the business the default is "en".

All server status messages and errors are in english regardless of locale settings.

The current list of supported locales is: "de", "en", "en-GB", "en-ZA", "es-ES", "es-MX", "fr", "it", "lt", "nl", "pt-BR", "ru", "sv", "zh-CN", "zh-TW"

REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/people \
  -H "X-FD-Locale: es-ES" \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"
180 2024-11-21 06:30:59 +0000 2024-11-21 06:31:00 +0000

Rate limit

The API is rate-limited to 180 requests per minute per access token for authenticated APIs and 360 requests per minute per IP whether authenticated or not. No additional rate limit is enforced per client application. This is subject to change at any time. If you think you have a legitimate need to exceed this limit, please contact Pike13 Support.

If you've hit a rate limit, the HTTP header of the response will contain rate limit information. The RateLimit-Reset field is the time when you can start sending requests again. It is in seconds from the epoch. The example below resets at Thu, 21 Nov 2024 06:31:00 +0000

Example

HTTP/1.1 429 Too Many Requests
Date: Thu, 21 Nov 2024 06:30:59 +0000
RateLimit-Limit: 180
RateLimit-Remaining: 0
RateLimit-Reset: 1732170660

Endpoints

Account

Pike13 accounts span all businesses. Although a person might be a client of one business and a staff member of another, they will have only one account associated with their email address.

GET /api/v2/account

Returns the account for the current access token.

This endpoint is only accessible without a business subdomain (that is, the host must be pike13.com) and requires an access token granted to pike13.com.

Show curl example

Attributes

idintegerThe accounts identifier
emailstringThe account holders email address
first_namestringThe account holders first name
last_namestringThe account holders last name
email_confirmed_attimestampThe time when the account was confirmed by email

Account Businesses

GET /api/v2/account/businesses

Returns all the business objects for the Pike13 account specified by the current access token. This is very useful if you are building an app that self-discovers which Pike13 businesses a user is tied to. You can authenticate them against pike13.com and then request the businesses for their account, presumably to then have the user select a business and perform some action within your app.

This endpoint is only accessible without a business subdomain (that is, the host must be pike13.com) and requires an access token granted to pike13.com.

Show curl example

Account Passwords

POST /api/v2/account/passwords

Tells the system to send a password reset email to the given email address. For security reasons, the response will always be a 201 even if an account with that email address does not exist.

This endpoint is only accessible without a business subdomain (that is, the host must be pike13.com).

Parameters

emailstringAn email address that you want to receive the email to reset password.

Show curl example

Account Confirmations

POST /api/v2/account/confirmations

Tells the system to send a confirmation email to the given email address. For security reasons, the response will always be a 201 even if an account with that email address does not exist.

A confirmation email will not be sent if the account is already confirmed.

This endpoint is only accessible without a business subdomain (that is, the host must be pike13.com) and requires an access token granted to pike13.com.

Show curl example

Account People

GET /api/v2/account/people

Returns all the person objects for the Pike13 account specified by the current access token. This is very useful if you are building an app that self-discovers which Pike13 businesses a user is tied to. You can authenticate them against pike13.com and then request the People for their account, presumably to then have the user select a business and perform some action within your app.

This endpoint is only accessible without a business subdomain (that is, the host must be pike13.com) and requires an access token granted to pike13.com.

Show curl example

Appointment Availability Slots

Returns the availability for a given appointment.

Front

GET /api/v2/front/appointments/:service_id/available_slots

Lists all available times for the given appointment for the given date. When the available staff member is configured to be hidden in client mode, the staff member object won't be returned. When the appointment is configured to be hidden for the current user, a 404 status will be returned. When the service is configured to have a deadline for registering online, any availabilities after the deadline will be hidden. Availabilities in the past are not included.

Parameters

datedateDate filter. Defaults to today.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

GET /api/v2/front/appointments/:service_id/available_slots/summary

Returns availability "heat map" scores for the given appointment for the given date range - the parameters from and to. The score for each day is the percentage of availability relative to the day with the most availability. Days with a score of 1 have the most availability while days with a score closer to 0 have less. Scores are not returned for days in the past. Date range is limited to 90 days - the parameters from and to are inclusive. If you give a date range that is more than 90 days, it returns an error.

Parameters

fromdateDate filter. Defaults to today.
todateDate filter. Defaults to the last day of the current month.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

Desk

GET /api/v2/desk/appointments/:service_id/available_slots

Lists all available times for the given appointment for the given date.

Parameters

datedateDate filter. Defaults to today.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

GET /api/v2/desk/appointments/:service_id/available_slots/summary

Returns availability "heat map" scores for the given appointment for the given date range - the parameters from and to. The score for each day is the percentage of availability relative to the day with the most availability. Days with a score of 1 have the most availability while days with a score closer to 0 have less. Scores are not returned for days in the past. Date range is limited to 90 days - the parameters from and to are inclusive. If you give a date range that is more than 90 days, it returns an error.

Parameters

fromdateDate filter. Defaults to today.
todateDate filter. Defaults to the last day of the current month.
staff_member_idscomma delimited stringFilters availability by staff member id.
location_idscomma delimited stringFilters availability by location id.

Show curl example

Bookings and Leases

Register a person into an event or series of events. You can also temporarily hold a space in one or more events, then register for all of them at once. Bookings can be associated w/ Invoices & will be automatically completed once the Invoice is closed.

Lease: a temporary reservation on a Group Class, Course or Appointment. For Group Classes, this can be a single occurrence, or a recurring enrollment. For Appointments this can be a single occurrence. For a Course, it should be for the entire run of event occurrences. A person must be associated with the Lease before the Booking can be completed.

Booking: a collection of Leases. You can create a Booking with zero or more Leases. When the Booking is in the incomplete state, the Leases are just holding a space in that Group Class, Course or Appointment. When a Booking is completed, the Leases will go from reserved to registered.

Uncompleted Bookings will eventually expire. When it expires, it will release the spaces leased in each event. The default expiration is 10 minutes, but can be set using the expired_at parameter. The maximum expiration time is 20 minutes.

Front

GET /api/v2/front/bookings/:id

Returns the given Booking if it is owned by the person currently authenticated.

Show curl example

GET /api/v2/front/bookings/:booking_id/leases/:id

Returns the given Lease if it is owned by the person currently authenticated.

Show curl example

PUT /api/v2/front/bookings/:id

Allows you to complete a Booking. You cannot add any more Leases to the Booking using this endpoint. To add or update Leases use the Leases endpoint.

Show curl example

PUT /api/v2/front/bookings/:booking_id/leases/:id

Allows you to update a Lease. The only thing that can be updated on the Lease is the person associated with it. You cannot change the leased service. You would need to delete the Lease and create a new one if you want to change the service.

Show curl example

DELETE /api/v2/front/bookings/:id

Destroys the given Booking.

If the Booking was completed, then just the Booking will be destroyed. The Visits and Invoices that it created won't be destroyed. If the Booking was not completed, it and any Leases, visits, plans and invoices created by it will be destroyed.

i.e. If the person has paid and been registered for the events, only the Booking will be deleted. If they have not paid, then we'll destroy their reservations and the Invoice.

Show curl example

DELETE /api/v2/front/bookings/:booking_id/leases/:lease_id

Destroys the given Lease, any reservations it's holding, and removes it from the Booking. You can only delete a Lease from a Booking that has not been completed.

Show curl example

POST /api/v2/front/bookings

Creates a Booking with one or more Leases.

Parameters

idempotency_tokenstringA unique string that you can send with the Booking to ensure that you don't send the same request twice.
expires_attimestampA date and time to expire this Booking. Capacity in an event will be held by this Booking, so don't set this too long. Default is 10 minutes, maximum is 20 minutes.
complete_bookingbooleanThis will set each visit in the Booking from reserved state to the registered state.
leasesarray

Optional: Array of Leases to be created. Each Lease must be one of the following collections of information depending on the type of service leased:

Event Occurrence

event_occurrence_idintegerThe id of an event occurrence.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Appointment

service_idintegerThe id of a service.
staff_member_idintegerThe id of a staff member. If two (or more) of the same service occur at the same time, including the staff member will help differentiate which one is desired.
location_idintegerThe id of the location. If the same service is available at more than one location, including the location will help differentiate between the services.
start_attimestampThe time when the appointment starts
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Recurring Event (Group Classes)

event_idintegerThe id of the recurring event.
start_attimestampThe time of the first event to attend.
recurringbooleanWhether or not to enroll in this event on an ongoing basis.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Course

event_idintegerThe id of the recurring event.
start_attimestampOptional. The date and time of the first event to attend. If empty will set to today.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Show curl example

POST /api/v2/front/bookings/:booking_id/leases

Add a Lease to a Booking. The parameters for the Lease are the same as the Lease parameters in a Booking. Choose from the different parameter sets listed below:

Event Occurrence Parameters

event_occurrence_idintegerThe id of an event occurrence.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Show curl example

Appointment Parameters

service_idintegerThe id of a service.
staff_member_idintegerThe id of a staff member. If two (or more) of the same service occur at the same time, including the staff member will help differentiate which one is desired.
location_idintegerThe id of the location. If the same service is available at more than one location, including the location will help differentiate between the services.
start_attimestampThe time when the appointment starts
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Show curl example

Recurring Event Paramters

event_idintegerThe id of the recurring event.
start_attimestampThe time of the first event to attend.
recurringbooleanWhether or not to enroll in this event on an ongoing basis.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Show curl example

Course Parameters

event_idintegerThe id of the course event.
start_attimestampOptional. The date and time of the first event to attend. If empty will set to today.
personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.

Show curl example

Desk

GET /api/v2/desk/bookings/:id

Returns the given Booking.

Show curl example

DELETE /api/v2/desk/bookings/:id

Destroys the given Booking.

If the Booking was completed, then just the Booking will be destroyed. The Visits and Invoices that it created won't be destroyed. If the Booking was not completed, it and any Leases, visits, plans and invoices created by it will be destroyed.

i.e. If the person has paid and been registered for the events, only the Booking will be deleted. If they have not paid, then we'll destroy their reservations and the Invoice.

Show curl example

PUT /api/v2/desk/bookings/:id

Allows you to complete a Booking. You cannot add any more Leases to the Booking using this endpoint. To add or update Leases use the Leases endpoint.

Show curl example

PUT /api/v2/desk/bookings/:booking_id/leases/:id

Allows you to update a Lease. The only thing that can be updated on the Lease is the person associated with it. You cannot change the leased service. You would need to delete the Lease and create a new one if you want to change the service.

You can add an existing person by id or email. You can create a new person with a minimum of first_name, last_name, and email; other fields are optional

Parameters

personobject

A new or existing person to put on this Lease:

idintegerThe id of the person attending this event.
emailstringEmail address
first_namestringFirst name
last_namestringLast name
phonestringTelephone number
sourcestringFor internal use only.
send_invitebooleanTrue to send the new person an email invitation to create an account. Default false.
skip_new_client_passesbooleanTrue will give the new person a complimentary pass if offered by the business. Default false.

Show curl example

POST /api/v2/desk/bookings

Creates a Booking with one or more Leases.

Parameters

The parameters to the Desk endpoint are the same as the Front endpoint, with the addition of the person and allow_overbook fields on the Lease object. In Desk mode, you can:

  • Add existing person to the Lease by id
  • Add existing person to the Lease by email
  • Create a person with a minimum of first_name, last_name, and email; other fields are optional
  • Ignore the capacity of the event when creating a Lease (allows over-booking)

leasesarray

Array of Leases using one of the following collections of information:

personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.
emailstringEmail address
first_namestringFirst name
last_namestringLast name
phonestringTelephone number
sourcestringFor internal use only.
send_invitebooleanTrue to send the new person an email invitation to create an account. Default false.
skip_new_client_passesbooleanTrue will give the new person a complimentary pass if offered by the business. Default false.
allow_overbookbooleanTrue to allow over-booking the event when creating a Lease. Default false.

Show curl example

POST /api/v2/desk/bookings/:booking_id/leases

Add a new Lease to an existing Booking.

Parameters

The parameters to the Desk endpoint are the same as the Front endpoint, with the addition of the person and allow_overbook fields on the Lease object. In Desk mode, you can:

  • Add existing person to the Lease by id
  • Add existing person to the Lease by email
  • Create a person with a minimum of first_name, last_name, and email; other fields are optional
  • Ignore the capacity of the event when creating a Lease (allows over-booking)

personobject

An existing person to put on this Lease

idintegerThe id of the person attending this event.
emailstringEmail address
first_namestringFirst name
last_namestringLast name
phonestringTelephone number
sourcestringFor internal use only.
send_invitebooleanTrue to send the new person an email invitation to create an account. Default false.
skip_new_client_passesbooleanTrue will give the new person a complimentary pass if offered by the business. Default false.
allow_overbookbooleanTrue to allow over-booking the event when creating a Lease. Default false.

Show curl example

Business

Front

GET /api/v2/front/business

Returns the basic details of a business.

Show curl example

Desk

GET /api/v2/desk/business

Returns the basic details of a business.

Show curl example

Branding

Front only

No authentication required.

GET /api/v2/front/branding

Returns branding information for the business, which includes colors, logos, and a cover photo.

Show curl example

Custom Field

Custom fields that can be associated with people.

Desk

GET /api/v2/desk/custom_fields

Lists the available custom fields.

Show curl example

Enrollment Eligibility

Determine if a Person can enroll in an Event Occurrence.

Front

GET /api/v2/front/event_occurrences/:event_occurrence_id/enrollment_eligibilities

Returns a list of enrollment warnings and restrictions for an event occurrence based on the logged in person (and dependents if applicable).

Show curl example

Attributes

person_idintegerThe id of the person.
can_enrollbooleanTrue or false based on whether restrictions exist or not.
warningsarray

Array of warnings that may require further consideration when enrolling a person in an event occurrence

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in an event occurrence

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
cancelledThe event has been cancelled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
client_purchase_disabledUnable to enroll in this event
clients_not_allowedYou must be a member to enroll in this event
deletedThe event has been deleted
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
descriptionstring

Localized text describing the enrollment restriction code

GET /api/v2/front/services/:service_id/enrollment_eligibilities

Returns a list of enrollment warnings and restrictions for a service based on the logged in person (and dependents if applicable).

Parameters

event_idintegerThe id of an event. Optional. Used in check for full and already_enrolled restrictions on a course service. Used in check for plan_required, time restrictions, and credit_card_required. Yields errors if invalid.
location_idintegerThe id of the location. Optional. If the same service is available at more than one location, including the location will help differentiate between the services. Used in check for plan_required. Yields errors if invalid.
staff_member_idscomma delimited stringThe staff member identifier(s) to filter on. Optional. Used in check for plan_required. Yields errors if staff member does not exist.
start_attimestampA date and time when the service starts. Optional. Used in check for plan_required and time restrictions: inside_blackout_window and in_the_past. Yields errors if timestamp is invalid.

Show curl example

Attributes

person_idintegerThe id of the person.
can_enrollbooleanTrue or false based on whether restrictions exist or not.
warningsarray

Array of warnings that may require further consideration when enrolling a person in a service

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in a service

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
client_purchase_disabledUnable to enroll in this event
clients_not_allowedYou must be a member to enroll in this event
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
descriptionstring

Localized text describing the enrollment restriction code

Desk

GET /api/v2/desk/event_occurrences/:event_occurrence_id/enrollment_eligibilities

Returns a list of enrollment warnings and restrictions for an event occurrence based on person ids. Does not include dependents.

Parameters

person_idscomma delimited stringPerson id(s) to filter on. Required.

Show curl example

Attributes

person_idintegerThe id of the person.
can_enrollbooleanTrue or false based on whether restrictions exist or not.
warningsarray

Array of warnings that may require further consideration when enrolling a person in an event occurrence

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in an event occurrence

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
cancelledThe event has been cancelled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
clients_not_allowedYou must be a member to enroll in this event
deletedThe event has been deleted
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
descriptionstring

Localized text describing the enrollment restriction code

GET /api/v2/desk/services/:service_id/enrollment_eligibilities

Returns a list of enrollment warnings and restrictions for a service based on supplied parameters. Does not return dependents.

Parameters

event_idintegerThe id of an event. Optional. Used in check for full and already_enrolled restrictions on a course service. Used in check for plan_required, time restrictions, and credit_card_required. Yields errors if invalid.
location_idintegerThe id of the location. Optional. If the same service is available at more than one location, including the location will help differentiate between the services. Used in check for plan_required. Yields errors if invalid.
person_idscomma delimited stringPerson id(s) to filter on. Required. Does not yield errors if person does not exist.
staff_member_idscomma delimited stringThe staff member identifier(s) to filter on. Optional. Used in check for plan_required. Yields errors if staff member does not exist.
start_attimestampA date and time when the service starts. Optional. Used in check for plan_required and time restrictions: inside_blackout_window and in_the_past. Yields errors if timestamp is invalid.

Show curl example

Attributes

person_idintegerThe id of the person.
can_enrollbooleanTrue or false based on whether restrictions exist or not.
warningsarray

Array of warnings that may require further consideration when enrolling a person in a service

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in a service

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
clients_not_allowedYou must be a member to enroll in this event
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
descriptionstring

Localized text describing the enrollment restriction code

Event

Describes the schedules for a Service.

Front

No authentication required.

GET /api/v2/desk/events

This returns a list of publicly viewable Events. The parameters from and to can be used to specify a time range, with a maximum of 120 days. Leaving from/to blank will get all events. If the person calling the API (or one of their dependents) is attending an event, they'll show up in the attendees.

Parameters

fromtimestampStart of time range filter.
totimestampEnd of time range filter. If from is given, this can be no more than 120 days later.
idscomma delimited stringThe event identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.

Show curl example

GET /api/v2/front/events/:id

Returns the details of an individual Event.

Show curl example

Desk

GET /api/v2/desk/events

This returns a list of Events viewable by staff members. The parameters from and to can be used to specify a time range, with a maximum of 120 days. Leaving from/to blank will get all events. All attendees for an event will be included.

Parameters

fromtimestampStart of time range filter.
totimestampEnd of time range filter. If from is given, this can be no more than 120 days later.
idscomma delimited stringThe event identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.

Show curl example

GET /api/v2/desk/events/:id

Returns the details of an individual Event.

Show curl example

Event Occurrence

A scheduled instance of a Service. For example, the phrase "Group Workout from 9am-10am on 2014/09/01" could be used to describe an Event Occurrence.

Front

No authentication required.

GET /api/v2/front/event_occurrences

This returns a list of publicly viewable GroupClasses and Courses for a time range (defaulting to today). The parameters to and from can be used to specify a time range. If you are interested in building out a publicly viewable schedule of a business, this is the endpoint you need.

Parameters

fromtimestampStart of time range filter. Defaults to beginning of day, today.
totimestampEnd of time range filter. Defaults to end of day, today.
idscomma delimited stringEvent occurrence id(s) to filter on. Does not yield errors if event occurrence does not exist.
statecomma delimited string

State of the event occurrence. Multiple values can be specified when separated by a comma. For example, state=active,canceled will return Event Occurrences that are active or canceled. Possible values: active, canceled, reserved, deleted. Defaults to active.

staff_member_idscomma delimited stringThe staff member identifier(s) to filter on. Yields errors if staff member does not exist.
service_idscomma delimited stringThe service identifier(s) to filter on. Yields errors if service does not exist.
event_idscomma delimited stringThe event identifier(s) to filter on. Yields errors if event does not exist.
location_idscomma delimited stringThe location identifier(s) to filter on. Yields errors if location does not exist.

Show curl example

GET /api/v2/front/event_occurrences/:id

Returns the details of an individual Event Occurrence.

Some differences from the desk version

  • Appointments are returned if the authenticated person is the enrollee.
  • People are not included with the Event Occurrences.
  • Visit data not included with the Event Occurrences.

Show curl example

GET /api/v2/front/event_occurrences/summary

Returns a count of event occurrences by day or by hour of each day

Parameters

fromtimestampStart of time range filter. Defaults to beginning of day, today.
totimestampEnd of time range filter. Defaults to end of day, today.
group_bystring

Grouping of the counts. Possible values: day, hour. Defaults to day.

location_idscomma delimited stringThe location identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.
service_typescomma delimited string

The service type(s) to filter on. Possible values: Course, GroupClass. Defaults to Course,GroupClass.

staff_member_idscomma delimited stringThe staff member identifier(s) to filter on.
statecomma delimited string

State of the event occurrence. Multiple values can be specified when separated by a comma. For example, state=active,canceled will return Event Occurrences that are active or canceled. Possible values: active, canceled, reserved, deleted. Defaults to active.

Show curl example by day

Show curl example by hour

Desk

GET /api/v2/desk/event_occurrences

This returns a list of Event Occurrences for a time range (defaulting to today). The parameters to and from can be used to specify a time range.

Parameters

fromtimestampStart of time range filter. Defaults to beginning of day, today.
totimestampEnd of time range filter. Defaults to end of day, today.
idscomma delimited stringEvent occurrence id(s) to filter on. Does not yield errors if event occurrence does not exist.
statecomma delimited string

State of the event occurrence. Multiple values can be specified when separated by a comma. For example, state=active,canceled will return Event Occurrences that are active or canceled. Possible values: active, canceled, reserved, deleted. Defaults to active.

staff_member_idscomma delimited stringThe staff member identifier(s) to filter on. Yields errors if staff member does not exist.
service_idscomma delimited stringThe service identifier(s) to filter on. Yields errors if service does not exist.
event_idscomma delimited stringThe event identifier(s) to filter on. Yields errors if event does not exist.
location_idscomma delimited stringThe location identifier(s) to filter on. Yields errors if location does not exist.

Show curl example

GET /api/v2/desk/event_occurrences/:id

Returns the details of an individual Event Occurrence.

Show curl example

GET /api/v2/desk/event_occurrences/summary

Returns a count of event occurrences by day or by hour of each day

Parameters

fromtimestampStart of time range filter. Defaults to beginning of day, today.
totimestampEnd of time range filter. Defaults to end of day, today.
group_bystring

Grouping of the counts. Possible values: day, hour. Defaults to day.

location_idscomma delimited stringThe location identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.
service_typescomma delimited string

The service type(s) to filter on. Possible values: Appointment, Course, GroupClass. Defaults to Appointment,Course,GroupClass.

staff_member_idscomma delimited stringThe staff member identifier(s) to filter on.
statecomma delimited string

State of the event occurrence. Multiple values can be specified when separated by a comma. For example, state=active,canceled will return Event Occurrences that are active or canceled. Possible values: active, canceled, reserved, deleted. Defaults to active.

Show curl example by day

Show curl example by hour

Form of Payment

Represent a client's available forms of payment. You can view a client"s credit card or ACH account information. You can also store new credit card in the payment gateway.

Front

GET /api/v2/front/people/me/form_of_payments/:id
GET /api/v2/front/people/:person_id/form_of_payments/:id

Returns the details of a Form of Payment. But, only for the person logged in.

Show curl example

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

Lists all of the vaulted Forms of Payment for a person.

Show curl example

Attributes

See the attributes table below in the Desk section.

POST /api/v2/front/people/:person_id/form_of_payments

Begins the process of adding a Form of Payment to a client. See separate documentation below in the Creating Forms of Payment using the NMI Gateway section.

PUT /api/v2/front/people/:person_id/form_of_payments/:id

Updates and returns a form_of_payment for the person logged in. There can only be one default (autobill) form of payment for each person. To turn off autobill for a form of payment, you must turn it on for another form of payment.

Show curl example

Attributes

See the attributes table below in the Desk section

DELETE /api/v2/front/people/:person_id/form_of_payments/:id

Deletes a form_of_payment for the person logged in. Payment methods cannot be deleted if they are set as default, nor if they are the last remaining payment method on file.

Show curl example

Desk

GET /api/v2/desk/people/:person_id/form_of_payments/:id

Returns the details of a Form of Payment for anyone within the business.

Show curl example

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

Lists all of the Forms of Payment for a person.

Show curl example

Attributes

These apply to the Front and Desk versions of the API.

idintegerThe id of the form of payment.
typestringEither "creditcard" or "ach". Some fields below will change depending on type.
first_namestringThe first name on the account.
last_namestringThe last name on the account.
autobillbooleanWhether this form of payment is the default for autobills.
created_attimestampWhen this form of payment was created.
updated_attimestampWhen this form of payment last updated.
card_typestringCredit card only. One of: visa, mastercard, discover, american_express, unknown.
expire_monthnumberCredit card only. The expiration month, e.g. 12
expire_yearnumberCredit card only. The expiration year, e.g. 2019
last_fourstringCredit card only. The last 4 digits of the credit card.
account_namestringACH only. A friendly description, e.g. Mega Savings Bank
account_typestringACH only. One of: savings, checking
account_holder_typestringACH only. One of: personal, business
account_numberstringACH only. The obfuscated account number
routing_numberstringACH only. The obfuscated routing number
POST /api/v2/front/people/:person_id/form_of_payments

Begins the process of adding a Form of Payment to a client. See separate documentation below in the Creating Forms of Payment section.

PUT /api/v2/desk/people/:person_id/form_of_payments/:id

Updates and returns a Form of Payment for anyone in the business. There can only be one default (autobill) form of payment for each person. To turn off autobill for a form of payment, you must turn it on for another form of payment.

Show curl example

Attributes

These apply to the Front and Desk versions of the API.

idintegerThe id of the form of payment.
autobillbooleanTrue to make this form of payment the default form of payment.
DELETE /api/v2/desk/people/:person_id/form_of_payments/:id

Deletes a form_of_payment for the specified person. Payment methods cannot be deleted if they are set as default, nor if they are the last remaining payment method on file.

Show curl example

Creating Forms of Payment using the NMI Gateway (Credit Cards)

Currently, creating a form of payment is only supported using the NMI gateway. This uses a three step process that ensures the security of the consumer's credit card information. The credit card information is sent directly to the payment gateway and never enters Pike13's systems. When the process is complete Pike13 will be able to use the vaulted cards as payment methods on an invoice.

The process is three steps, the first and third steps involve Pike13, the middle step (step 2) involves the payment gateway.

Once you begin step one, you have 10 minutes to complete the vaulting before you need to start over again.

These instructions apply to Front or Desk. With Front only allowing you to create a Form of Payment for yourself and Desk allowing you to add a Form of Payment to anyone in that business.

Step One

POST /api/v2/desk/people/:person_id/form_of_payments

For step one, you'll send the type of Form of Payment that you want to vault. Currently only "creditcard" is supported. The response will contain a unique URL to our payment gateway where you will send the credit card information using the gateway's specified format.

Attributes

typestringRequired. The only option is: "creditcard"

Show curl example

Step Two

POST [form_url]

In step two, you will POST a form to the URL that was returned in step one as form_url The form contains the credit card information and the person's information. See the example below.

Instead of getting a response, you will be redirected to a Pike13 URL that will complete the vaulting. That is step three.

Attributes

billing-cc-numberstringRequired. Credit card number.
billing-cc-expstringRequired. Credit card expiration. Format: MMYY
billing-cvvstringCard security code. Check Configuration API to see if it's required.
billing-first-namestringRequired. Cardholder's first name.
billing-last-namestringRequired. Cardholder's last name.
billing-address1stringCardholder's billing address.
billing-address2stringCard billing address, line 2.
billing-citystringCard billing city
billing-statestringCard billing state/province. Format: CC
billing-postalstringCard billing postal code.
billing-countrystringCard billing country code. Format: CC/ISO 3166
billing-phonestringBilling phone number.
billing-emailstringBilling email address.

Show curl example

Step Three

GET [redirect_url]

In step 2, the POST will have returned as a redirect, with the location in the header being an API call to Pike13. That redirect will complete the process of vaulting the card. It informs Pike13 that the gateway has accepted the credit card and vaulted it.

Step 3 is to simply follow that redirect. A successful response will be an empty JSON object with an HTTP response code of 200.

If there was a problem vaulting the credit card, then the response code will be 4xx and the body will contain an error message.

Show curl example

Franchisees

Front

GET /api/v2/front/business/franchisees

Returns the basic details of franchisees for a business.

Show curl example

Desk

GET /api/v2/desk/business/franchisees

Returns the basic details of franchisees for a business.

Show curl example

Invoice

Represent an invoice, which consists of an order's details

Front

GET /api/v2/front/invoices/:id

Returns the details of the invoice. Only invoices owned by the authorized user making the request are available.

Show curl example

Attributes

idintegerThe id of the invoice.
invoice_numberstringA unique bill identifier for this business, a.k.a. bill number.
invoice_datestringThis invoice's due date.
total_centsintegerThe amount total in cents for this invoice.
totalstringThe amount total in localized currency for this invoice.
outstanding_amount_centsintegerThe amount outstanding in cents.
outstanding_amountstringThe amount outstanding in localized currency.
currencystringThe currency ISO code.
statestringThe current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.'
state_eventsarrayAn array of strings containing the valid state events when calling to update the invoice.
invoice_itemsobject

Information regarding the item the invoice is about

idintegerThe id of the item the invoice is for.
namestringThe name of the item the invoice is for.
descriptionstringThe full description of the item the invoice is for.
recipientsarray

Array of people who received this item.

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
adjustmentsarray

Array of adjustments to the invoice item, documenting changes in the item within this invoice.

idintegerThe id of the adjustment.
typestringPossible values include: 'Adjustment' for the price, 'CreditAdjustment' for credit, 'Discount' for discounts, 'PriceOverride' for overrides on the price, 'ProrateAdjustment' for proration, and 'TaxAdjustment' for taxes.
namestringThe name for the adjustment.
created_atstringThe date the adjustment was created.
amount_centsintegerEither the amount of the fixed price discount or the computed amount of the percent discount in cents.
amountstringEither the amount of the fixed price discount or the computed amount of the percent discount in localized currency.
percentintegerOptional. The percentage, if it is a percent adjustment. This can be negative for TaxAdjustments.
sourceobject

Optional. The source of the invoice item adjustment

idintegerThe id of the source.
typestringThe type of the source.
initial_punchcard_countintegerOptional. The number of punches the card starts with. Only for the type 'ProrateAdjustment'.
detailobject

Details regarding the item the invoice is for

idintegerThe id the of details for the item.
typestringThe object type of the item, i.e 'Membership', 'SignupFee'.
start_datestringOptional. The start date of the item.
count_descriptionstringOptional. How often the item is used.
extended_descriptionarrayOptional. The extended description of the item.
initial_punchcard_count_descriptionstringOptional. How many punches the card starts with.
has_termsbooleanOptional. True if the item has terms.
plan_product_idintegerOptional. The id for the product plan.
product_idintegerOptional. The id for the product.
retail_product_idintegerOptional. The id for the retail product.
serviceobject

Optional. The service the item falls under

idintegerThe id of the service
paymentsarray

The payments that have already been made on the invoice

idintegerThe id of the payment.
descriptionstringThe description of the payment.
statestringThe state of the payment.
amount_centsintegerThe amount in cents of the payment.
amountstringThe amount in localized currency of the payment.
maximum_refund_centsintegerThe maximum amount refundable in cents of the payment.
maximum_refundstringThe maximum amount refundable in localized currency of the payment.
created_atstringThe date the payment was created.
voided_atstringThe date the payment was voided.
error_messagestringOptional. The error message for the payment if it failed.
refundsobject

Optional. The refunds for the payments

idintegerThe id of the refund.
amount_centsintegerThe amount in cents of the refund.
amountstringThe amount in localized currency of the refund.
statestringThe state of the refund.
payment_idintThe id of the payment the refund is for.
descriptionstringThe description of the refund.
created_atstringThe date the refund was created.
voided_atstringThe date the refund was voided.
payerobject

Optional. The person who paid the payment

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
personobject

Optional. Information regarding the person who the invoice is for

idintegerThe id of the person attached to this invoice.
namestringThe name of the person attached to this invoice.
emailstringThe email of the person attached to this invoice.
couponobject

Optional. Information regarding a coupon for the invoice, if there is any

idintegerThe id of the promotion.
codestringThe code for the promotion.
namestringThe name of the promotion.
descriptionstringThe description of the promotion.
discount_percentintegerOptional. The discount percent of the promotion.
discount_amount_centsintegerOptional. The fixed amount discount of the promotion.

GET /api/v2/front/invoices/:invoice_id/payment_methods

Lists the available payment methods for an invoice. This includes the available forms of payment and any extraneous options, like account credit.

Show curl example

Attributes

See the attributes table below in the Desk section

PUT /api/v2/front/invoices/:invoice_id

Update the state or coupon_code of an invoice.

Show curl example

Parameters

state_eventstringThe next state to transition to. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold”
coupon_codestringThe code for the promotion.
POST /api/v2/front/invoices

Creates an invoice given a list of plan_products.

Show curl example

Parameters

See the parameters table below in the Desk section

POST /api/v2/front/invoices/:invoice_id/payments

Create a payment for an invoice.

Show curl example

Parameters

payment_methodstring

Required. The name of the payment method. It's either creditcard or credit.

amount_centsintegerRequired. The amount in cents to be paid on this invoice. If the payment_method is 'credit', the amount should be the total balance when possible.
form_of_payment_idintegerThe id of the vaulted form of payment being used on this invoice.
DELETE /api/v2/front/invoices/:invoice_id/payments/:payment_id

Delete a payment for an invoice that's still in the checkout state.

Show curl example

POST /api/v2/front/invoices/:invoice_id/invoice_items

Add an invoice item to an existing invoice.

Show curl example

Parameters

See the parameters table below in the Desk section

DELETE /api/v2/front/invoices/:invoice_id/invoice_items/:id

Remove an invoice item from an existing invoice. The invoice won't be destroyed even if it has no invoice item after removing. If you don't want to keep it, you can simply abandon it and it will be automatically cleaned up. Invoice items for signup fee cannot be removed on its own. You need to remove an invoice item that a signup fee is associated with.

Show curl example

Desk

GET /api/v2/desk/invoices/

Returns a list of invoices. Paginate using the page parameter.

Show curl example

Parameters

statecomma delimited stringThe state the invoice is in. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold”
person_idscomma delimited stringPerson id(s) to filter on.
created_sincetimestampFilter invoices created since the given timestamp.
updated_sincetimestampFilter invoices updated since the given timestamp.

Attributes

idintegerThe id of the invoice.
total_centsintegerThe total cost of the invoice in cents.
totalstringThe total cost of the invoice in localized currency.
state_eventsarrayAn array of strings showing state events.
send_receiptbooleanWas a receipt email sent?
receipt_emailstringThe email address the invoice was sent to, if any.
currencystringThe type of currency the invoice is charged in, i.e 'USD'.
person_idintegerThe person id the invoice is for.
statestringThe current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.'
GET /api/v2/desk/invoices/:id

Returns the details of a invoice.

Show curl example

Attributes

invoice_numberstringA unique bill identifer for this business, a.k.a. bill number.
invoice_datestringThis invoice's due date.
total_centsintegerThe total cost of the invoice in cents.
totalstringThe total cost of the invoice in localized currency.
outstanding_amount_centsintegerThe remaining cost of the invoice in cents.
outstanding_amountstringThe remaining cost of the invoice in localized currency.
discount_total_centsintegerThe sum of all discounts in cents.
discount_totalstringThe sum of all discounts in localized currency.
adjustment_total_centsintegerThe sum of all adjustments in cents.
adjustment_totalstringThe sum of all adjustments in localized currency.
included_tax_total_centsintegerThe sum of all included taxes in cents.
included_tax_totalstringThe sum of all included taxes in localized currency.
additional_tax_total_centsintegerThe sum of all additional taxes in cents.
additional_tax_totalstringThe sum of all additional taxes in localized currency.
state_eventsarrayAn array of strings containing the valid state events when calling to update the invoice.
send_receiptbooleanWas a receipt email sent?
receipt_emailstringThe email address the invoice was sent to, if any.
idintegerThe id of the invoice.
currencystringThe type of currency the invoice is charged in, i.e 'USD'.
statestringThe current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.'
has_tipbooleanDoes this invoice include a tip?
has_commission_paybooleanDoes this invoice include commission pay?
can_adjust_tipbooleanIs the tip adjustable?
invoice_itemsobject

Information regarding the item the invoice is about

idintegerThe id of the item the invoice is for.
namestringThe name of the item the invoice is for.
descriptionstringThe full description of the item the invoice is for.
recipientsarray

Array of people who received this item.

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
adjustmentsarray

Array of adjustments to the invoice item, documenting changes in the item within this invoice.

idintegerThe id of the adjustment.
typestringPossible values include: 'Adjustment' for the price, 'CreditAdjustment' for credit, 'Discount' for discounts, 'PriceOverride' for overrides on the price, 'ProrateAdjustment' for proration, and 'TaxAdjustment' for taxes.
namestringThe name for the adjustment.
created_atstringThe date the adjustment was created.
amount_centsintegerEither the amount of the fixed price discount or the computed amount of the percent discount in cents.
amountstringEither the amount of the fixed price discount or the computed amount of the percent discount in localized currency.
percentintegerOptional. The percentage, if it is a percent adjustment. This can be negative for TaxAdjustments.
sourceobject

Optional. The source of the invoice item adjustment

idintegerThe id of the source.
typestringThe type of the source.
initial_punchcard_countintegerOptional. The number of punches the card starts with. Only for the type 'ProrateAdjustment'.
detailobject

Details regarding the item the invoice is for

idintegerThe id the of details for the item.
typestringThe object type of the item, i.e 'Membership', 'SignupFee'.
start_datestringOptional. The start date of the item.
count_descriptionstringOptional. How often the item is used.
extended_descriptionarrayOptional. The extended description of the item.
initial_punchcard_count_descriptionstringOptional. How many punches the card starts with.
has_termsbooleanOptional. True if the item has terms.
plan_product_idintegerOptional. The id for the product plan.
product_idintegerOptional. The id for the product.
retail_product_idintegerOptional. The id for the retail product.
serviceobject

Optional. The service the item falls under

idintegerThe id of the service
commissionablebooleanIs this invoice item commissionable?
compablebooleanIs this invoice item compable?
paymentsarray

The payments that have already been made on the invoice

idintegerThe id of the payment.
descriptionstringThe description of the payment.
statestringThe state of the payment.
amount_centsintegerThe amount in cents of the payment.
amountstringThe amount in localized currency of the payment.
maximum_refund_centsintegerThe maximum amount refundable in cents of the payment.
maximum_refundintegerThe maximum amount refundable in localized currency of the payment.
created_atstringThe date the payment was created.
voided_atstringThe date the payment was voided.
error_messagestringOptional. The error message for the payment if it failed.
refundsobject

Optional. The refunds for the payments

idintegerThe id of the refund.
amount_centsintegerThe amount in cents of the refund.
amountintegerThe amount in localized currency of the refund.
statestringThe state of the refund.
payment_idintThe id of the payment the refund is for.
descriptionstringThe description of the refund.
created_atstringThe date the refund was created.
voided_atstringThe date the refund was voided.
payerobject

Optional. The person who paid the payment

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
is_voidablebooleanCan the invoice be voided?
locationobject

Optional. Location information for this invoice

idintegerThe id for this location.
nameintegerThe name of this location.
slugintegerThe slug (unique string) for this location.
created_byobject

Optional. The person who created this invoice

idintegerThe id of the person who created this invoice.
namestringThe full name of the person who created this invoice.
emailstringThe email address of the person who created this invoice.
personobject

Optional. Information regarding the person who the invoice is for

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
commission_recipientobject

Optional. Information regarding the commission recipient for this invoice, if any

idintegerThe id of the commission recipient for this invoice.
namestringThe full name of the commission recipient for this invoice.
emailstringThe email address of the commission recipient for this invoice.
tip_recipientobject

Optional. Information regarding the tip recipient for this invoice, if any

idintegerThe id of the tip recipient for this invoice.
namestringThe full name of the tip recipient for this invoice.
emailstringThe email address of the tip recipient for this invoice.
couponobject

Optional. Information regarding a coupon or promotion for the invoice, if there is any

idintegerThe id of the promotion.
codestringThe code for the promotion.
namestringThe name of the promotion.
descriptionstringThe description of the promotion.
discount_percentintegerOptional. The discount percent of the promotion.
discount_amount_centsintegerOptional. The fixed amount discount of the promotion in cents.
discount_amountintegerOptional. The fixed amount discount of the promotion in localized currency.
PUT /api/v2/desk/invoices/:invoice_id

Update the state or coupon_code of an invoice, or connect it to a booking. In the curl example below, the invoice is being closed. If there is a booking associated with the invoice, closing the invoice will automatically complete the booking and its leases.

Show curl example

Parameters

location_idintegerOptional. Associate the invoice with a location.
commission_recipient_idintegerOptional. Staff member who will recieve any commission.
tip_recipient_idintegerOptional. Staff member who will recieve any tip.
send_receiptbooleanOptional. Send an email receipt to the purchaser?
receipt_emailstringOptional. The email to send the receipt to.
state_eventstringOptional. The next state to transition to. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold”
coupon_codestringOptional. A code for a promotion.
POST /api/v2/desk/invoices

Creates an invoice given a list of plan products.

Show curl example

Parameters

These apply to the Front and Desk version of the API. A plan_products array with one or more objects is required in the parameters. These objects can be plan, membership, prepaid, or pack products.

booking_idintegerOptional. Tie this invoice to a booking. When the invoice is closed, the booking will be completed.
payer_idintegerRequired. The id of the person paying for the invoice (e.g. the parent of a dependent).
plan_productsarray

Array of plan_products for the invoice.

idintegerThe id of the products that have plan products.
recipient_idsarrayArray of the Person ids for the people who will receive the plan.
staff_member_idintegerThe id of the Staff Member the plan will be tied to. Required only for plans with staff-specific pricing.
event_idintegerThe event id of the course that this plan product will be used for. This is required for courses. Do not send event_id for classes or appointments.
start_datestringOptional. The start date of the plans for the products.
GET /api/v2/desk/invoices/:invoice_id/payment_methods

Lists the available payment methods for an invoice. This includes the available forms of payment and any extraneous options, like account credit.

Show curl example

Attributes

These apply to the Front and Desk version of the API.

payment_methodsarray

Array of payment_methods for the invoice.

payment_type_idintegerThe type id of the available payment method.
keystring

The key of the available payment method. It's either ach, cash, check, credit, creditcard, external_number, paypal. You give this as a param: payment_method for POST /api/v2/desk/invoices/:invoice_id/payments.

descriptionstringThe description of the available payment method. e.g. Cash, Check
form_of_payment_idintegerThe id of this form of payment.
autobillbooleanWhether or not this form of payment is on autobillable.
payerobject

Optional. Information regarding the person attached to this form of payment

idintegerThe id of the person who the invoice is for.
namestringThe full name of the person who the invoice is for.
emailstringThe email address of the person who the invoice is for.
detailsobjectAdditional details in key-value pairs.
POST /api/v2/desk/invoices/:invoice_id/payments

Create a payment for an invoice.

Show curl example

Parameters

payment_methodstring

Required. The name of the payment method. The current options are ach, cash, check, credit, creditcard, external_number, paypal. This is an attribute: key from GET /api/v2/desk/invoices/:invoice_id/payment_methods.

amount_centsintegerRequired. The amount in cents to be paid on this invoice.
form_of_payment_idintegerThe id of the vaulted form of payment being used on this invoice.
POST /api/v2/desk/invoices/:invoice_id/payments/:payment_id/refunds

Refunds a payment.

Show curl example

Parameters

refundobject

Object of refund for the payment.

amount_centsintegerRequired. The fixed amount to be refunded. Negative numbers and Zero are not allowed.
payment_type_idintegerOptional. Allowed payment types are cash, account credit, and the original payment type. If not specified, it defaults to the original payment type.
invoice_item_ids_to_cancelarrayOptional. An array of invoice item ids that you want to cancel the associated plans. If not specified, no plans will be cancelled
send_receiptbooleanOptional. If not specified, it will not send a receipt.
receipt_emailstringRequired if send_receipt is true. Email address of recipient.

POST /api/v2/desk/payments/:payment_id/voids

Void a payment.

Show curl example

Parameters

voidobject

Object of void.

invoice_item_ids_to_cancelarrayOptional. Pass an array of invoice item ids that you want to cancel. If not specified, it does not cancel any plans.

POST /api/v2/desk/refunds/:refund_id/voids

Void a refund.

Show curl example

POST /api/v2/desk/invoices/:invoice_id/invoice_items

Add a plan_product to an existing invoice.

Show curl example

Parameters

plan_productobject

Object of plan_product for the invoice item.

idintegerThe id of the plan product.
recipient_idsarrayArray of the Person ids for the people who will receive the plan.
staff_member_idintegerThe id of the Staff Member the plan will be tied to. Required only for plans with staff-specific pricing.
event_idintegerThe event id of the course that this plan product will be used for. This is required for courses. Do not send event_id for classes or appointments.
start_datestringOptional. The start date of the plan for the product.

DELETE /api/v2/desk/invoices/:invoice_id/invoice_items/:id

Remove an invoice item from an existing invoice. The invoice won't be destroyed even if it has no invoice item after removing. If you don't want to keep it, you can simply abandon it and it will be automatically cleaned up. Invoice items for signup fee cannot be removed on its own. You need to remove an invoice item that a signup fee is associated with.

Show curl example

POST /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/prorates

Prorate the first invoice and the first punchcard count. If the request is invalid, no proration is created. If a proration already exists, it updates it.

Show curl example

Parameters

prorateobject

Object of prorate for the invoice item.

amount_centsintegerOptional. Used to prorate the price of a membership on the first invoice. The amount will be deducted from the invoice. Negative number is not allowed.
initial_punchcard_countintegerOptional. Used to prorate the number of visits issued on the first punchcard. Only allowed for limited memberships. Negative number is not allowed.

DELETE /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/prorates

Remove proration from memberships for both amount cents and initial punchcard count. The initial punchcard count will be set to the default count.

Show curl example

GET /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/discounts

Returns the discount for the invoice item. If none exists, it returns 404.

Show curl example

POST /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/discounts

Creates the discount on the invoice item. If one already exists, it replaces the existing one.

Show curl example

Parameters

discountobject

Object of discount for the invoice item.

amount_centsintegerOptional. Used for a fixed amount. The amount will be deducted from the invoice. Negative number is not allowed.
percentintegerOptional. Used for a percent amount. The amount will be deducted from the invoice. Negative number is not allowed.

DELETE /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/discounts

Removes the discount from the invoice item.

Show curl example

Location

A physical location of the business and associated data.

Front

GET /api/v2/front/locations

Show curl example

Lists all locations for the business.

GET /api/v2/front/locations/:id

Returns the details of a location.

Show curl example

Desk

GET /api/v2/desk/locations

Lists all locations for the business.

Show curl example

GET /api/v2/desk/locations/:id

Returns the details of a location.

Show curl example

Notes

Front

Person

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

Show curl example

Lists notes for a person. Paginate using page parameter. Notes are returned in reverse chronological order (newest first).

GET /api/v2/front/people/:person_id/notes/:id

Returns the details for a note.

Show curl example

Event Occurrences

GET /api/v2/front/event_occurrences/:event_occurrence_id/notes

Lists notes for an event occurrence. Paginate using page parameter. Notes are returned in reverse chronological order (newest first).

Show curl example

GET /api/v2/front/event_occurrences/:event_occurrence_id/notes/:id

Returns the details for a note.

Show curl example

Desk

GET /api/v2/desk/event_occurrences/:event_occurrence_id/notes
GET /api/v2/desk/people/:person_id/notes

Show curl example

Lists notes for an event occurrence or person. Paginate using page parameter. Notes are returned in reverse chronological order (newest first).

GET /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
GET /api/v2/desk/people/:person_id/notes/:id

Returns the details for a note.

Show curl example

POST /api/v2/desk/event_occurrences/:event_occurrence_id/notes
POST /api/v2/desk/people/:person_id/notes

Creates a note on an event occurrence or person.

Show curl example

Attributes

notestringThe body of the note. Required.
publicbooleanSpecifies if the note is viewable by the client. Defaults to false.
pinnedbooleanSpecifies if the note should be starred. Starred notes show up in class rosters and the top of client profiles. Defaults to false.
send_notificationsbooleanSend notifications when the note is created? Defaults to false.
PUT /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
PUT /api/v2/desk/people/:person_id/notes/:id

Updates a note on an event occurrence or person.

Show curl example

Attributes

notestringThe body of the note. Required.
publicbooleanSpecifies if the note is viewable by the client.
pinnedbooleanSpecifies if the note should be starred. Starred notes show up in class rosters and the top of client profiles.
DELETE /api/v2/desk/event_occurrences/:event_occurrence_id/notes/:id
DELETE /api/v2/desk/people/:person_id/notes/:id

Deletes a note. The acting access token must be tied to a Person that is either a manager, an owner, or the author of the note.

Show curl example

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

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

Creates a pack.

Show curl example

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.

Show curl example

Pack product (Passes)

A pack product is a type of non-recurring plan that grants people a fixed number of visits. A pack product is used to create a pack. This endpoint requires owner or manager permission levels.

Desk Only

GET /api/v2/desk/pack_products

Lists all pack products for the business. Paginate using the page parameter.

Show curl example

GET /api/v2/desk/pack_products/:id

Returns the details of a pack product.

Show curl example

POST /api/v2/desk/pack_products

Creates a pack product.

Show curl example

Attributes

productobject

The product from which the pack inherits some properties.

namestringRequired. How many times this pack product can be used.
price_centsintegerRequired. The cost of the pack product in cents.
visibilitystring

Required. Determines who can see and purchase this pack product. Possible values:

  • Everyone Visible to anyone
  • Members Visible to members and staff
  • Staff Visible to staff
  • New clients Complementary pack given to new clients
descriptionstringBrief description of the pack product.
description_longstringMore verbose description that shows up on more detailed pages.
suspendedbooleanWhen suspended, it cannot be sold. Defaults to false.
countintegerRequired. The number of uses this pack product has.
commitment_lengthintegerRequired. Combined with commitment_unit, this determines how long the pack product is valid. e.g. 12 months.
commitment_unitstringRequired. Combined with commitment_length, this determines how long the pack_product is valid. e.g. 12 months. Possible values: day, week, month.
location_idintegerIf specified, restricts the location where this pack product can be used. Optional.
consider_memberbooleanIs the client considered a member of the business when purchasing this pack product? Optional. Defaults to false.
termsstringTerms and conditions associated with purchasing this pack product. Optional.
terms_acceptance_requiredbooleanIs the client required to accept the terms and conditions? If true, they will be sent an email asking them to accept the terms. Optional. Defaults to false.
terms_acceptance_typestringIf terms acceptance is required, this dictates how the terms are presented and acknowledged. Possible values: checkbox, document. Optional. Default is checkbox.
terms_acceptance_at_checkoutbooleanIs the client required to accept the terms and conditions before they can complete the purchase of a pack. Optional. Defaults to false.
send_expiration_notificationsbooleanSend notifcations to the client when the pack is about to expire. Optional. Defaults to true.
service_idsarrayArray of services ids that clients can use with this pack. This does not apply to staff, they can use the pack with any service. When set to an empty array, [], will remove all services. When set to null or not included in the request, will not alter the existing services. Will ignore service ids that are invalid. Optional. Defaults to [].
PUT /api/v2/desk/pack_products/:id

Updates a pack product.

Show curl example

DELETE /api/v2/desk/pack_products/:id

Destroys a pack product.

Show curl example

Payment Configuration

The payment configuration represents the business's available forms of payment.

Front

GET /api/v2/front/payments/configuration

Returns the available forms of payment for the business.

Show curl example

Attributes

See the attributes table below in the Desk section

Desk

GET /api/v2/desk/payments/configuration

Returns the available forms of payment for the business.

Show curl example

Attributes

These apply to the Front and Desk versions of the API.

payment_configurationobject

Payment configurations for this business.

accepted_typesarray

Array of the types of payment that the business accepts. In the case of external payment methods, their external name will be displayed. Possible values: ["creditcard", "check", "cash", "ach"].

creditcardobject

Additional configuration settings related specifically to credit cards.

accepted_card_typesArray of types of credit cards that this business accepts.
required_fieldsAll potential field requirements for credit cards, with booleans denoting whether or not they are required by this business.

Person

Represents a client or staff member of the business.

Front

GET /api/v2/front/people/:id
GET /api/v2/front/people/me

Returns the details of a Person. The string "me" can be used in place of the id parameter to simply fetch the profile associated with the current access token. API clients are allowed access to the Person tied to the current access token and any dependents of that Person.

Parameters

with_dependentsbooleanReturn dependent information

Show curl example

Desk

GET /api/v2/desk/people

Lists all clients for the business. Returns 25 clients at a time. Paginate using the page parameter.

Parameters

created_sincetimestampFilter to people created since the given timestamp.
updated_sincetimestampFilter to people updated since the given timestamp.
is_memberbooleanFilter to people with a current membership
include_relationshipsbooleanInclude providers and dependents for each person.
include_balancesbooleanInclude balances for each person.
sortstringSort results by the given attributes and directions. Attributes can be updated_at, created_at, or id. The order will be ascending unless prefixed by a minus sign (-). When no sort is given, defaults to id. Examples: "-updated_at" or "id,-created_at".

Show curl example

GET /api/v2/desk/people/:id
GET /api/v2/desk/people/me

Returns the details of a client as viewed by a staff member.

Show curl example

GET /api/v2/desk/people/search?q=:query

Search for clients. Email searches can match the name portion of the email (before the @) on name fields. To match only full email addresses specify the fields parameter. Phone number searches match only on complete phone number. If the fields param is not included all fields are searched.

qstringSearch query. Required. When you search by phone number, only digits are allowed. See the below example.
fieldscomma delimited stringFields to be searched. Can be any of the following: name, email, phone, barcodes.

Show curl example

POST /api/v2/desk/people

Create a Person. If dependent information is included, will also create the dependents. Dependents have the same attributes available.

Attributes

pronounstringClient's preferred pronouns.
first_namestringRequired. Client's first name.
middle_namestringClient's middle name.
last_namestringRequired. Client's last name.
emailstringClient's email address. Email address formatting is enforced.
addressstringClient's physical address.
phonestringClient's phone number.
birthdatedateClient's date of birth.
guardian_namestringFull name of client's guardian.
guardian_emailstringEmail address of client's guardian.
location_idintegerLocation ID for client's home location.
joined_attimestampTimestamp for when the client joined the business. Default to current time.
send_invitebooleanSend the client a welcome email from Pike13
skip_complimentary_passesbooleanDo not issue any complimentary passes to the client.
custom_fieldscollection

Collection of custom field IDs and values.

idintegerCustom field ID
valuestringValue of the custom field
dependentscollection

Collection of dependents. All of the same fields for a person are available for a dependent.

pronounstringDependent's preferred pronouns.
first_namestringRequired. Dependent's first name.
middle_namestringDependent's middle name.
last_namestringRequired. Dependent's last name.
emailstringDependent's email address. Email address formatting is enforced.
etcetcAll other person fields.

Show curl example

PUT /api/v2/desk/people/:id

Updates a Person. Dependents can be added to the Person using the dependent_ids attribute. When adding new dependents, all existing dependents must also be passed in to dependent_ids; otherwise, they will be removed from the Person's dependents. If the request body does not include the dependent_ids attribute, the dependents will remain unchanged. Conversely, you can set the provider (only one) on a person by passing the provider id in the provider_ids field.

Show curl example

DELETE /api/v2/desk/people/:id

Deletes a Person. In certain circumstances deleting a Person is not valid. In such cases, the server will return a 422 response and corresponding error messages. Such cases include but are not limited to:

  • Clients that have open invoices
  • Clients that have future visits
  • Clients that have active plans

Show curl example

Plans

Available plans for a business.

Desk

GET /api/v2/desk/plans

Lists all plans for a business. Paginate using the page parameter.

Parameters

include_holdsbooleanInclude active and upcoming holds on each plan.

Show curl example

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

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

Waivers for People

Adult and Guardian waivers for a person.

Front

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

Lists waivers for a person

Attributes

idintegerThe identifier for the waiver.
namestringThe name of the waiver, e.g., 'Adult Waiver'.
typestringThe type of the waiver. Possible values: Waiver, GuardianWaiver.
signer_idintegerThe identifier of the person who signed the waiver.
signing_urlstringThe URL for signing the waiver.
acceptedbooleanIndicates whether the waiver has been accepted or not.

Show curl example

Desk

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

Lists waivers for a person.

Attributes

idintegerThe identifier for the waiver.
namestringThe name of the waiver, e.g., 'Adult Waiver'.
typestringThe type of the waiver. Possible values: Waiver, GuardianWaiver.
signer_idintegerThe identifier of the person who signed the waiver.
signing_urlstringThe URL for signing the waiver.
acceptedbooleanIndicates whether the waiver has been accepted or not.

Show curl example

Plan product

Front

GET /api/v2/front/plan_products

Lists all plan products for the business that are visible to the user. Paginate using the page parameter.

Parameters

location_idscomma delimited stringThe location identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.

Show curl example

GET /api/v2/front/plan_products/:id

Returns the details of a plan product.

Show curl example

Desk

GET /api/v2/desk/plan_products

Lists all plan products for the business. Paginate using the page parameter.

Parameters

location_idscomma delimited stringThe location identifier(s) to filter on.
service_idscomma delimited stringThe service identifier(s) to filter on.

Show curl example

GET /api/v2/desk/plan_products/:id

Returns the details of a plan product.

Show curl example

Plan Terms

Fetches the terms and conditions for a Plan.

If the Plan uses checkbox terms, then you can just show the user the contents of the terms field. Prompt them to agree to the terms. If they do, use the complete endpoint to confirm that they've accepted them.

If the Plan uses document terms (i.e. a document from a document provider), and the terms have not yet been accepted, the response will include a URL to that document provider. That URL must be presented to the user in a web browser where the user can accept the terms on the document provider's site. Once they have accepted or declined the terms through the document provider, their browser will be redirected to the plan terms complete API. The result of the redirect will be a 200 response if the signing was successful, or a 4XX response if the signing unsuccessful.

Front

GET /api/v2/front/plans/:plan_id/plan_terms
GET /api/v2/front/plans/:plan_id/plan_terms/:plan_terms_id

Fetches the terms for the Plan. There will only be one Plan Terms for a Plan.

Terms may only be fetched for the person that is paying for the invoice.

If the type of the terms is document and the signing_url is empty, then something went wrong while trying to contact the document provider. Notify the user that document signing is currently not available or try again.

Show curl example

GET /api/v2/front/plans/:plan_id/plan_terms/:plan_terms_id/complete

Mark the Plan Terms as having been accepted by the user.

If the type of the terms is checkbox, you will need to call this API to accept the terms.

If the type of the terms is document, you will not need to call this API. After the user signs the document on the document provider's website, the document provider will redirect the user's browser to this URL. The result of the redirect will be a 200 if they signed the terms through the document provider. It will be a 422 if they declined to sign the terms.

Show curl example

Punches

A punch pays for a visit with a plan.

Desk Only

GET /api/v2/desk/punches/:id

Returns the details of a punch.

Show curl example

POST /api/v2/desk/punches

Creates a punch.

Show curl example

Attributes

visit_idintegerThe id of the visit. Required.
plan_idintegerThe id of the plan. Optional. If omitted, we will attempt to automatically find a suitable plan.
DELETE /api/v2/desk/punches/:id

Destroys a punch. The associated visit will be become unpaid.

Show curl example

Revenue Category

Revenue categories are for tracking monies collected by a business. These categories are never deleted but the names are available for editing so they could change over time.

Desk Only

GET /api/v2/desk/revenue_categories

Show curl example

Lists the revenue categories.

GET /api/v2/desk/revenue_categories/:id

Returns the details of a revenue category.

Show curl example

Sales Tax

Sales Taxes that can be added to an invoice.

Desk Only

GET /api/v2/desk/sales_taxes

Available Sales Tax adjustments.

Show curl example

List of Sales Taxes.

GET /api/v2/desk/sales_taxes/:id

Returns the details of a Sales Tax.

Show curl example

Service

Represents the service provided by a business. The three service types—Appointment, GroupClass, and Course—differ in several ways: above all, how they're scheduled and how they're paid for.

Front

GET /api/v2/front/services

Lists all services for the business viewable by the person specified by the current access token.

Note  The set of viewable services depends on the the person viewing. Please take care not to violate this restriction when caching responses.

Show curl example

GET /api/v2/front/services/:id

Returns the details of a service.

Show curl example

Desk

GET /api/v2/desk/services

Lists all services for the business.

Parameters

include_hiddenbooleanIncludes hidden services.

Show curl example

GET /api/v2/desk/services/:id

Returns the details of a service.

Show curl example

Staff Member

A type of person that has additional properties.

Front

No authentication required.

GET /api/v2/front/staff_members

Show curl example

Lists all staff members viewable to clients. Does not return staff members that are hidden from clients. Staff member search is not supported yet.

GET /api/v2/front/staff_members/:id

Returns the details of a staff member. Returns HTTP status 404 if staff member is hidden from clients.

Show curl example

Desk

GET /api/v2/desk/staff_members

Lists all current staff members.

Show curl example

GET /api/v2/desk/staff_members/:id
GET /api/v2/desk/staff_members/me

Returns the details of a staff member. The string "me" can be used in place of the id parameter to simply fetch the profile associated with the current access token.

Show curl example

Visits

Ties a Person to an Event Occurrence.

Front

GET /api/v2/front/visits/:id

Returns the details of a visit.

Show curl example

Attributes

person_idintegerThe id of the person.
statestringStatus of the visits. Can be one of the following: "reserved", "registered", "completed", "noshowed", "late_canceled".
event_occurrence_idintegerThe id of the event occurrence.
registered_attimestampWhen registration was completed for this visit. Typically, this is when the visit was created.
completed_attimestampWhen the visit was marked as complete by a staff member.
noshow_attimestampWhen the staff member marked this visit as a no-show.
cancelled_attimestampWhen the visit was marked as a late cancel.
created_attimestampWhen the visit was created.
paidbooleanTrue if this visit has been paid for.
paid_for_bystringDescription of the plan used to pay for the visit.
punch_idintegerThe id of the punch if present.
GET /api/v2/front/people/:person_id/visits

Lists visits for a person. They are sorted by event_occurrence.start_at in ascending order. Paginate using the page parameter. The parameters to and from can be used to specify an event occurrence time range.

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

POST /api/v2/front/visits

Creates a visit.

Show curl example

Attributes

person_idintegerThe id of the person. Defaults to the current person if a value is not specified.
event_occurrence_idintegerThe id of the event occurrence. Required.

When using this endpoint notify_client is set to true. Use the Desk Visit create endpoint if you need to set it to false.

DELETE /api/v2/front/visits/:id

Destroys a visit.

Show curl example

Desk

GET /api/v2/desk/visits/:id

Returns the details of a visit.

Show curl example

Attributes

person_idintegerThe id of the person.
statestringStatus of the visits. Can be one of the following: "reserved", "registered", "completed", "noshowed", "late_canceled".
event_occurrence_idintegerThe id of the event occurrence.
registered_attimestampWhen registration was completed for this visit. Typically, this is when the visit was created.
completed_attimestampWhen the visit was marked as complete by a staff member.
noshow_attimestampWhen the staff member marked this visit as a no-show.
cancelled_attimestampWhen the visit was marked as a late cancel.
created_attimestampWhen the visit was created.
paidbooleanTrue if this visit has been paid for.
paid_for_bystringDescription of the plan used to pay for the visit.
punch_idintegerThe id of the punch if present.
GET /api/v2/desk/people/:person_id/visits
GET /api/v2/desk/event_occurrences/:event_occurrence_id/visits

Lists visits for a person or event occurrence. For a person, they are sorted by event_occurrence.start_at in ascending order. Paginate using the page parameter. The parameters to and from can be used to specify an event occurrence time range on the person's visits endpoint.

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

GET /api/v2/desk/people/:person_id/visits/summary

Lists the first and last completed visit times for a person. Includes both overall first and last visits as well as per service.

Show curl example

POST /api/v2/desk/visits

Creates a visit.

Show curl example

Attributes

person_idintegerThe id of the person. Required for states other than "reserved".
event_occurrence_idintegerThe id of the event occurrence. Required.
statestring

Initial state of the visit. Defaults to "registered". Must be one of the following:

reservedRegistration is pending. A spot on the roster is held, but a person_id is not required. This state is typically only used to hold a spot while the client finishes registration.
registeredRegistration is complete. A person is required. This is the default state.
completedPerson has been marked as attended.
noshowedPerson did not show up.
late_canceledPerson canceled outside the cancellation window.
notify_clientbooleanShould the client be notified of this registration or when it is deleted? Write-only. Defaults to true.
restrictionsarray

Staff members can override visit restrictions configured on a service. If you would like certain conditions validated by the server, you can use the "restrictions" attribute. A 422 status with error messages will be returned if any of these restrictions fail.

Restrictions can be any or all of the following values.

inside_blackout_windowWill return an error if it's too close to the start time to register.
fullWill return an error if the event occurrence is full.
in_the_pastWill return an error if the event occurrence is in the past.
PUT /api/v2/desk/visits/:id

Updates a visit.

Show curl example

Attributes

person_idintegerThe id of the person. Can be set, but cannot changed.
state_eventstring

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

registerRegister a person for the visit. Transitions from "reserved" to "registered". Person is required.
completeMark registered person as attended. Transitions from "registered" to "completed".
noshowMark registered person as a no show. Transitions from "registered" to "noshowed".
late_cancelMark the registered person as a late cancel. Transitions from "registered" to "late_canceled".
resetResets from "completed", "noshowed" or "late_canceled" back to "registered".
DELETE /api/v2/desk/visits/:id

Destroys a visit. The notify_client flag, set when the visit was created, determines whether a notification is sent to the client.

Show curl example

GET /api/v2/desk/make_ups/reasons

Lists all Business make ups reasons.

Show curl example

POST /api/v2/desk/make_ups/generate

Creates a make up pass to a canceled enrollment.

Show curl example

Attributes

visit_idintegerThe event ID. Required
make_upobject

Make up attributes to build the visit - make up pass. Optional

make_up_reason_idintegerThe Make up reason ID. Required if makeup is sent
free_form_reasonstringIssue Make up pass free form reason. Optional

Waitlist Eligibility

Waitlist eligibility information for People for an Event Occurrence.

Front

GET /api/v2/front/event_occurrences/:event_occurrence_id/waitlist_eligibilities

Returns a collection of waitlist eligibility options for a person and their dependents.

Show curl example

Attributes

person_idintegerThe id of the person.
can_waitlistbooleanTrue if the person can be added to the waitlist
restrictionsarray

Array of restrictions preventing a person from being added to a waitlist

codestring

Waitlist restriction code

event_cancelledThe class is cancelled
event_deletedThe class is deleted
event_in_pastThe class occurs in the past
person_already_waitlistedThe person is already on the waitlist
person_already_enrolledThe person is already enrolled in the class
waitlist_fullThe waitlist is full
waitlist_disabledWaitlists are not enabled for this service
waitlist_unavailableWaitlists are not available for this type of service
descriptionstringLocalized text describing the waitlist restriction code

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

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

POST /api/v2/front/waitlist_entries

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

Show curl example

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

Desk

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

Returns the details of a waitlist_entry.

Show curl example

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

POST /api/v2/desk/waitlist_entries

Creates a waitlist entry for a person.

Show curl example

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

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