For AI agents: markdown of this page — /docs-content-en/entities/items/products-update.md documentation index — /llms.txt

Update a product of an item

PATCH /v1/items/:entityTypeId/:id/products/:rowId

Updates a product row of an item. Pass only the fields you want to change.

A field name that is not in the writable set is rejected with 400 INVALID_PARAMS, and the error text lists the writable names. Read-only fields that appear in product-row responses (priceAccount, ownerId, storeId and others) are accepted and ignored. So an object read via GET can be sent back as is.

Use the entityTypeId field from GET /v1/smart-processes in the /v1/items/:entityTypeId path. The type record's internal id is a different identifier. For example, if a type is returned as { "id": 3, "entityTypeId": 174 }, the path starts with /v1/items/174. Use the returned value rather than assuming all type IDs start at 1030.

Parameters

Parameter Type Required Description
ParameterentityTypeId (path) Typenumber Requiredyes DescriptionSmart process type ID. List: GET /v1/smart-processes
Parameterid (path) Typenumber Requiredyes DescriptionItem ID. List: GET /v1/items/:entityTypeId
ParameterrowId (path) Typenumber Requiredyes DescriptionProduct row ID, not the catalog productId. The item's product rows: GET /v1/items/:entityTypeId/:id/products

Request fields (body)

Parameter Type Description
Parameterprice Typenumber DescriptionPrice per unit
Parameterquantity Typenumber DescriptionQuantity
ParameterproductId Typenumber DescriptionProduct ID. Catalog: GET /v1/products
ParameterdiscountTypeId Typenumber DescriptionHow the discount is set: 1 — as an amount in discount, 2 — as a percentage in discountRate. Omitting the field keeps the row's current value — to switch the discount mode, send it explicitly
Parameterdiscount Typenumber DescriptionDiscount amount. Applied only when discountTypeId is 1
ParameterdiscountRate Typenumber DescriptionDiscount percentage. Applied only when discountTypeId is 2
ParametertaxRate Typenumber DescriptionTax rate (%)
ParametertaxIncluded Typeboolean DescriptionTax included in price
Parametersort Typenumber DescriptionSort order

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/items/156/741/products/1471" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "price": 9999, "quantity": 10 }'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/items/156/741/products/1471" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "price": 9999, "quantity": 10 }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/items/156/741/products/1471', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ price: 9999, quantity: 10 }),
})

const { success, data } = await res.json()
console.log('Updated:', data.price, 'x', data.quantity)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/items/156/741/products/1471', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ price: 9999, quantity: 10 }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe full updated product row, with its id unchanged. Row fields — see Product fields

Response example

The main fields are shown. Full list: Product fields.

JSON
{
  "success": true,
  "data": {
    "id": 1471,
    "productId": 1,
    "productName": "Server equipment",
    "price": 9999,
    "quantity": 10,
    "discount": 0,
    "taxRate": null,
    "taxIncluded": false
  }
}

Error response example

404 — product row not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Item not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionThe body contains a field name that is not among the writable fields — see Product fields
HTTP400 CodeINVALID_DYNAMIC_PARAM DescriptionentityTypeId is not a positive integer or is reserved (1, 2, 3, 4, 7, 31)
HTTP400 CodeINVALID_ROW_ID DescriptionrowId is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionThe request body is not an object or contains no recognized product-row fields
HTTP404 CodeENTITY_NOT_FOUND DescriptionProduct row not found
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

See also