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

Delete a price type

DELETE /v1/catalog-price-types/:id

Deletes a catalog price type. The deleted record and its related data cannot be restored through the API.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionPrice type ID, a non-negative integer. List: List price types.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-price-types/19" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-price-types/19" \
  -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/catalog-price-types/19', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

if (res.status === 204) {
  console.log('Price type deleted')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-price-types/19', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Price type deleted')
}

Response

Successful deletion returns HTTP status 204 No Content with an empty body. The response status indicates success.

Response example

http
HTTP/1.1 204 No Content

Error response example

404 — the price type does not exist, for example when deleting it again:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "priceType does not exist."
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionDuring the check before deletion, Bitrix24 reported that no price type exists with this id.
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe check before deletion returned an empty price type record.
HTTP422 CodeBASE_PRICE_TYPE_CANNOT_DELETE DescriptionThe price type is the base type: its base is Y.
HTTP400 CodeINVALID_PARAMS Descriptionid is not a non-negative integer, for example abc.
HTTP400 CodeINVALID_PARAMS DescriptionBitrix24 rejected the request parameters.
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request. The reason is in error.message.
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe user does not have the Bitrix24 “Manage price types” permission.
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is in read-only mode.
HTTP403 CodeSCOPE_DENIED DescriptionThe key does not have the catalog scope.
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was omitted.
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 tokens configured. For an OAuth application key, check the user session.

For the full list of common API errors, see Errors.

Known specifics

Deleting a price type also deletes every product price assigned to that type and its rounding rules on the Bitrix24 account. Before calling the method, check the record with Get a price type and find related prices with List prices.

See also