Overview
The Collections API provides endpoints for viewing and managing user collections of football memorabilia. Collections are user-specific groupings of items that can be filtered, searched, and displayed. Base URL:/api/collections/
Authentication: Token authentication required for all endpoints.
Interactive API Documentation
Full interactive API documentation for collection endpoints is available at
/api/docs/ when running the FootyCollect server. The Swagger UI interface allows you to explore and test all endpoints with real-time responses.OpenAPI Schema
The complete OpenAPI schema for collection endpoints is available at:What is a Collection?
In FootyCollect, a collection represents all items owned by a user. Collections can be:- Public - Visible to all users
- Private - Only visible to the owner
- Filtered - By club, brand, season, item type, etc.
- Searched - By keywords, player names, descriptions
Collection Features
Filtering
Collections support advanced filtering capabilities:- Filter by club (e.g., show only Real Madrid items)
- Filter by brand (e.g., show only Adidas items)
- Filter by season (e.g., show only 2023-24 season items)
- Filter by item type (e.g., show only jerseys)
- Filter by design (e.g., show only striped items)
- Filter by condition (e.g., show only BNWT items)
- Filter by tags (e.g., show only signed items)
Sorting
Collections can be sorted by:- Date added (newest/oldest first)
- Name (alphabetical)
- Club (alphabetical)
- Brand (alphabetical)
- Season (chronological)
- Condition (rating)
Privacy Controls
Users can control the visibility of their collections:- Public collections are visible to all users and search engines
- Private collections are only visible when authenticated as the owner
- Draft items are excluded from public collection views
RESTful Conventions
Collection endpoints follow standard RESTful conventions:GET /api/collections/- List all public collectionsGET /api/collections/{user_id}/- View a specific user’s collectionGET /api/collections/{user_id}/items/- List items in a user’s collectionGET /api/collections/me/- View your own collectionGET /api/collections/me/items/- List items in your collection
Sample Request
Sample Response
Query Parameters
Filter by club ID
Filter by brand ID
Filter by season ID
Filter by item type: jersey, shorts, outerwear, tracksuit, pants, other
Filter by design pattern
Filter by replica status
Search by keywords (name, description, player name)
Sort results: created_at, -created_at, name, -name, etc.
Page number for pagination
Number of results per page (default: 20, max: 100)
Statistics
Collection endpoints may also provide statistics about a user’s collection:- Total number of items
- Items by type (jerseys, shorts, etc.)
- Items by club
- Items by brand
- Items by season
- Average condition rating
Related Models
Collections interact with several related models:- BaseItem - The core item model
- User - Collection owner
- Club - Football clubs associated with items
- Brand - Manufacturers of items
- Season - Seasons associated with items
- Photo - Photos of items in the collection
Learn More
OpenAPI Documentation
Access the full interactive API documentation with request/response examples and the ability to test endpoints directly.
OpenAPI Schema
Download the complete OpenAPI specification for integration with API clients and code generation tools.
Item Endpoints
Learn more about managing individual items in your collection.