Skip to main content

Overview

The Items API provides endpoints for managing football memorabilia in your collection. Items include jerseys, shorts, outerwear, tracksuits, pants, and other collectibles. Base URL: /api/items/ Authentication: Token authentication required for all endpoints.

Interactive API Documentation

Full interactive API documentation for item 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 item endpoints is available at:
GET /api/schema/
This provides a machine-readable specification of all item endpoints, request/response schemas, and validation rules.

Item Types

FootyCollect supports the following item types:
  • Jersey - Football shirts/jerseys
  • Shorts - Football shorts
  • Outerwear - Hoodies, jackets, windbreakers, crewnecks
  • Tracksuit - Training tracksuits
  • Pants - Training pants
  • Other - Pins, hats, caps, socks, and other memorabilia

Common Fields

All items share these base fields from the BaseItem model (see footycollect/collection/models.py:180-364):

RESTful Conventions

Item endpoints follow standard RESTful conventions:
  • GET /api/items/ - List all items
  • POST /api/items/ - Create a new item
  • GET /api/items/{id}/ - Retrieve a specific item
  • PUT /api/items/{id}/ - Full update of an item
  • PATCH /api/items/{id}/ - Partial update of an item
  • DELETE /api/items/{id}/ - Delete an item

Sample Request

curl -X GET "http://localhost:8000/api/items/" \
  -H "Authorization: Token your_auth_token_here"

Sample Response

[
  {
    "id": 1,
    "item_type": "jersey",
    "name": "Real Betis Home 2020-21 - XS - Joaquin#17 - Player Version",
    "brand": 5,
    "club": 12,
    "season": 8,
    "condition": 9,
    "detailed_condition": "EXCELLENT",
    "is_replica": false,
    "is_private": false,
    "is_draft": false,
    "design": "STRIPES",
    "main_color": 3,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]

Jersey-Specific Fields

Jerseys have additional fields (see footycollect/collection/models.py:379-506):

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.