Get a catalog item by ID

GET /api/catalog/{id}

Retrieves the details of a specific catalog item using its unique ID.

Path parameters

  • id integer(int64) Required

    The unique integer ID of the catalog item.

    Minimum value is 1.

Responses

  • 200 application/json

    Successfully retrieved catalog item details. The item_vector field will be present and contain the 32-element array if stored, or it will be null (or potentially omitted depending on server encoding settings if omitempty is used) if not stored.

    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.

  • 400 application/json

    Bad Request (Invalid ID format).

    Hide response attribute Show response attribute object
    • error string Required

      A message describing the error.

  • 404 application/json

    Not Found (Item with the specified ID does not exist).

    Hide response attribute Show response attribute object
    • error string Required

      A message describing the error.

  • 500 application/json

    Internal Server Error

    Hide response attribute Show response attribute object
    • error string Required

      A message describing the error.

GET /api/catalog/{id}
curl \
 --request GET 'http://localhost:8000/api/catalog/{id}'
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 (400)
{
  "error": "string"
}
Response examples (404)
{
  "error": "string"
}
Response examples (500)
{
  "error": "string"
}