Edit product
Update product information
Edit product by Id
HTTP Request
[PUT] /api/v6/products/{id}
Query Parameters
| Parameter | Type | Nullable | Require | Description | |:--------------------------------------------|:---------:|:-------:|:--------:|:-------:|:---------------------------| | product_name | string | | | Product name | | product_code | string | | | Product code | | product_vat | numeric | | | Product VAT | | manufacturer_id | integer | yes | | Manufacturer | | short_description | string | | | Short description | | description | string | | | Description | | is_affiliate | integer | | | Is affiliate product | | category_id | integer | yes | | Product category | | origin_id | integer | yes | | Origin | | unit_id | integer | yes | | Unit of measurement | | cover_price | numeric | | | Retail price | | discount | numeric | | | Product discount | | price_wholesale | numeric | | | Wholesale price | | discount_wholesale | numeric | | | Wholesale discount | | price_average_in | numeric | | | Purchase price | | discount_in | numeric | | | Purchase discount | | price_online | numeric | | | Online selling price | | discount_online | numeric | | | Online selling discount | | saleoff_price | numeric | | | Online discount | | services | bool | | | Is service product | | barcode | string | | | Barcode | | barcode_image | string | | | Barcode image | | attributes | array | | | Attributes | | attributes..attribute_id | integer | yes | | Attribute identifier | | attributes..attribute_name | string | | | Attribute name | | attributes.*.attribute_content | string | | | Attribute content | | custom_fields | array | | | Custom fields | | removed_attachment_ids | integer[] | | | Main contact birthday | | removed_image_ids | integer[] | | | Main contact birthday |
custom_fields can be retrieved from API custom fields list
Example
HTTP Request
PUT api/v6/products/4 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"product_name": "TEST ACCOUNT API"
}
Status
200 OK
Response
{
"message": "Successfully updated",
"id": 4
}
Edit product by code
HTTP Request
[PUT] /api/v6/products/{id}
Query Parameters
| Parameter | Type | Nullable | Require | Description | |:--------------------------------------------|:---------:|:-------:|:--------:|:-------:|:---------------------------| | product_name | string | | | Tên sản phẩm | | product_code | string | | | Mã sản phẩm | | product_vat | numeric | | | VAT sản phẩm | | manufacturer_id | integer | yes | | Nhà sản xuất | | short_description | string | | | Mô tả ngắn | | description | string | | | Mô tả | | is_affiliate | integer | | | Là sản phẩm liên kết | | category_id | integer | yes | | Danh mục sản phẩm | | origin_id | integer | yes | | Nguồn gốc | | unit_id | integer | yes | | Đơn vị tính | | cover_price | numeric | | | Giá bán lẻ | | discount | numeric | | | Chiết khấu sản phẩm | | price_wholesale | numeric | | | Giá bán buôn | | discount_wholesale | numeric | | | Chiết khấu bán buôn | | price_average_in | numeric | | | Giá mua | | discount_in | numeric | | | Chiết khấu giá mua | | price_online | numeric | | | Giá bán online | | discount_online | numeric | | | Chiết khấu bán online | | saleoff_price | numeric | | | Chiết khấu online | | services | bool | | | Là sản phẩm dịch vụ | | barcode | string | | | Mã Barcode | | barcode_image | string | | | Ảnh Barcode | | attributes | array | | | Thuộc tính | | attributes..attribute_id | integer | yes | | Định danh thuộc tính | | attributes..attribute_name | string | | | Tên thuộc tính | | attributes.*.attribute_content | string | | | Nội dung thuộc tính | | custom_fields | array | | | Trường tùy biến | | removed_attachment_ids | integer[] | | | Sinh nhật liên hệ chính | | removed_image_ids | integer[] | | | Sinh nhật liên hệ chính |
custom_fields can be retrieved from API custom fields list
Example
HTTP Request
PUT api/v6/products HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
{
"product_code": "PRODUCT_CODE",
"product_name": "TEST ACCOUNT API"
}
Status
200 OK
Response
{
"message": "Successfully updated"
}