Pike13 For Developers
Get Started
Authentication
Core API
Reporting 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", "es-ES", "sv", "ru-RU", "fr", "pt-BR", "nl-NL", "lt-LT", "zh-CN"

REQUEST
    $ curl https://mybiz.pike13.com/api/v2/desk/people \
      -H "X-FD-Locale: es-ES" \
      -H "Authorization: Bearer XXXXXXXXXXXXXXX"

Rate limit

The API is rate-limited to 180 requests per minute per access token for authenticated APIs and 180 requests per minute per IP for un-authenticated APIs. No 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.

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 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.

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 month. 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.

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

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 month. 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.

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

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 or Appointment. For Group Classes, this can be a single occurrence, or a recurring enrollment. For Appointments this can be a single occurrence. 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 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 (Only supports 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.

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

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 exception of the person field on the Lease. 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

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.

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 exception of the person field. 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

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.

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 (and dependents) can enroll in an Event Occurrence.

Front

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

Returns a list of enrollment 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.
restrictionsarray

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

codestring

Code representation of the enrollment restriction

client_purchase_disabledUnable to enroll in this event
plan_requiredNo available visits
members_not_allowedThis event doesn't offer online enrolling
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
already_enrolledAlready enrolled
descriptionstring

Localized text describing the enrollment restriction code

Event

Describes one of the schedules for a Service.

Desk Only

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.

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.
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

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

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

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

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.

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.
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 match only on complete email addresses and are case insensitive. If the fields param is not included all fields are searched.

qstringSearch query. Required.
fieldscomma delimited stringFields to be searched. Can be any of the following: name, email, 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

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.

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.

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 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.

Show curl example

Desk

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

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

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

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.

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

Returns the details of a staff member.

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. 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. 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

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