I'm trying to integrate with the public API for MindBody and I'm wondering how I pull the valid services for an Enrollment. If I request the /enrollment/enrollments I can get a list of enrollments.
curl --location 'https://api.mindbodyonline.com/public/v6/enrollment/enrollments?limit=100&offset=0&startDate=19%2F7%2F2023&endDate=1%2F1%2F2024'
These have a program and a session type included. I can then request the /sale/service endpoint and I include the program id of the enrollment in this request I'll get a list of the services that are allowed for the program.
curl --location 'https://api.mindbodyonline.com/public/v6/sale/services?limit=10&offset=0&programIds=10&sellOnline=true'
This includes the valid service for this enrollment but also some other services. I'm wondering how I just get the specific service for a specific enrollment. For instance for a class, I can just pass in the class id to the service endpoint and this only shows me the valid services for that class:
curl --location 'https://api.mindbodyonline.com/public/v6/sale/services?
limit=10&offset=0&classId=19115&sellOnline=true' \
For the enrollments the closest I can get is passing in the program ID but this doesn't match what is in the branded app for the site I'm currently linked with. I'm a bit unsure what I'm missing here and any help would be appreciated.
I've stripped out the headers from the curl requests to safeguard API keys, etc, but I've been using the PostMan collection to grab these.