Documentation

catalog.price.modify

Scope: catalog Permissions: all

catalog.price.modify(fields)

The method modifies elements of product price collection.

Attention!All entities without indicated IDs and not passed and will be deleted.

When operation is successful, returns price resource in the response body.

Parameters

ParameterType Description
fields.product.idstring Price number.
fields.product.prices[]list Fields, corresponding to the available list of fields.

Examples

BX24.callMethod(
    'catalog.price.modify', 
    {
	  fields: {
	      product: {
		    id: 8		  
			prices: [
				{
				  catalogGroupId: 1,
				  currency: USD,
				  price: 2001,			  
				  quantityFrom: 1,
				  quantityTo: 2
				},				
				{
				  catalogGroupId: 1,
				  currency: USD,
				  price: 2001,			  
				  quantityFrom: 3,
				  quantityTo: 4
				},
				{
				  catalogGroupId: 1,
				  currency: USD,
				  price: 2001,			  
				  quantityFrom: 5,
				  id:122
				},
			]
		},
	  }		
	}, 
    function(result)
    {
        if(result.error())
            console.error(result.error().ex);
        else
            console.log(result.data());
});
© «Bitrix24», 2001-2024
Up