Retrieve all catalog items

GET /api/catalog

Fetches a list of all items currently in the catalog.

Responses

  • 200 application/json

    A list of catalog items. Returns an empty list if none exist.

    Hide response attributes Show response attributes object
    • id integer(int64) Required

      Unique identifier for the catalog item (generated by the server).

    • category string Required

      The category of the item. Determines the structure of 'attributes'.

      Values are tops, dresses, pants, outerwear, shoes, or accessories.

    • item_name string Required

      The name of the catalog item.

    • brand_id string Required

      Identifier for the item's brand.

    • item_url string(url) Required

      URL link to the item's product page.

    • price number(double) Required

      Price of the item.

    • item_img string(url) Required

      URL link to an image of the item.

    • attributes object Required

      Key-value pairs describing item-specific attributes. Required keys depend on the category field.

      Category tops:

      {
        "size": "string",
        "fit": "string",
        "materials": ["string"],
        "pattern": "string",
        "colors": ["string"],
        "neckline": "string",
        "sleeve_length": "string",
        "closure_type": "string"
      }
      

      Category dresses:

      {
        "size": "string",
        "fit": "string",
        "materials": ["string"],
        "pattern": "string",
        "colors": ["string"],
        "sleeve_length": "string",
        "shoulder_exposure": "string",
        "closure_type": "string",
        "back_exposure": "string",
        "neck_line": "string",
        "skirt_length": "string",
        "leg_cut": "string",
        "gender": "string",
        "seasonality": "string"
      }
      

      Category pants:

      {
        "fit": "string",
        "materials": ["string"],
        "pattern": "string",
        "colors": ["string"],
        "length_to_knee": "string",
        "inseam": 0.0,
        "gender": "string",
        "seasonality": "string"
      }
      

      Category outerwear:

      {
        "materials": ["string"],
        "pattern": "string",
        "colors": ["string"],
        "sleeve_length": "string",
        "gender": "string",
        "seasonality": "string"
      }
      

      Category shoes:

      {
        "size": 0.0,
        "wide": "string",
        "colors": ["string"],
        "pattern": "string",
        "materials": ["string"],
        "shoe_height": "string",
        "heels": "string",
        "boots": "string",
        "gender": "string",
        "seasonality": "string"
      }
      

      Category accessories:

      {
        "colors": ["string"],
        "worn": "string",
        "materials": ["string"],
        "closure_type": "string",
        "gender": "string",
        "seasonality": "string"
      }
      

      Additional properties are allowed.

    • item_vector array[number(float)] | null

      Optional 32-dimensional vector embedding for the item. Will be null if not provided or stored.

      At least 32 but not more than 32 elements.

  • 500 application/json

    Internal Server Error

    Hide response attribute Show response attribute object
    • error string Required

      A message describing the error.

GET /api/catalog
curl \
 --request GET 'http://localhost:8000/api/catalog'
Response examples (200)
[
  {
    "id": 42,
    "category": "tops",
    "item_name": "string",
    "brand_id": "string",
    "item_url": "string",
    "price": 42.0,
    "item_img": "string",
    "attributes": {},
    "item_vector": [
      42.0
    ]
  }
]
Response examples (500)
{
  "error": "string"
}