Introduction
The Penn Clubs API is a RESTful API built with Django REST Framework that provides access to club information, events, memberships, and more at the University of Pennsylvania.Base URL
All API requests should be made to:API Conventions
The Penn Clubs API follows REST conventions:HTTP Methods
- GET - Retrieve resources
- POST - Create new resources
- PUT - Update entire resources (all fields required)
- PATCH - Partially update resources (only specified fields)
- DELETE - Remove resources
Resource Naming
API endpoints use plural nouns for collections:Request Format
Content Type
All POST, PUT, and PATCH requests should include:Request Body
Request bodies should be formatted as JSON:Response Format
Success Responses
Successful responses return JSON with appropriate HTTP status codes:- 200 OK - Request succeeded
- 201 Created - Resource created successfully
- 204 No Content - Request succeeded with no response body
Error Responses
Error responses include descriptive messages:Human-readable error message
Common Status Codes
- 400 Bad Request - Invalid request data
- 401 Unauthorized - Authentication required
- 403 Forbidden - Insufficient permissions
- 404 Not Found - Resource does not exist
- 500 Internal Server Error - Server error
Pagination
List endpoints return paginated results:Total number of results
URL to the next page (null if last page)
URL to the previous page (null if first page)
Array of result objects
Filtering and Search
Many endpoints support filtering via query parameters:Ordering
Control result ordering with theordering parameter:
Main API Resources
The Penn Clubs API provides access to these primary resources:Clubs
/api/clubs/- Club organizations and information/api/clubs/{code}/members/- Club membership management/api/clubs/{code}/events/- Club-specific events
Events
/api/events/- All events across clubs/api/clubfairs/- Activities fair management
Membership
/api/favorites/- User’s favorited clubs/api/subscriptions/- User’s club subscriptions/api/memberships/- User’s club memberships/api/requests/membership/- Membership requests
Metadata
/api/tags/- Club tags and categories/api/badges/- Club badges/api/majors/- Academic majors/api/schools/- Penn schools/api/years/- Graduation years
Example Request
Here’s a complete example of making an authenticated request:Rate Limiting
The API does not currently enforce rate limiting, but clients should be respectful and avoid making excessive requests. Implement appropriate caching and throttling in your applications.Documentation
Interactive API documentation is available at:- ReDoc: https://pennclubs.com/api/documentation/
- OpenAPI Schema: https://pennclubs.com/api/openapi/
Next Steps
- Authentication - Learn how to authenticate with the API
- Clubs Endpoints - Explore club-related endpoints
- Events Endpoints - Work with events data
- Applications Endpoints - Manage club applications
- Tickets Endpoints - Handle event ticketing