POST
Products.Update
Partial update for one product. Required field is only id. Send only the fields you want to change (for example stock, status, type, or main_image). Unsent fields stay unchanged. Do not send empty category/price unless you intend to clear them. Product Type (type) options: product (Physical Product), subscription, service, donation (same as dashboard Type dropdown). Main Image: multipart main_image file to biz1upload/site/ (same as dashboard), or path via site_logo_old / main_image_old.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Updates the requested Products record after validating permissions and input fields.
Push Service
Pushes event products.updated to users who should see this change.
Automation
Runs automation event products.updated with the record id and submitted parameters after the action succeeds.
Special Instructions
- Product type (type) allowed values: product = Physical Product; subscription = Subscription; service = Service; donation = Donation.
- When type=subscription, also send months / endless / price_after as needed.
- Default warehouse: default_storage_id from Storage.List (storage.id).
- suppliers_id: multi-select array like dashboard (JSON in DB). Send ["8","12"], suppliers_id[], or a single id. Omit to leave existing suppliers unchanged.
- To replace Main Image: multipart main_image file, or send site_logo_old / main_image_old path. Omit image fields to keep the existing image.
- Optional sub_image / sub_image_old for the secondary image, same biz1upload/site/ folder.
- Stock-only / field-only Updates without images still work unchanged.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
idpost | int | 123 | Product id to update. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
product_namepost | string | Membership | Updates product name. |
typepost | string | subscription | |
cat_idpost | int | 17963 | Updates the main category id from Categories.List. Alias: category. |
sub_cat_idpost | int | 17964 | Updates the sub-category id from Categories.List. |
team_member_idpost | int | 47 | Updates the assigned team member id when stored. |
suppliers_idpost | array | ["8","12"] | Updates supplier ids array (dashboard suppliers_id[]). Stored as JSON. Single id "8" is accepted and saved as ["8"]. Omit to keep existing. |
suppliers_id[]post | array | 8 | Dashboard-style repeated form field for suppliers_id. |
default_storage_idpost | int | 3 | Updates default warehouse id from Storage.List (storage.id). |
main_imagefile | file | product.jpg | Replace Main Image (multipart file). Stored under biz1upload/site/ like dashboard. Omit to keep the current image. |
site_logo_oldpost | string | biz1upload/site/14-ab12cd341712345678.jpg | Already-uploaded main image path (dashboard site_logo_old). Alias: main_image_old. |
sub_imagefile | file | product-alt.jpg | Replace secondary image (multipart). Same biz1upload/site/ folder. |
sub_image_oldpost | string | biz1upload/site/14-xy98ef761712345679.jpg | Already-uploaded secondary image path. |
product_pricepost | number | 99.00 | Updates product_price when stored. |
main_pricepost | number | 99.00 | Dashboard alias for price. |
pricepost | number | 99.00 | Updates price when stored. |
cost_pricepost | number | 40.00 | Updates internal cost price when stored. |
descriptionpost | string | Monthly membership | Updates product description. |
skupost | string | MEM-001 | Updates product SKU when stored. |
product_internal_skupost | string | MEM-INT-001 | Updates internal product SKU when stored. |
discount_pricepost | number | 10.00 | Updates discount price/amount when stored. |
stockpost | int | 10 | Updates stock quantity. |
min_stockpost | int | 2 | Updates minimum stock warning threshold. |
sold_stockpost | int | 0 | Updates sold stock when stored. |
left_stockpost | int | 10 | Updates remaining stock when stored. |
endlesspost | int | 0 | Subscription endless flag (with type=subscription). |
monthspost | int | 12 | Subscription month count (with type=subscription). |
price_afterpost | number | 79.00 | Subscription price after first period (with type=subscription). |
statuspost | int | 1 | Updates active/inactive status when stored. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Products.Update",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"id": "200054",
"product_name": "Membership new product update",
"type": "product"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Products.Update",
"url_domain": "https:\/\/{domain}\/app\/Products.Update"
}Endpoint
POST /app/Products.Update
POST https://{user}.bull36.com/app/Products.Update
POST https://{domain}/app/Products.UpdateSample Output
{
"success": 1,
"id": "200054",
"message": "Record updated successfully.",
"main_image": "biz1upload\/site\/14-ab12cd341712345678.jpg",
"main_image_url": "https:\/\/files.biz1.co.il\/biz1upload\/site\/14-ab12cd341712345678.jpg",
"automation_event": "products.updated",
"socket_event": "products.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
// Field-only update (unchanged)
const body = new URLSearchParams({ id: '200054', product_name: 'Membership new product update', type: 'product' });
const res = await fetch('/app/Products.Update', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());
// Replace Main Image
const form = new FormData();
form.append('id', '200054');
form.append('main_image', fileInput.files[0]);
const res2 = await fetch('/app/Products.Update', {
method: 'POST',
headers: { Authorization: 'Bearer ' + token },
body: form
});
console.log(await res2.json());Error Example
{
"success": 0,
"message": "Record was not found."
}