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

Delete a product from an invoice

DELETE /v1/invoices/:id/products/:rowId

Deletes a single product row from an invoice by row ID. A deleted row cannot be restored through the API — add a new one if needed.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionInvoice ID
ParameterrowId (path) Typenumber Requiredyes DescriptionProduct row ID (from the add or list response)

rowId is the product row ID, not the productId from the product catalog.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/invoices/58/products/1465" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/invoices/58/products/1465" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/58/products/1465', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

if (res.status === 204) {
  console.log('Product deleted from the invoice')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/58/products/1465', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Deleted')
}

Response

On successful deletion the API returns HTTP status 204 No Content with an empty body — success is determined by the status.

Response example

HTTP/1.1 204 No Content

Error response example

404 — invoice or product row not found:

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

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionInvoice or product row not found
HTTP400 CodeINVALID_ROW_ID DescriptionThe rowId in the URL is not a positive integer
HTTP403 CodeSCOPE_DENIED DescriptionAPI key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionAPI key has no configured tokens

Full list of common API errors — Errors.

See also