#
3. Update Product
Update Product — Partially update a single product by id. Synchronous; returns the standard response envelope.
#
Variants behavior
variantsomitted → variants unchanged (true PATCH).variants.itemsprovided & non‑empty → treated as the final desired set (update/reactivate existing, create new, deactivate omitted).variants.items: []→ remove all variants (soft‑deactivate) and convert to a simple product.
#
Restrictions
If the product has variants or variants.items is non‑empty, these product‑level fields are not allowed:
price, specialPrice, stock, sku, warehouses.
Product‑level stock is never allowed for variant products.
Stock can exist at one level only per request:
- Simple product:
stockorwarehouses - Variant item:
stockorwarehouses
#
Stock/warehouse rules
Warehouse mode depends on store warehouse count:
0 warehouses
- Simple product: allow product‑level
stock→ updateslistings.stock warehousesnot allowed- Variant‑level stock/warehouses not allowed (no warehouse context)
- Simple product: allow product‑level
1 warehouse
- Simple product: allow product‑level
stockorwarehouses- Both update
listing_warehouses.stockfor the single warehouse - Supabase trigger syncs
listings.stock
- Both update
- Variant product: allow variant‑level
stockorwarehouses- Both update
listing_warehouses.stock - Supabase trigger syncs
listing_variants.stock
- Both update
- Simple product: allow product‑level
>1 warehouses
- Simple product:
stock→ updates all warehouses (listing_warehouses.stock)warehouses→ updates only specified clientIds
- Variant product:
- Variant
stock→ updates all warehouses for that variant - Variant
warehouses→ updates only specified clientIds
- Variant
- Supabase triggers sync aggregate stock to
listings.stock/listing_variants.stock
- Simple product:
#
Warehouse payload rules
warehousesmust include validclientId- When warehouse-level updates are chosen,
warehousescannot be empty
Overview
At a glance
- Contains variant items detail.
- Warehouse support.
- Auth
- HMAC Partner
- Method
PATCH
#
Path
https://partners-api.tocobagus.net/api/v1
/partner/stores/products/{productId}
#
Request
Query parameters: None.
#
Required Headers
#
Request Payload
Content-Type:
application/json
#
Example Body Payload
{
"name": "Ai Yazawa Short Sleeve UTX",
"description": "Comfortable cotton t-shirt, available in multiple colors.",
"sku": "480166",
"price": 200000,
"weight": 250,
"stock": 122,
"dimensions": {
"length": 12,
"width": 12,
"height": 10
},
"minOrder": 5,
"categoryId": "79bd35cd-fab7-4f3c-8d1a-4d5a7886ffbc",
"subCategoryId": "5a543d16-9445-4948-b650-4a9d4ac6de12",
"typeId": "b3b71ff8-001f-44ac-a825-44336df323c4",
"hashtags": [
"uniqlo",
"tshirt",
"yazawa",
"japan",
"unisex"
],
"condition": "NEW",
"photos": [
"https://image.uniqlo.com/UQ/ST3/id/imagesgoods/480166/item/idgoods_00_480166_3x4.jpg?width=369",
"https://image.uniqlo.com/UQ/ST3/AsianCommon/imagesgoods/480166/sub/goods_480166_sub14_3x4.jpg?width=369"
],
"thumbnails": [],
"isPreorder": false,
"preorderPeriod": 0,
"isArchived": false,
"insuranceRequired": true,
"codEnabled": true
}
#
Example Request
curl -X PATCH "http:///partner/stores/products/c16785c6-f55a-4b1d-943c-621db1296357" \
-H "Content-Type: application/json" \
-H "x-signature: bdbb8833fe43671e058b56dace75763a78a2edf8de7365afb6f534d750056e80" \
-H "x-partner-client-id: 2025112012475048491498" \
-H "x-store-client-id: 638765489981529612855" \
-H "x-store-token: stkn__6AbJF05mjvxh7sh" \
-H "x-timestamp: 1758100350458" \
--data '{"name":"Ai Yazawa Short Sleeve UTX","description":"Comfortable cotton t-shirt, available in multiple colors.","sku":"480166","price":200000,"weight":250,"stock":122,"dimensions":{"length":12,"width":12,"height":10},"minOrder":5,"categoryId":"79bd35cd-fab7-4f3c-8d1a-4d5a7886ffbc","subCategoryId":"5a543d16-9445-4948-b650-4a9d4ac6de12","typeId":"b3b71ff8-001f-44ac-a825-44336df323c4","hashtags":["uniqlo","tshirt","yazawa","japan","unisex"],"condition":"NEW","photos":["https://image.uniqlo.com/UQ/ST3/id/imagesgoods/480166/item/idgoods_00_480166_3x4.jpg?width=369","https://image.uniqlo.com/UQ/ST3/AsianCommon/imagesgoods/480166/sub/goods_480166_sub14_3x4.jpg?width=369"],"thumbnails":[],"isPreorder":false,"preorderPeriod":0,"isArchived":false,"insuranceRequired":true,"codEnabled":true}'
const qs = new URLSearchParams({});
const url = "http:///partner/stores/products/c16785c6-f55a-4b1d-943c-621db1296357" + (qs.toString() ? "?" + qs.toString() : "");
const res = await fetch(url, {
method: "PATCH",
headers: {
"x-signature": "bdbb8833fe43671e058b56dace75763a78a2edf8de7365afb6f534d750056e80",
"x-partner-client-id": "2025112012475048491498",
"x-store-client-id": "638765489981529612855",
"x-store-token": "stkn__6AbJF05mjvxh7sh",
"x-timestamp": "1758100350458"
},
body: JSON.stringify({"name":"Ai Yazawa Short Sleeve UTX","description":"Comfortable cotton t-shirt, available in multiple colors.","sku":"480166","price":200000,"weight":250,"stock":122,"dimensions":{"length":12,"width":12,"height":10},"minOrder":5,"categoryId":"79bd35cd-fab7-4f3c-8d1a-4d5a7886ffbc","subCategoryId":"5a543d16-9445-4948-b650-4a9d4ac6de12","typeId":"b3b71ff8-001f-44ac-a825-44336df323c4","hashtags":["uniqlo","tshirt","yazawa","japan","unisex"],"condition":"NEW","photos":["https://image.uniqlo.com/UQ/ST3/id/imagesgoods/480166/item/idgoods_00_480166_3x4.jpg?width=369","https://image.uniqlo.com/UQ/ST3/AsianCommon/imagesgoods/480166/sub/goods_480166_sub14_3x4.jpg?width=369"],"thumbnails":[],"isPreorder":false,"preorderPeriod":0,"isArchived":false,"insuranceRequired":true,"codEnabled":true})
});
const json = await res.json();
console.log(json);
qs := url.Values{}
u := "http:///partner/stores/products/c16785c6-f55a-4b1d-943c-621db1296357"
if q := qs.Encode(); q != "" { u = u + "?" + q }
req, _ := http.NewRequest("PATCH", u, bytes.NewBufferString("{\"name\":\"Ai Yazawa Short Sleeve UTX\",\"description\":\"Comfortable cotton t-shirt, available in multiple colors.\",\"sku\":\"480166\",\"price\":200000,\"weight\":250,\"stock\":122,\"dimensions\":{\"length\":12,\"width\":12,\"height\":10},\"minOrder\":5,\"categoryId\":\"79bd35cd-fab7-4f3c-8d1a-4d5a7886ffbc\",\"subCategoryId\":\"5a543d16-9445-4948-b650-4a9d4ac6de12\",\"typeId\":\"b3b71ff8-001f-44ac-a825-44336df323c4\",\"hashtags\":[\"uniqlo\",\"tshirt\",\"yazawa\",\"japan\",\"unisex\"],\"condition\":\"NEW\",\"photos\":[\"https://image.uniqlo.com/UQ/ST3/id/imagesgoods/480166/item/idgoods_00_480166_3x4.jpg?width=369\",\"https://image.uniqlo.com/UQ/ST3/AsianCommon/imagesgoods/480166/sub/goods_480166_sub14_3x4.jpg?width=369\"],\"thumbnails\":[],\"isPreorder\":false,\"preorderPeriod\":0,\"isArchived\":false,\"insuranceRequired\":true,\"codEnabled\":true}"))
req.Header.Set("x-signature", "bdbb8833fe43671e058b56dace75763a78a2edf8de7365afb6f534d750056e80")
req.Header.Set("x-partner-client-id", "2025112012475048491498")
req.Header.Set("x-store-client-id", "638765489981529612855")
req.Header.Set("x-store-token", "stkn__6AbJF05mjvxh7sh")
req.Header.Set("x-timestamp", "1758100350458")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
b, _ := io.ReadAll(resp.Body)
fmt.Println(string(b))
var client = java.net.http.HttpClient.newHttpClient();
var req = java.net.http.HttpRequest.newBuilder()
.uri(java.net.URI.create("http:///partner/stores/products/c16785c6-f55a-4b1d-943c-621db1296357"))
.header("Content-Type","application/json")
.header("x-signature", "bdbb8833fe43671e058b56dace75763a78a2edf8de7365afb6f534d750056e80")
.header("x-partner-client-id", "2025112012475048491498")
.header("x-store-client-id", "638765489981529612855")
.header("x-store-token", "stkn__6AbJF05mjvxh7sh")
.header("x-timestamp", "1758100350458")
.method("PATCH", java.net.http.HttpRequest.BodyPublishers.ofString("{\"name\":\"Ai Yazawa Short Sleeve UTX\",\"description\":\"Comfortable cotton t-shirt, available in multiple colors.\",\"sku\":\"480166\",\"price\":200000,\"weight\":250,\"stock\":122,\"dimensions\":{\"length\":12,\"width\":12,\"height\":10},\"minOrder\":5,\"categoryId\":\"79bd35cd-fab7-4f3c-8d1a-4d5a7886ffbc\",\"subCategoryId\":\"5a543d16-9445-4948-b650-4a9d4ac6de12\",\"typeId\":\"b3b71ff8-001f-44ac-a825-44336df323c4\",\"hashtags\":[\"uniqlo\",\"tshirt\",\"yazawa\",\"japan\",\"unisex\"],\"condition\":\"NEW\",\"photos\":[\"https://image.uniqlo.com/UQ/ST3/id/imagesgoods/480166/item/idgoods_00_480166_3x4.jpg?width=369\",\"https://image.uniqlo.com/UQ/ST3/AsianCommon/imagesgoods/480166/sub/goods_480166_sub14_3x4.jpg?width=369\"],\"thumbnails\":[],\"isPreorder\":false,\"preorderPeriod\":0,\"isArchived\":false,\"insuranceRequired\":true,\"codEnabled\":true}"))
.build();
var res = client.send(req, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
#
Responses
#
Example Responses
{
"success": true,
"message": "Product updated successfully",
"requestId": "b701bb31-6460-4b13-90cf-4d77cfa5aaa5",
"meta": {
"timestamp": "2026-02-03T22:44:30.805Z",
"durationMs": 604
},
"data": {
"externalId": "8ae500ea-9b4d-4edb-a18f-b99f1d4aa955",
"id": "946b3ffa-5f9e-412e-acf4-eea306736e63",
"hasVariants": true,
"updatedFields": [
"insuranceRequired",
"codEnabled",
"minOrder"
]
}
}
{
"success": false,
"error": {
"code": "AUTH_003",
"message": "Expired or invalid timestamp",
"details": {
"timestamp": "2025-08-23T21:24:48.113Z",
"hint": "Request timestamp must be within 300 seconds",
"context": {
"providedTimestamp": 1755983140094,
"currentTime": 1755984288112,
"ageSeconds": 1148
}
}
},
"requestId": "bffa45ac-6fd4-4f05-b607-2011f03c7f22"
}
{
"success": false,
"error": {
"code": "AUTH_014",
"message": "Access forbidden",
"details": {
"timestamp": "2025-08-23T21:06:04.345Z",
"hint": "Store not found, access blocked, or invalid token",
"context": {
"storeClientId": "638765489981529612495"
}
}
},
"requestId": "ad531908-7fa9-41ea-bcf8-76b6b9c95a05"
}
#
Dictionary
None for this endpoint.
#
Notes
None for this endpoint.