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

NameTypeSampleExplanation
id
post
int123Product id to update.

Optional Parameters

NameTypeSampleWhat it gives
product_name
post
stringMembershipUpdates product name.
type
post
stringsubscription
cat_id
post
int17963Updates the main category id from Categories.List. Alias: category.
sub_cat_id
post
int17964Updates the sub-category id from Categories.List.
team_member_id
post
int47Updates the assigned team member id when stored.
suppliers_id
post
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
array8Dashboard-style repeated form field for suppliers_id.
default_storage_id
post
int3Updates default warehouse id from Storage.List (storage.id).
main_image
file
fileproduct.jpgReplace Main Image (multipart file). Stored under biz1upload/site/ like dashboard. Omit to keep the current image.
site_logo_old
post
stringbiz1upload/site/14-ab12cd341712345678.jpgAlready-uploaded main image path (dashboard site_logo_old). Alias: main_image_old.
sub_image
file
fileproduct-alt.jpgReplace secondary image (multipart). Same biz1upload/site/ folder.
sub_image_old
post
stringbiz1upload/site/14-xy98ef761712345679.jpgAlready-uploaded secondary image path.
product_price
post
number99.00Updates product_price when stored.
main_price
post
number99.00Dashboard alias for price.
price
post
number99.00Updates price when stored.
cost_price
post
number40.00Updates internal cost price when stored.
description
post
stringMonthly membershipUpdates product description.
sku
post
stringMEM-001Updates product SKU when stored.
product_internal_sku
post
stringMEM-INT-001Updates internal product SKU when stored.
discount_price
post
number10.00Updates discount price/amount when stored.
stock
post
int10Updates stock quantity.
min_stock
post
int2Updates minimum stock warning threshold.
sold_stock
post
int0Updates sold stock when stored.
left_stock
post
int10Updates remaining stock when stored.
endless
post
int0Subscription endless flag (with type=subscription).
months
post
int12Subscription month count (with type=subscription).
price_after
post
number79.00Subscription price after first period (with type=subscription).
status
post
int1Updates 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.Update

Sample 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."
}