API Documentation
The BJJ RollCall API provides programmatic access to gym information, class schedules, and training data. This RESTful API uses standard HTTP methods and returns JSON responses.
Authentication
The API uses token-based authentication. Include your API token in the Authorization header with the Token prefix.
Getting Your API Token
- Log in to your BJJ RollCall account
- Navigate to your profile settings
- Find your API token in the "API Access" section
- Keep your token secure - treat it like a password
Authentication Example
curl -H "Authorization: Token YOUR_API_TOKEN_HERE" \
https://bjjrollcall.com/gyms/api/v1/gyms/1/
Quick Start
Here's a quick example to get you started with the API:
1. Get Gym Information
curl -H "Authorization: Token YOUR_TOKEN" \
https://bjjrollcall.com/gyms/api/v1/gyms/123/
2. View Gym Timetable
curl -H "Authorization: Token YOUR_TOKEN" \
https://bjjrollcall.com/gyms/api/v1/gyms/123/timetable/
3. Update Your Gym
curl -X PATCH \
-H "Authorization: Token YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Updated gym description"}' \
https://bjjrollcall.com/gyms/api/v1/gyms/123/update/
API Endpoints
All API endpoints are prefixed with /gyms/api/v1/. The base URL is:
https://bjjrollcall.com/gyms/api/v1/
View Gyms
Retrieve detailed information about a specific gym including name, location, affiliation, and contact details.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id |
integer | The unique identifier of the gym |
Example Response
{
"id": 123,
"name": "Sydney BJJ Academy",
"affiliation": "Gracie Barra",
"address": "123 Main St, Sydney NSW 2000",
"suburb": "Sydney",
"state": "NSW",
"country": "Australia",
"website": "https://sydneybjj.com",
"email": "info@sydneybjj.com",
"phone": "+61 2 1234 5678",
"description": "Premier Brazilian Jiu-Jitsu academy in Sydney",
"latitude": -33.8688,
"longitude": 151.2093
}
Get the complete class schedule for a gym, including all days and class types.
Example Response
[
{
"id": 1,
"weekday": 1,
"weekday_display": "Monday",
"start_time": "18:00:00",
"end_time": "19:30:00",
"class_type": "Gi",
"instructor": "John Smith",
"level": "All Levels",
"notes": "Fundamentals class"
}
]
Manage Your Gym
Submit a new gym for listing on BJJ RollCall. The gym will be reviewed before being made publicly visible.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | The gym name |
address |
string | Yes | Full street address |
suburb |
string | Yes | City or suburb |
state |
string | Yes | State or province |
country |
string | Yes | Country name |
website |
string | No | Gym website URL |
email |
string | No | Contact email |
phone |
string | No | Contact phone number |
Example Request
{
"name": "Sydney BJJ Academy",
"address": "123 Main St",
"suburb": "Sydney",
"state": "NSW",
"country": "Australia",
"website": "https://sydneybjj.com",
"email": "info@sydneybjj.com",
"phone": "+61 2 1234 5678"
}
Update information for your gym. Only gym owners can update their gym details.
Example Request
{
"description": "Updated description for our academy",
"phone": "+61 2 9999 8888",
"website": "https://newwebsite.com"
}
Timetable Management
Manage your gym's class schedule through the API. All times should be provided in your local timezone.
List all timetable entries for your gym.
Add a new class to your gym's timetable.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
weekday |
integer | Yes | Day of week (0=Monday, 6=Sunday) |
start_time |
string | Yes | Start time in HH:MM:SS format |
end_time |
string | Yes | End time in HH:MM:SS format |
class_type |
string | Yes | Type of class (e.g., "Gi", "No-Gi") |
instructor |
string | No | Instructor name |
level |
string | No | Class level (e.g., "Beginners", "All Levels") |
Example Request
{
"weekday": 0,
"start_time": "18:00:00",
"end_time": "19:30:00",
"class_type": "Gi",
"instructor": "John Smith",
"level": "All Levels",
"notes": "Fundamentals class"
}
Update an existing timetable entry.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
gym_pk |
integer | The gym ID |
entry_pk |
integer | The timetable entry ID |
Remove a class from your gym's timetable.
Response
Returns 204 No Content on successful deletion.
Training Notes
Record and manage your personal training notes. These are private to your account.
Retrieve all your training notes.
Create a new training note.
Example Request
{
"gym": 123,
"date": "2026-02-08",
"notes": "Worked on triangle chokes from closed guard",
"techniques": ["Triangle Choke", "Closed Guard"],
"sparring_rounds": 5
}
Error Handling
The API uses standard HTTP status codes to indicate success or failure:
| Status Code | Meaning | Description |
|---|---|---|
200 |
OK | Request succeeded |
201 |
Created | Resource successfully created |
204 |
No Content | Request succeeded with no response body |
400 |
Bad Request | Invalid request data |
401 |
Unauthorized | Missing or invalid authentication token |
403 |
Forbidden | Authenticated but not authorized for this action |
404 |
Not Found | Resource doesn't exist |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Internal Server Error | Server error - please contact support |
Error Response Format
{
"error": "Unauthorized",
"detail": "Authentication credentials were not provided."
}
Rate Limiting
To ensure fair usage and system stability, the API implements rate limiting:
- Authenticated requests: 1000 requests per hour
- Read operations (GET): Higher limits apply
- Write operations (POST, PATCH, DELETE): Lower limits for data integrity
When you exceed the rate limit, you'll receive a 429 Too Many Requests response.
The response headers include:
X-RateLimit-Limit: Your rate limitX-RateLimit-Remaining: Requests remaining in current windowX-RateLimit-Reset: Time when the limit resets (Unix timestamp)
Best Practices
1. Use Environment Variables
Never hardcode API tokens in your source code. Use environment variables:
import os
API_TOKEN = os.getenv('BJJ_ROLLCALL_API_TOKEN')
headers = {'Authorization': f'Token {API_TOKEN}'}
2. Handle Errors Gracefully
Always check response status codes and handle errors appropriately:
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
elif response.status_code == 404:
print("Gym not found")
else:
print(f"Error: {response.status_code}")
3. Respect Rate Limits
Implement exponential backoff when rate limited and cache responses when appropriate.
4. Use HTTPS
Always use HTTPS URLs to ensure your API token is transmitted securely.
5. Keep Tokens Secure
Treat API tokens like passwords. Rotate them regularly and revoke compromised tokens immediately.
Support & Resources
Need help with the API? We're here to assist:
- Interactive Documentation: Swagger UI - Test endpoints in your browser
- OpenAPI Schema: Download JSON - Generate client libraries
- Email Support: win@wincor.com.au
- Report Issues: Found a bug? Let us know via email
Last updated: February 2026 | API Version 1.0