Skip to main content
GET
/
products
/
category
/
:categoryId
curl -X GET https://api.kiototeteria.com/products/category/1
[
  {
    "id": 1,
    "name": "Matcha Green Tea",
    "slug": "matcha-green-tea",
    "description": "Premium organic matcha green tea from Japan",
    "price": "12.99",
    "isActive": true,
    "categoryId": 1,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  },
  {
    "id": 2,
    "name": "Jasmine Tea",
    "slug": "jasmine-tea",
    "description": "Fragrant jasmine tea with delicate floral notes",
    "price": "9.99",
    "isActive": true,
    "categoryId": 1,
    "createdAt": "2024-01-14T09:20:00Z",
    "updatedAt": "2024-01-14T09:20:00Z"
  }
]

Path Parameters

categoryId
number
required
The unique identifier of the category

Response

Returns an array of products belonging to the specified category, ordered by creation date (newest first).
products
Product[]
curl -X GET https://api.kiototeteria.com/products/category/1
[
  {
    "id": 1,
    "name": "Matcha Green Tea",
    "slug": "matcha-green-tea",
    "description": "Premium organic matcha green tea from Japan",
    "price": "12.99",
    "isActive": true,
    "categoryId": 1,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  },
  {
    "id": 2,
    "name": "Jasmine Tea",
    "slug": "jasmine-tea",
    "description": "Fragrant jasmine tea with delicate floral notes",
    "price": "9.99",
    "isActive": true,
    "categoryId": 1,
    "createdAt": "2024-01-14T09:20:00Z",
    "updatedAt": "2024-01-14T09:20:00Z"
  }
]

Build docs developers (and LLMs) love