Skip to main content
PATCH
/
products
/
:id
/
status
curl -X PATCH https://api.kiototeteria.com/products/1/status \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "isActive": true
  }'
{
  "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-16T15:45:00Z"
}

Authentication

This endpoint requires authentication with a JWT token and ADMIN role.
Authorization: Bearer <token>

Path Parameters

id
number
required
The unique identifier of the product to update

Body Parameters

isActive
boolean
required
New active status for the product

Response

id
number
Unique identifier for the product
name
string
Product name
slug
string
URL-friendly unique identifier
description
string
Product description
price
decimal
Product price
isActive
boolean
Updated active status of the product
categoryId
number
ID of the category this product belongs to
createdAt
datetime
Timestamp when the product was created
updatedAt
datetime
Timestamp when the product was last updated
curl -X PATCH https://api.kiototeteria.com/products/1/status \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "isActive": true
  }'
{
  "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-16T15:45:00Z"
}

Build docs developers (and LLMs) love