Skip to main content

Update Featured

PUT /v2/product/featured

Replaces the entire list of featured items for a given tenant by overwriting the existing items array. This endpoint uses the same item resolution logic as the create endpoint and requires a single tenant ID in the request body (not "all" or an array). Returns the updated featured items record with all current items and metadata.

Request Body

{
"tenant": "685498954146b339e63e71b1",
"items": ["68549a7f4cc986b856bee476", "6401cd426edb8f9e16ffc0d1" ]
}

Response Example Success

{
"_id": "6822f76f16919b80ca161e6e",
"tenant": "6401cd426edb8f9e16ffc0d1",
"items": [
{
"group_id": "41dce70d-818e-4477-93a9-13814d165569",
"name": "iPhone 16 MAX black",
"description": "",
"ingress": "",
"media": [],
"type": 3,
"price": 13900
},
{
"group_id": "df2c0dea-7d34-4b07-9a79-8734802677d8",
"name": "QSFP28-CWDM4-100G-C",
"description": "",
"ingress": "",
"media": [
"https://api.zit.red/v1/files/public/tenants/6065a9eb6783e09eb34bb844/products/df2c0dea-7d34-4b07-9a79-8734802677d8/verygood-1744267103566-688830606.jpg"
],
"type": 3,
"price": 129.64
},
{
"id": "67165acb5184d1a1f532324f",
"name": "Subscription service",
"description": "{\"blocks\":[{\"key\":\"adu9o\",\"text\":\"\",\"type\":\"unstyled\",\"depth\":0,\"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}",
"image": "https://api.zit.red/v1/files/product/6065a9eb6783e09eb34bb844/67165acb5184d1a1f532324f/logo.png",
"type": 1
}
],
"created": "2025-05-13T07:40:31.721Z",
"updated": "2025-05-13T07:45:12.123Z",
"__v": 0
}

Response Example Error

{
"error": "No tenant provided"
}