Skip to main content

Product

APIs related to Getfly's Product feature.

📄️ Add NewAdd a new product### HTTP Request[POST] /api/v6/products### Body 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 || attributes | array | | | Attributes || attributes.*.attribute_id | integer | yes | | Attribute identifier || attributes.*.attribute_name | string | | | Attribute name || attributes.*.attribute_content | string | | | Attribute content || variant_attribute_values | array | | | Variant value || variant_attribute_values.*.value_id | integer | yes | | Variant value identifier |\| variant_attribute_values.*.additional_price | integer | yes | | Variant additional price |\| 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](/docs/6.0/product/custom_field) custom fields list***### ExampleHTTP RequesthttpPOST api/v6/products HTTP/1.1Host: example.getflycrm.comContent-Type: application/json{ "product_name": "TEST PRODUCT API", "custom_fields": { "field_1": 111 // field_1 is the field_name in the custom field list }}Status200 OKResponsejson{ "message": "Successfully added", "id": 4}

HTTP RequestPOST] /api/v6/products### Body Parameters| Parameter | Type | Nullable | Require | Description |----------------------------------------------------------|| productname | string | | | Product name || productcode | string | | | Product code || productvat | numeric | | | Product VAT || manufacturerid | integer | yes | | Manufacturer || shortdescription | string | | | Short description || description | string | | | Description || isaffiliate | integer | | | Is affiliate product || categoryid | integer | yes | | Product category || originid | integer | yes | | Origin || unitid | integer | yes | | Unit of measurement || coverprice | numeric | | | Retail price || discount | numeric | | | Product discount || pricewholesale | numeric | | | Wholesale price || discountwholesale | numeric | | | Wholesale discount || priceaveragein | numeric | | | Purchase price || discountin | numeric | | | Purchase discount || priceonline | numeric | | | Online selling price || discountonline | numeric | | | Online selling discount || saleoffprice | numeric | | | Online discount || services | bool | | | Is service product || barcode | string | | | Barcode || attributes | array | | | Attributes || attributes..attribute_id | integer | yes | | Attribute identifier || attributes..attributename | string | | | Attribute name || attributes.*.attributecontent | string | | | Attribute content || variantattributevalues | array | | | Variant value || variantattributevalues..value_id | integer | yes | | Variant value identifier |\| variant_attribute_values..additionalprice | integer | yes | | Variant additional price |\| customfields | array | | | Custom fields |\| removedattachmentids | integer[] | | | Main contact birthday |\| removedimageids | integer[] | | | Main contact birthday |\custom_fields can be retrieved from [API custom fields list### ExampleHTTP Request`httpPOST api/v6/products HTTP/1.1Host application/json{ "productname" { "field1" "Successfully added", "id": 4}`

📄️ DetailsProduct category details### HTTP Request[GET] /api/v6/products/categories/{id}### Query Parameters#### Fields| Fields | Type | Description ||:--------------|---------|:-------------|| id | integer | Identifier || category_name | string | Category name |\| category_code | string | Category code |\| description | string | Description |\| is_default | bool | Is default |\| parent_id | integer | Parent category |\| level | integer | Category level |\### ExampleHTTP RequesthttpGET api/v6/products/categories/4?fields=product_name HTTP/1.1Host: example.getflycrm.comAuthorization: Bearer tokenStatus200 OKResponsejson{ "id": 4, "product_name": "TEST PRODUCT API"}

HTTP Request[GET] /api/v6/products/categories/### Query Parameters#### Fields| Fields | Type | Description ||-------------|| id | integer | Identifier || categoryname | string | Category name |\| categorycode | string | Category code |\| description | string | Description |\| isdefault | bool | Is default |\| parentid | integer | Parent category |\| level | integer | Category level |\### ExampleHTTP Request`httpGET api/v6/products/categories/4?fields=productname HTTP/1.1Host Bearer token`Status`200 OK`Response`json{ "id" "TEST PRODUCT API"}`

📄️ EditEdit product category### HTTP Request[PUT] /api/v6/products/categories/{id}### Query Parameters| Parameter | Type | Nullable | Require | Description ||:--------------|:-------:|:--------:|:-------:|:-------------------------------------------|| category_name | string | | | Product category name || category_code | string | | | Category code || description | string | | | Description || is_default | integer | | | Default category (1/0) || parent_id | integer | | | Parent category identifier (default 1) |\### ExampleHTTP RequesthttpPUT api/v6/products/categories/4 HTTP/1.1Host: example.getflycrm.comContent-Type: application/json{ "product_name": "TEST ACCOUNT API"}Status200 OKResponsejson{ "message": "Successfully updated", "id": 4}

HTTP Request[PUT] /api/v6/products/categories/### Query Parameters| Parameter | Type | Nullable | Require | Description ||-----------------------------------------------------------------|| categoryname | string | | | Product category name || categorycode | string | | | Category code || description | string | | | Description || isdefault | integer | | | Default category (1/0) || parentid | integer | | | Parent category identifier (default 1) |\### ExampleHTTP Request`httpPUT api/v6/products/categories/4 HTTP/1.1Host application/json{ "product_name" "Successfully updated", "id": 4}`