UpdateProduct

Function to update product

PUT https://rest.crmango.com/api/UpdateProduct

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

19 Sent in the request body
product_id integer

Product id

product_name varchar

Product name

cost_price integer

Product cost price

product_code varchar

Product code

measure_unit integer

Measure unit id

cost_type integer

Cost type id

currency varchar

Currency

service varchar

Service

product_code_is varchar

Product code in information service

list_price integer|float

List price

price_type integer

Price type

vat_value integer

VAT value

analytics varchar

Accounting Analytics

ean varchar

EAN

categories array

Product categories

in_stock integer

Count products in stock

in_stock_partner integer

Count products in stock (partner)

min_price integer|float

Minimum price

card_type integer

Product card type

Response

2 HTTP 200

Function to update product

code integer

Return code

message varchar

Info message

Example request

curl --request PUT \
  --url 'https://rest.crmango.com/api/UpdateProduct' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    {
        "product_id": 365,
        "product_name": "PC HP",
        "cost_price": 100,
        "product_code": 1,
        "measure_unit": 0,
        "cost_type": 0,
        "currency": 202,
        "service": 8,
        "product_code_is": "PC-1234",
        "list_price": 400,
        "price_type": 0,
        "vat_value": 0,
        "analytics": "Test",
        "ean": "HJP23",
        "categories": [
            "Computers",
            "HP"
        ],
        "in_stock": 25,
        "in_stock_partner": 30,
        "min_price": 300,
        "card_type": 0
    }
  }'
{
    "code": 201,
    "message": "Product has been updated"
}