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

Core API Documentation

Enrollment Eligibility

Determine if a Person can enroll in an Event Occurrence.

Front

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

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

Show curl example

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

RESPONSE
{
  "enrollment_eligibilities": [
    {
      "person_id": 1,
      "can_enroll": false,
      "warnings": [
        {
          "code": "credit_card_required",
          "description": "No available credit card"
        }
      ],
      "restrictions": [
        {
          "code": "full",
          "description": "This event is full"
        },
        {
          "code": "plan_required",
          "description": "No available visits"
        },
        {
          "code": "plan_required_allocated",
          "description": "You will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments."
        }
      ]
    }
  ]
}

Attributes

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

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

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

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

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
cancelledThe event has been canceled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
client_purchase_disabledUnable to enroll in this event
clients_not_allowedYou must be a member to enroll in this event
deletedThe event has been deleted
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
unpaid_invoicesYou have unpaid invoices. Please pay them before enrolling.
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
plan_required_allocatedYou will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments.
descriptionstring

Localized text describing the enrollment restriction code

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

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

Parameters

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

Show curl example

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

RESPONSE
{
  "enrollment_eligibilities": [
    {
      "person_id": 1,
      "can_enroll": false,
      "warnings": [
        {
          "code": "credit_card_required",
          "description": "No available credit card"
        }
      ],
      "restrictions": [
        {
          "code": "full",
          "description": "This event is full"
        },
        {
          "code": "plan_required",
          "description": "No available visits"
        },
        {
          "code": "plan_required_allocated",
          "description": "You will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments."
        }
      ]
    }
  ]
}

Attributes

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

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

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in a service

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
client_purchase_disabledUnable to enroll in this event
clients_not_allowedYou must be a member to enroll in this event
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
unpaid_invoicesYou have unpaid invoices. Please pay them before enrolling.
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
plan_required_allocatedYou will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments.
descriptionstring

Localized text describing the enrollment restriction code

Desk

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

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

Parameters

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

Show curl example

REQUEST
$ curl https://mybiz.pike13.com/api/v2/desk/event_occurrences/1/enrollment_eligibilities?person_ids=1,2 \
  -H "Authorization: Bearer XXXXXXXXXXXXXXX"

RESPONSE
{
  "enrollment_eligibilities": [
    {
      "person_id": 1,
      "can_enroll": false,
      "warnings": [
        {
          "code": "credit_card_required",
          "description": "No available credit card"
        }
      ],
      "restrictions": [
        {
          "code": "full",
          "description": "This event is full"
        },
        {
          "code": "plan_required",
          "description": "No available visits"
        },
        {
          "code": "plan_required_allocated",
          "description": "You will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments."
        }
      ]
    }
  ]
}

Attributes

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

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

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

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

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
cancelledThe event has been canceled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
clients_not_allowedYou must be a member to enroll in this event
deletedThe event has been deleted
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
plan_required_allocatedYou will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments.
descriptionstring

Localized text describing the enrollment restriction code

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

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

Parameters

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

Show curl example

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

RESPONSE
{
  "enrollment_eligibilities": [
    {
      "person_id": 1,
      "can_enroll": false,
      "warnings": [
        {
          "code": "credit_card_required",
          "description": "No available credit card"
        }
      ],
      "restrictions": [
        {
          "code": "full",
          "description": "This event is full"
        },
        {
          "code": "plan_required",
          "description": "No available visits"
        },
        {
          "code": "plan_required_allocated",
          "description": "You will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments."
        }
      ]
    }
  ]
}

Attributes

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

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

codestring

Code representation of the enrollment restriction

credit_card_requiredNo available credit card
client_purchase_disabledUnable to enroll in this event
descriptionstring

Localized text describing the enrollment restriction code

restrictionsarray

Array of restrictions preventing a person from enrolling in a service

codestring

Code representation of the enrollment restriction

already_enrolledAlready enrolled
client_mode_booking_not_allowedThis may not be booked online. Please contact us for details.
clients_not_allowedYou must be a member to enroll in this event
fullThis event is full
in_the_pastThis event has ended
inside_blackout_windowIt's too late to enroll for this event
too_far_in_advanceIt's too early to enroll for this event
members_not_allowedThis event doesn't offer online enrolling
plan_requiredNo available visits
plan_required_allocatedYou will need to purchase a plan or pass for this enrollment. Your current plans and passes have visits that have already been allocated for other enrollments.
descriptionstring

Localized text describing the enrollment restriction code