๐ How to Use the Public Classes API
This guide explains how to access and use the public Franscape Classes API endpoint:
https://api.uk.prod.franscape.services/v1/public/classes
๐ API Overview
This GET endpoint returns a paginated list of public classes, including schedule, venue, and instructor information.
- ๐ Base URL:
https://api.uk.prod.franscape.services/v1/public/classes
- ๐ Authentication: Not required
- ๐งพ Required Header:
tenant: brandname
- ๐ Response Format:
application/json
๐งฉ Required Headers
Set the following header when making your request:
GET /v1/public/classes HTTP/1.1
Host: api.uk.prod.franscape.services
tenant: brandname
Accept: application/json
๐ ๏ธ Query Parameters
The following optional query parameters are supported:
Parameter | Description | Example |
---|---|---|
page |
Page number for paginated results | ?page=1 |
count |
Number of items per page | ?count=25 |
filter |
URL-encoded JSON object | ?filter=%7B%22franchisee_ids%22%3A%5B6%5D%7D |
๐ฏ Filters
The filter
parameter must contain a URL-encoded JSON object. You can use it to filter results by franchisee, course types, day of week, or venue IDs.
Supported filter keys
franchisee_ids
โ array of integer IDscourse_type_ids
โ array of integer IDsday_of_week
โ array of numbers (0 = Sunday, 6 = Saturday)venue_ids
โ array of venue ID integers
Example JSON
{
"franchisee_ids": [6],
"course_type_ids": [1, 2, 3],
"day_of_week": [1, 3, 5],
"venue_ids": [1001, 1002]
}
Encoded for use in URL
filter=%7B%22franchisee_ids%22%3A%5B6%5D%2C%22course_type_ids%22%3A%5B1%2C2%2C3%5D%2C%22day_of_week%22%3A%5B1%2C3%2C5%5D%2C%22venue_ids%22%3A%5B1001%2C1002%5D%7D
๐ก Tip: Use urlencoder.org to encode your raw JSON object for the
filter
parameter.
๐ Need help finding ID values?
Read this article to learn how to find franchisee, course type, or venue IDs:
https://kb.franscape.io/knowledge/object-id
Read this article to learn how to find franchisee, course type, or venue IDs:
https://kb.franscape.io/knowledge/object-id
๐งช Example Request
Example curl
request with page, count, and a full filter set:
curl -X GET "https://api.uk.prod.franscape.services/v1/public/classes?page=1&count=25&filter=%7B%22franchisee_ids%22%3A%5B6%5D%2C%22course_type_ids%22%3A%5B1%2C2%2C3%5D%2C%22day_of_week%22%3A%5B1%2C3%2C5%5D%2C%22venue_ids%22%3A%5B1001%2C1002%5D%7D" \
-H "tenant: brandname" \
-H "Accept: application/json"
๐ฆ Sample JSON Response
{
"meta": {
"paginated": true,
"current_page": 1,
"has_more_pages": true,
"last_page": 10,
"per_page": 25,
"total": 250,
"next_page_url": "https://api.uk.prod.franscape.services/v1/public/classes?page=2",
"custom": {
"tenant": "brandname"
}
},
"items": [
{
"id": 202001,
"name": "Beginners Swim",
"instructor": { "name": "Dewi Jones" },
"venue": { "name": "Manchester Aquatics Centre", "postcode": "M13 9SS" },
"lessons": {
"schedule": {
"day_name": "Thursday",
"time_12": "9:00 AM"
},
"space_available": true
},
"paths": {
"class_overview_url": "https://portal.swimtime.org/class-overview/202001",
"booking_url": "https://portal.swimtime.org/book-class/202001"
}
}
]
}
๐ Common Use Cases
- โ Embed a live class schedule on a your website
- โ Provide real-time availability and booking links
- โ Display class times, venues, and instructors details
โ Troubleshooting & Notes
- โ ๏ธ The
tenant
header is required for all requests. - ๐ ๏ธ The
filter
must be a single URL-encoded JSON object string. - ๐ Use
meta.next_page_url
to paginate results.
Last updated: May 29, 2025