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
https://pike13.com/api/v2/front/people/1.json
The URL for interacting with the API as a staff member includes
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
{"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"
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 Tue, 08 Oct 2024 03:50:00 +0000
Example
HTTP/1.1 429 Too Many Requests
Date: Tue, 08 Oct 2024 03:49:10 +0000
RateLimit-Limit: 180
RateLimit-Remaining: 0
RateLimit-Reset: 1728359400
Pagination
Some API endpoints are paginated. These endpoints will include an attribute for total_count as well as attributes for prev and next. For example, the following attributes might be included in a response from /api/v2/desk/people.
...
"total_count": 56,
"prev": "https://mybiz.pike13.com/api/v2/desk/people?page=1",
"next": "https://mybiz.pike13.com/api/v2/desk/people?page=3"
}
The attributes prev and next are only present when available. The number of results per page can be manipulated with the per_page parameter up to a limit of 100. The default is 20.
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.
Attributes
id | integer | The accounts identifier |
---|---|---|
string | The account holders email address | |
first_name | string | The account holders first name |
last_name | string | The account holders last name |
email_confirmed_at | timestamp | The 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.
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
string | An email address that you want to receive the email to reset password. |
---|
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.
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.
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
date | date | Date filter. Defaults to today. |
---|---|---|
staff_member_ids | comma delimited string | Filters availability by staff member id. |
location_ids | comma delimited string | Filters availability by location id. |
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
Parameters
from | date | Date filter. Defaults to today. |
---|---|---|
to | date | Date filter. Defaults to the last day of the current month. |
staff_member_ids | comma delimited string | Filters availability by staff member id. |
location_ids | comma delimited string | Filters availability by location id. |
Desk
GET /api/v2/desk/appointments/:service_id/available_slots
Lists all available times for the given appointment for the given date.
Parameters
date | date | Date filter. Defaults to today. |
---|---|---|
staff_member_ids | comma delimited string | Filters availability by staff member id. |
location_ids | comma delimited string | Filters availability by location id. |
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
Parameters
from | date | Date filter. Defaults to today. |
---|---|---|
to | date | Date filter. Defaults to the last day of the current month. |
staff_member_ids | comma delimited string | Filters availability by staff member id. |
location_ids | comma delimited string | Filters availability by location id. |
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
Front
GET /api/v2/front/bookings/:id
Returns the given Booking if it is owned by the person currently authenticated.
GET /api/v2/front/bookings/:booking_id/leases/:id
Returns the given Lease if it is owned by the person currently authenticated.
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.
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.
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.
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.
POST /api/v2/front/bookings
Creates a Booking with one or more Leases.
Parameters
idempotency_token | string | A unique string that you can send with the Booking to ensure that you don't send the same request twice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
expires_at | timestamp | A 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_booking | boolean | This will set each visit in the Booking from reserved state to the registered state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
leases | array | 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
Appointment
Recurring Event (Group Classes)
Course
|
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_id | integer | The id of an event occurrence. | |||
---|---|---|---|---|---|
person | object | An existing person to put on this Lease
|
Appointment Parameters
service_id | integer | The id of a service. | |||
---|---|---|---|---|---|
staff_member_id | integer | The 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_id | integer | The 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_at | timestamp | The time when the appointment starts | |||
person | object | An existing person to put on this Lease
|
Recurring Event Paramters
event_id | integer | The id of the recurring event. | |||
---|---|---|---|---|---|
start_at | timestamp | The time of the first event to attend. | |||
recurring | boolean | Whether or not to enroll in this event on an ongoing basis. | |||
person | object | An existing person to put on this Lease
|
Course Parameters
event_id | integer | The id of the course event. | |||
---|---|---|---|---|---|
start_at | timestamp | Optional. The date and time of the first event to attend. If empty will set to today. | |||
person | object | An existing person to put on this Lease
|
Desk
GET /api/v2/desk/bookings/:id
Returns the given Booking.
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.
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.
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
person | object | A new or existing person to put on this Lease:
|
---|
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
- 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)
leases | array | Array of Leases using one of the following collections of information:
|
---|
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
- 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)
person | object | An existing person to put on this Lease
| ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
allow_overbook | boolean | True to allow over-booking the event when creating a Lease. Default false. |
Business
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.
Custom Field
Custom fields that can be associated with people.
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).
Attributes
person_id | integer | The id of the person. | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
can_enroll | boolean | True or false based on whether restrictions exist or not. | ||||||||||||||||||||||||||||||
warnings | array | Array of warnings that may require further consideration when enrolling a person in an event occurrence
| ||||||||||||||||||||||||||||||
restrictions | array | Array of restrictions preventing a person from enrolling in an event occurrence
|
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_id | integer | The id of an event. Optional. Used in check for |
---|---|---|
location_id | integer | The 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 |
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. Optional. Used in check for |
start_at | timestamp | A date and time when the service starts. Optional. Used in check for |
Attributes
person_id | integer | The id of the person. | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
can_enroll | boolean | True or false based on whether restrictions exist or not. | ||||||||||||||||||||||||||
warnings | array | Array of warnings that may require further consideration when enrolling a person in a service
| ||||||||||||||||||||||||||
restrictions | array | Array of restrictions preventing a person from enrolling in a service
|
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_ids | comma delimited string | Person id(s) to filter on. Required. |
---|
Attributes
person_id | integer | The id of the person. | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
can_enroll | boolean | True or false based on whether restrictions exist or not. | ||||||||||||||||||||||||||||
warnings | array | Array of warnings that may require further consideration when enrolling a person in an event occurrence
| ||||||||||||||||||||||||||||
restrictions | array | Array of restrictions preventing a person from enrolling in an event occurrence
|
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_id | integer | The id of an event. Optional. Used in check for |
---|---|---|
location_id | integer | The 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 |
person_ids | comma delimited string | Person id(s) to filter on. Required. Does not yield errors if person does not exist. |
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. Optional. Used in check for |
start_at | timestamp | A date and time when the service starts. Optional. Used in check for |
Attributes
person_id | integer | The id of the person. | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
can_enroll | boolean | True or false based on whether restrictions exist or not. | ||||||||||||||||||||||||
warnings | array | Array of warnings that may require further consideration when enrolling a person in a service
| ||||||||||||||||||||||||
restrictions | array | Array of restrictions preventing a person from enrolling in a service
|
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
from | timestamp | Start of time range filter. |
---|---|---|
to | timestamp | End of time range filter. If from is given, this can be no more than 120 days later. |
ids | comma delimited string | The event identifier(s) to filter on. |
service_ids | comma delimited string | The service identifier(s) to filter on. |
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
from | timestamp | Start of time range filter. |
---|---|---|
to | timestamp | End of time range filter. If from is given, this can be no more than 120 days later. |
ids | comma delimited string | The event identifier(s) to filter on. |
service_ids | comma delimited string | The service identifier(s) to filter on. |
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
Parameters
from | timestamp | Start of time range filter. Defaults to beginning of day, today. |
---|---|---|
to | timestamp | End of time range filter. Defaults to end of day, today. |
ids | comma delimited string | Event occurrence id(s) to filter on. Does not yield errors if event occurrence does not exist. |
state | comma delimited string |
State of the event occurrence. Multiple values can be specified when separated by a comma.
For example, |
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. Yields errors if staff member does not exist. |
service_ids | comma delimited string | The service identifier(s) to filter on. Yields errors if service does not exist. |
event_ids | comma delimited string | The event identifier(s) to filter on. Yields errors if event does not exist. |
location_ids | comma delimited string | The location identifier(s) to filter on. Yields errors if location does not exist. |
GET /api/v2/front/event_occurrences/:id
Returns the details of an individual Event Occurrence.
Some differences from the
- 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.
GET /api/v2/front/event_occurrences/summary
Returns a count of event occurrences by day or by hour of each day
Parameters
from | timestamp | Start of time range filter. Defaults to beginning of day, today. |
---|---|---|
to | timestamp | End of time range filter. Defaults to end of day, today. |
group_by | string |
Grouping of the counts. Possible values:
|
location_ids | comma delimited string | The location identifier(s) to filter on. |
service_ids | comma delimited string | The service identifier(s) to filter on. |
service_types | comma delimited string |
The service type(s) to filter on. Possible values:
|
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. |
state | comma delimited string |
State of the event occurrence. Multiple values can be specified when separated by a comma.
For example, |
Desk
GET /api/v2/desk/event_occurrences
This returns a list of Event Occurrences for a time range (defaulting to today). The parameters
Parameters
from | timestamp | Start of time range filter. Defaults to beginning of day, today. |
---|---|---|
to | timestamp | End of time range filter. Defaults to end of day, today. |
ids | comma delimited string | Event occurrence id(s) to filter on. Does not yield errors if event occurrence does not exist. |
state | comma delimited string |
State of the event occurrence. Multiple values can be specified when separated by a comma.
For example, |
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. Yields errors if staff member does not exist. |
service_ids | comma delimited string | The service identifier(s) to filter on. Yields errors if service does not exist. |
event_ids | comma delimited string | The event identifier(s) to filter on. Yields errors if event does not exist. |
location_ids | comma delimited string | The location identifier(s) to filter on. Yields errors if location does not exist. |
GET /api/v2/desk/event_occurrences/:id
Returns the details of an individual Event Occurrence.
GET /api/v2/desk/event_occurrences/summary
Returns a count of event occurrences by day or by hour of each day
Parameters
from | timestamp | Start of time range filter. Defaults to beginning of day, today. |
---|---|---|
to | timestamp | End of time range filter. Defaults to end of day, today. |
group_by | string |
Grouping of the counts. Possible values:
|
location_ids | comma delimited string | The location identifier(s) to filter on. |
service_ids | comma delimited string | The service identifier(s) to filter on. |
service_types | comma delimited string |
The service type(s) to filter on. Possible values:
|
staff_member_ids | comma delimited string | The staff member identifier(s) to filter on. |
state | comma delimited string |
State of the event occurrence. Multiple values can be specified when separated by a comma.
For example, |
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.
GET /api/v2/front/people/:person_id/form_of_payments
Lists all of the vaulted Forms of Payment for a person.
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.
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.
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.
GET /api/v2/desk/people/:person_id/form_of_payments
Lists all of the Forms of Payment for a person.
Attributes
These apply to the Front and Desk versions of the API.
id | integer | The id of the form of payment. |
---|---|---|
type | string | Either "creditcard" or "ach". Some fields below will change depending on type. |
first_name | string | The first name on the account. |
last_name | string | The last name on the account. |
autobill | boolean | Whether this form of payment is the default for autobills. |
created_at | timestamp | When this form of payment was created. |
updated_at | timestamp | When this form of payment last updated. |
card_type | string | Credit card only. One of: visa, mastercard, discover, american_express, unknown. |
expire_month | number | Credit card only. The expiration month, e.g. 12 |
expire_year | number | Credit card only. The expiration year, e.g. 2019 |
last_four | string | Credit card only. The last 4 digits of the credit card. |
account_name | string | ACH only. A friendly description, e.g. Mega Savings Bank |
account_type | string | ACH only. One of: savings, checking |
account_holder_type | string | ACH only. One of: personal, business |
account_number | string | ACH only. The obfuscated account number |
routing_number | string | ACH 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.
Attributes
These apply to the Front and Desk versions of the API.
id | integer | The id of the form of payment. |
---|---|---|
autobill | boolean | True 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.
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
type | string | Required. The only option is: "creditcard" |
---|
Step Two
POST [form_url]
In step two, you will POST a form to the URL that was returned in step one as
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-number | string | Required. Credit card number. |
---|---|---|
billing-cc-exp | string | Required. Credit card expiration. Format: MMYY |
billing-cvv | string | Card security code. Check Configuration API to see if it's required. |
billing-first-name | string | Required. Cardholder's first name. |
billing-last-name | string | Required. Cardholder's last name. |
billing-address1 | string | Cardholder's billing address. |
billing-address2 | string | Card billing address, line 2. |
billing-city | string | Card billing city |
billing-state | string | Card billing state/province. Format: CC |
billing-postal | string | Card billing postal code. |
billing-country | string | Card billing country code. Format: CC/ISO 3166 |
billing-phone | string | Billing phone number. |
billing-email | string | Billing email address. |
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.
Franchisees
Front
GET /api/v2/front/business/franchisees
Returns the basic details of franchisees for a business.
Desk
GET /api/v2/desk/business/franchisees
Returns the basic details of franchisees for a business.
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.
Attributes
id | integer | The id of the invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
invoice_number | string | A unique bill identifier for this business, a.k.a. bill number. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invoice_date | string | This invoice's due date. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total_cents | integer | The amount total in cents for this invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | string | The amount total in localized currency for this invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outstanding_amount_cents | integer | The amount outstanding in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outstanding_amount | string | The amount outstanding in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | string | The currency ISO code. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state | string | The current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state_events | array | An array of strings containing the valid state events when calling to update the invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invoice_items | object | Information regarding the item the invoice is about
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payments | array | The payments that have already been made on the invoice
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
person | object | Optional. Information regarding the person who the invoice is for
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coupon | object | Optional. Information regarding a coupon for the invoice, if there is any
|
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.
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.
Parameters
state_event | string | The next state to transition to. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold” |
---|---|---|
coupon_code | string | The code for the promotion. |
Parameters
See the parameters table below in the Desk section
POST /api/v2/front/invoices/:invoice_id/payments
Create a payment for an invoice.
Parameters
payment_method | string |
Required. The name of the payment method. It's either |
---|---|---|
amount_cents | integer | Required. 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_id | integer | The 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.
POST /api/v2/front/invoices/:invoice_id/invoice_items
Add an invoice item to an existing invoice.
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.
Desk
GET /api/v2/desk/invoices/
Returns a list of invoices. Paginate using the page parameter.
Parameters
state | comma delimited string | The state the invoice is in. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold” |
---|---|---|
person_ids | comma delimited string | Person id(s) to filter on. |
created_since | timestamp | Filter invoices created since the given timestamp. |
updated_since | timestamp | Filter invoices updated since the given timestamp. |
Attributes
id | integer | The id of the invoice. |
---|---|---|
total_cents | integer | The total cost of the invoice in cents. |
total | string | The total cost of the invoice in localized currency. |
state_events | array | An array of strings showing state events. |
send_receipt | boolean | Was a receipt email sent? |
receipt_email | string | The email address the invoice was sent to, if any. |
currency | string | The type of currency the invoice is charged in, i.e 'USD'. |
person_id | integer | The person id the invoice is for. |
state | string | The 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.
Attributes
invoice_number | string | A unique bill identifer for this business, a.k.a. bill number. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
invoice_date | string | This invoice's due date. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total_cents | integer | The total cost of the invoice in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | string | The total cost of the invoice in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outstanding_amount_cents | integer | The remaining cost of the invoice in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
outstanding_amount | string | The remaining cost of the invoice in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount_total_cents | integer | The sum of all discounts in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
discount_total | string | The sum of all discounts in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
adjustment_total_cents | integer | The sum of all adjustments in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
adjustment_total | string | The sum of all adjustments in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included_tax_total_cents | integer | The sum of all included taxes in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
included_tax_total | string | The sum of all included taxes in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
additional_tax_total_cents | integer | The sum of all additional taxes in cents. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
additional_tax_total | string | The sum of all additional taxes in localized currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state_events | array | An array of strings containing the valid state events when calling to update the invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
send_receipt | boolean | Was a receipt email sent? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
receipt_email | string | The email address the invoice was sent to, if any. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | integer | The id of the invoice. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | string | The type of currency the invoice is charged in, i.e 'USD'. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
state | string | The current state of the invoice. Either 'open', 'closed', 'canceled', 'cart', 'cart_hidden', or 'on_hold.' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_tip | boolean | Does this invoice include a tip? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_commission_pay | boolean | Does this invoice include commission pay? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
can_adjust_tip | boolean | Is the tip adjustable? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
invoice_items | object | Information regarding the item the invoice is about
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payments | array | The payments that have already been made on the invoice
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
location | object | Optional. Location information for this invoice
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
created_by | object | Optional. The person who created this invoice
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
person | object | Optional. Information regarding the person who the invoice is for
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commission_recipient | object | Optional. Information regarding the commission recipient for this invoice, if any
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tip_recipient | object | Optional. Information regarding the tip recipient for this invoice, if any
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coupon | object | Optional. Information regarding a coupon or promotion for the invoice, if there is any
|
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.
Parameters
location_id | integer | Optional. Associate the invoice with a location. |
---|---|---|
commission_recipient_id | integer | Optional. Staff member who will recieve any commission. |
tip_recipient_id | integer | Optional. Staff member who will recieve any tip. |
send_receipt | boolean | Optional. Send an email receipt to the purchaser? |
receipt_email | string | Optional. The email to send the receipt to. |
state_event | string | Optional. The next state to transition to. Can be “open”, “closed”, “canceled”, “cart”, “cart_hidden”, or “on_hold” |
coupon_code | string | Optional. A code for a promotion. |
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_id | integer | Optional. Tie this invoice to a booking. When the invoice is closed, the booking will be completed. | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
payer_id | integer | Required. The id of the person paying for the invoice (e.g. the parent of a dependent). | |||||||||||||||
plan_products | array | Array of plan_products for the invoice.
|
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.
Attributes
These apply to the Front and Desk version of the API.
payment_methods | array | Array of payment_methods for the invoice.
|
---|
POST /api/v2/desk/invoices/:invoice_id/payments
Create a payment for an invoice.
Parameters
payment_method | string |
Required. The name of the payment method. The current options are |
---|---|---|
amount_cents | integer | Required. The amount in cents to be paid on this invoice. |
form_of_payment_id | integer | The 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.
Parameters
refund | object | Object of refund for the payment.
|
---|
POST /api/v2/desk/payments/:payment_id/voids
Void a payment.
Parameters
void | object | Object of void.
|
---|
POST /api/v2/desk/invoices/:invoice_id/invoice_items
Add a plan_product to an existing invoice.
Parameters
plan_product | object | Object of plan_product for the invoice item.
|
---|
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.
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.
Parameters
prorate | object | Object of prorate for the invoice item.
|
---|
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.
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.
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.
Parameters
discount | object | Object of discount for the invoice item.
|
---|
DELETE /api/v2/desk/invoices/:invoice_id/invoice_items/:invoice_item_id/discounts
Removes the discount from the invoice item.
Location
A physical location of the business and associated data.
Front
GET /api/v2/front/locations
Lists all locations for the business.
Desk
GET /api/v2/desk/locations
Lists all locations for the business.
Notes
Front
Person
GET /api/v2/front/people/:person_id/notes
Lists notes for a person. Paginate using
Event Occurrences
GET /api/v2/front/event_occurrences/:event_occurrence_id/notes
Lists notes for an event occurrence. Paginate using
GET /api/v2/front/event_occurrences/:event_occurrence_id/notes/:id
Returns the details for a note.
Desk
GET /api/v2/desk/event_occurrences/:event_occurrence_id/notes
GET /api/v2/desk/people/:person_id/notes
Lists notes for an event occurrence or person. Paginate using
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.
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.
Attributes
note | string | The body of the note. Required. |
---|---|---|
public | boolean | Specifies if the note is viewable by the client. Defaults to false. |
pinned | boolean | Specifies if the note should be starred. Starred notes show up in class rosters and the top of client profiles. Defaults to false. |
send_notifications | boolean | Send 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.
Attributes
note | string | The body of the note. Required. |
---|---|---|
public | boolean | Specifies if the note is viewable by the client. |
pinned | boolean | Specifies 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.
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.
POST /api/v2/desk/pack_products/:pack_product_id/packs
Creates a pack.
Attributes
person_ids | array | Array of person ids. Required. Including more than one person ID allows clients to share a pack. |
---|---|---|
start_date | date | Date the pack becomes effective. Optional. Default to today. |
end_date | date | Date the pack expires. Defaults to start date plus the pack products expiration period. |
count | integer | Number of visits the pack can cover. Optional. If not supplied it will default to the pack product definition. |
description | string | Description of the pack. Optional. |
price_cents | integer | The cost of the pack in cents. Defaults to the pack product definition. |
staff_member_id | integer | Staff member id. If set, this pack will only automatically apply to visits where the given staff member is an instructor. |
location_id | integer | Location id. If set, this pack will only automatically apply to visits at the given location. |
visits_shared | integer | If 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. |
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
POST /api/v2/desk/pack_products
Creates a pack product.
Attributes
product | object | The product from which the pack inherits some properties.
| ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | integer | Required. The number of uses this pack product has. | ||||||||||||||||||
commitment_length | integer | Required. Combined with commitment_unit, this determines how long the pack product is valid. e.g. 12 months. | ||||||||||||||||||
commitment_unit | string | Required. Combined with commitment_length, this determines how long the pack_product is valid. e.g. 12 months. Possible values: | ||||||||||||||||||
location_id | integer | If specified, restricts the location where this pack product can be used. Optional. | ||||||||||||||||||
consider_member | boolean | Is the client considered a member of the business when purchasing this pack product? Optional. Defaults to false. | ||||||||||||||||||
terms | string | Terms and conditions associated with purchasing this pack product. Optional. | ||||||||||||||||||
terms_acceptance_required | boolean | Is 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_type | string | If terms acceptance is required, this dictates how the terms are presented and acknowledged. Possible values: | ||||||||||||||||||
terms_acceptance_at_checkout | boolean | Is the client required to accept the terms and conditions before they can complete the purchase of a pack. Optional. Defaults to false. | ||||||||||||||||||
send_expiration_notifications | boolean | Send notifcations to the client when the pack is about to expire. Optional. Defaults to true. | ||||||||||||||||||
service_ids | array | Array 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, |
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.
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.
Attributes
These apply to the Front and Desk versions of the API.
payment_configuration | object | Payment configurations for 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
Parameters
with_dependents | boolean | Return dependent information |
---|
Desk
GET /api/v2/desk/people
Lists all clients for the business. Returns 25 clients at a time. Paginate using the
Parameters
created_since | timestamp | Filter to people created since the given timestamp. |
---|---|---|
updated_since | timestamp | Filter to people updated since the given timestamp. |
is_member | boolean | Filter to people with a current membership |
include_relationships | boolean | Include providers and dependents for each person. |
include_balances | boolean | Include balances for each person. |
sort | string | Sort results by the given attributes and directions. Attributes can be |
GET /api/v2/desk/people/:id
GET /api/v2/desk/people/me
Returns the details of a client as viewed by a staff member.
GET /api/v2/desk/people/search?q=:query
Search for clients. Email searches can match the
q | string | Search query. Required. When you search by phone number, only digits are allowed. See the below example. |
---|---|---|
fields | comma delimited string | Fields to be searched. Can be any of the following: |
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
pronoun | string | Client's preferred pronouns. | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
first_name | string | Required. Client's first name. | ||||||||||||||||||
middle_name | string | Client's middle name. | ||||||||||||||||||
last_name | string | Required. Client's last name. | ||||||||||||||||||
string | Client's email address. Email address formatting is enforced. | |||||||||||||||||||
address | string | Client's physical address. | ||||||||||||||||||
phone | string | Client's phone number. | ||||||||||||||||||
birthdate | date | Client's date of birth. | ||||||||||||||||||
guardian_name | string | Full name of client's guardian. | ||||||||||||||||||
guardian_email | string | Email address of client's guardian. | ||||||||||||||||||
location_id | integer | Location ID for client's home location. | ||||||||||||||||||
joined_at | timestamp | Timestamp for when the client joined the business. Default to current time. | ||||||||||||||||||
send_invite | boolean | Send the client a welcome email from Pike13 | ||||||||||||||||||
skip_complimentary_passes | boolean | Do not issue any complimentary passes to the client. | ||||||||||||||||||
custom_fields | collection | Collection of custom field IDs and values.
| ||||||||||||||||||
dependents | collection | Collection of dependents. All of the same fields for a person are available for a dependent.
|
PUT /api/v2/desk/people/:id
Updates a Person. Dependents can be added to the Person using the
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
Plans
Available plans for a business.
Desk
GET /api/v2/desk/plans
Lists all plans for a business. Paginate using the
Parameters
include_holds | boolean | Include active and upcoming holds on each plan. |
---|
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
Parameters
include_holds | boolean | Include active and upcoming holds on each plan. | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | string | Filter plans returned by:
|
Desk
GET /api/v2/desk/people/:person_id/plans
Lists plans for a person. Paginate using the
Parameters
include_holds | boolean | Include active and upcoming holds on each plan. | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | string | Filter plans returned by:
|
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
id | integer | The identifier for the waiver. |
---|---|---|
name | string | The name of the waiver, e.g., 'Adult Waiver'. |
type | string | The type of the waiver. Possible values: Waiver, GuardianWaiver. |
signer_id | integer | The identifier of the person who signed the waiver. |
signing_url | string | The URL for signing the waiver. |
accepted | boolean | Indicates whether the waiver has been accepted or not. |
Desk
GET /api/v2/desk/people/:person_id/waivers
Lists waivers for a person.
Attributes
id | integer | The identifier for the waiver. |
---|---|---|
name | string | The name of the waiver, e.g., 'Adult Waiver'. |
type | string | The type of the waiver. Possible values: Waiver, GuardianWaiver. |
signer_id | integer | The identifier of the person who signed the waiver. |
signing_url | string | The URL for signing the waiver. |
accepted | boolean | Indicates whether the waiver has been accepted or not. |
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
Parameters
location_ids | comma delimited string | The location identifier(s) to filter on. |
---|---|---|
service_ids | comma delimited string | The service identifier(s) to filter on. |
Desk
GET /api/v2/desk/plan_products
Lists all plan products for the business. Paginate using the
Parameters
location_ids | comma delimited string | The location identifier(s) to filter on. |
---|---|---|
service_ids | comma delimited string | The service identifier(s) to filter on. |
Plan Terms
Fetches the terms and conditions for a Plan.
If the Plan uses
If the Plan uses
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
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
If the type of the terms is
Punches
A punch pays for a visit with a plan.
Desk Only
GET /api/v2/desk/punches/:id
Returns the details of a punch.
POST /api/v2/desk/punches
Creates a punch.
Attributes
visit_id | integer | The id of the visit. Required. |
---|---|---|
plan_id | integer | The 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.
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
Lists the revenue categories.
GET /api/v2/desk/revenue_categories/:id
Returns the details of a revenue category.
Show curl exampleSales Tax
Sales Taxes that can be added to an invoice.
Desk Only
GET /api/v2/desk/sales_taxes
Available Sales Tax adjustments.
List of Sales Taxes.
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.
GET /api/v2/front/services/:id
Returns the details of a service.
Desk
GET /api/v2/desk/services
Lists all services for the business.
Parameters
include_hidden | boolean | Includes hidden services. |
---|
GET /api/v2/desk/services/:id
Returns the details of a service.
Staff Member
A type of person that has additional properties.
Front
No authentication required.
GET /api/v2/front/staff_members
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.
Desk
GET /api/v2/desk/staff_members
Lists all current staff members.
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
Visits
Ties a Person to an Event Occurrence.
Front
GET /api/v2/front/visits/:id
Returns the details of a visit.
Attributes
person_id | integer | The id of the person. |
---|---|---|
state | string | Status of the visits. Can be one of the following: "reserved", "registered", "completed", "noshowed", "late_canceled". |
event_occurrence_id | integer | The id of the event occurrence. |
registered_at | timestamp | When registration was completed for this visit. Typically, this is when the visit was created. |
completed_at | timestamp | When the visit was marked as complete by a staff member. |
noshow_at | timestamp | When the staff member marked this visit as a no-show. |
cancelled_at | timestamp | When the visit was marked as a late cancel. |
created_at | timestamp | When the visit was created. |
paid | boolean | True if this visit has been paid for. |
paid_for_by | string | Description of the plan used to pay for the visit. |
punch_id | integer | The 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
Parameters
from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
---|---|---|
to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
event_occurrence_id | integer | Optional - Scope to an event occurrence. |
POST /api/v2/front/visits
Creates a visit.
Attributes
person_id | integer | The id of the person. Defaults to the current person if a value is not specified. |
---|---|---|
event_occurrence_id | integer | The 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.
Desk
GET /api/v2/desk/visits/:id
Returns the details of a visit.
Attributes
person_id | integer | The id of the person. |
---|---|---|
state | string | Status of the visits. Can be one of the following: "reserved", "registered", "completed", "noshowed", "late_canceled". |
event_occurrence_id | integer | The id of the event occurrence. |
registered_at | timestamp | When registration was completed for this visit. Typically, this is when the visit was created. |
completed_at | timestamp | When the visit was marked as complete by a staff member. |
noshow_at | timestamp | When the staff member marked this visit as a no-show. |
cancelled_at | timestamp | When the visit was marked as a late cancel. |
created_at | timestamp | When the visit was created. |
paid | boolean | True if this visit has been paid for. |
paid_for_by | string | Description of the plan used to pay for the visit. |
punch_id | integer | The 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
Parameters
from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
---|---|---|
to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
event_occurrence_id | integer | Optional - Scope to an event occurrence. |
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.
POST /api/v2/desk/visits
Creates a visit.
Attributes
person_id | integer | The id of the person. Required for states other than "reserved". | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
event_occurrence_id | integer | The id of the event occurrence. Required. | ||||||||||
state | string | Initial state of the visit. Defaults to "registered". Must be one of the following:
| ||||||||||
notify_client | boolean | Should the client be notified of this registration or when it is deleted? Write-only. Defaults to true. | ||||||||||
restrictions | array | 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.
|
PUT /api/v2/desk/visits/:id
Updates a visit.
Attributes
person_id | integer | The id of the person. Can be set, but cannot changed. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
state_event | string |
Visits are state machines. They can be transitioned between states by using the write-only
|
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.
POST /api/v2/desk/make_ups/generate
Creates a make up pass to a canceled enrollment.
Attributes
visit_id | integer | The event ID. Required | ||||||
---|---|---|---|---|---|---|---|---|
make_up | object | Make up attributes to build the visit - make up pass. 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.
Attributes
person_id | integer | The id of the person. | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
can_waitlist | boolean | True if the person can be added to the waitlist | ||||||||||||||||||||||
restrictions | array | Array of restrictions preventing a person from being added to a waitlist
|
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.
Attributes
id | integer | The id of the waitlist entry. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
person_id | integer | The id of the waitlisted person. | ||||||||||
event_occurrence_id | integer | The id of the class to waitlist into. | ||||||||||
state | string | State of the waitlist entry. Will be one of the following:
|
GET /api/v2/front/people/:person_id/waitlist_entries
Lists waitlist entries for a person. Access is restricted to the authenticated person and their dependents. Paginate using the
Parameters
from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
---|---|---|
to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
event_occurrence_id | integer | Optional - Scope to an event occurrence. |
POST /api/v2/front/waitlist_entries
Creates a waitlist entry whichs adds an authenticated person or a person's dependent to the waitlist.
Attributes
person_id | integer | The id of the person being waitlisted. Must be the id of the authenticated person or one of their dependents. Defaults to the current person if a value is not specified. |
---|---|---|
event_occurrence_id | integer | The id of the class to waitlist into. |
DELETE /api/v2/front/waitlist_entries/:id
Deletes the waitlist entry.
Desk
GET /api/v2/desk/waitlist_entries/:id
Returns the details of a waitlist_entry.
Attributes
id | integer | The id of the waitlist entry. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
person_id | integer | The id of the waitlisted person. | ||||||||||
event_occurrence_id | integer | The id of the class to waitlist into. | ||||||||||
state | string | State of the waitlist entry. Will be one of the following:
| ||||||||||
created_at | timestamp | When the waitlist entry was created. | ||||||||||
updated_at | timestamp | When the waitlist entry was last updated. |
GET /api/v2/desk/people/:person_id/waitlist_entries
GET /api/v2/desk/event_occurrences/:event_occurrence_id/waitlist_entries
Lists waitlist entries for a person or event occurrence. Paginate using the
Parameters
from | timestamp | Optional, but must be included if specifying to - Start of time range filter. |
---|---|---|
to | timestamp | Optional, but must be included if specifying from - End of time range filter. |
event_occurrence_id | integer | Optional - Scope to an event occurrence. |
POST /api/v2/desk/waitlist_entries
Creates a waitlist entry for a person.
Attributes
person_id | integer | The id of the person being waitlisted. Defaults to the current person if a value is not specified. |
---|---|---|
event_occurrence_id | integer | The id of the class to waitlist into. |
PUT /api/v2/desk/waitlist_entries/:id
Updates a waitlist entry.
Attributes
id | integer | The id of the waitlist entry. | ||||
---|---|---|---|---|---|---|
state_event | string | Waitlist entries are state machines. They can be transitioned between states by using the write-only state_event attribute. The following transitions can be applied:
|
DELETE /api/v2/desk/waitlist_entries/:id
Deletes the waitlist entry.