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