Products [API]

Description List Products
Action GET
URL <your URL here>/api/products
Sample request parameters
{"code_eq":"00001"}
		
Sample Successful Response
[{"id":12,"name":"Test Product","description":"Lorem ipsum dolor sit amet, summo copiosae et eam, vim graeco adolescens at, ad eam vocibus platonem. Mutat eloquentiam qui et, everti tritani oblique eu vim, cu maiestatis democritum vix. Ius elit minimum an, mea laoreet fabellas at, ei sint prodesset suscipiantur vim. Mel cu mundi oporteat. Malorum mentitum patrioque ne eam, ius nihil alterum eligendi ut.","part_number":"00001","is_active":true,"status_id":1,"category_id":1,"promote_category":false,"promote_front":false,"price1":null,"price2":null,"price3":null,"created_at":"2016-09-11T20:05:07.000Z","updated_at":"2016-09-11T20:05:07.000Z","image_file_name":null,"image_content_type":null,"image_file_size":null,"image_updated_at":null,"old_id":null,"minimum_quantity":"0.0","vat_class_id":1,"meta_description":null,"measurement_unit_id":null,"package_quantity":null,"has_variants":false,"code_upc":"","import_image_url":null,"import_image_url_updated_at":null,"import_uuid":null,"manufacturer_id":null,"price_msrp":null,"tag_line":null,"code":"00001", "image_url": "https://derickl1yuax.cloudfront.net/uploads/c9de301f/products/images/1/original_original_Fotolia_96350048_XS.jpg?1558921789", "gallery_image_urls": [], "category_path": "Sample Category 2", "product_variants": [{"code": "largebgb","option_values": [{"option": "Size","value": "Large"}]},{"code": "mediumbgb","option_values": [{"option": "Size","value": "Medium"}]}] }]
		
Available parameters code_eq, name_eq, status_id_eq, category_id_eq
code_cont, name_cont, description_cont
*_eq (equals) fields are for exact match
*_cont (contains) fields are for wildcard match  
Description Create Product
Action POST
URL <your URL here>/api/products
Sample request
{"product":{"code":"00001","name":"Test Product","description":"Lorem ipsum dolor sit amet, summo copiosae et eam, vim graeco adolescens at, ad eam vocibus platonem. Mutat eloquentiam qui et, everti tritani oblique eu vim, cu maiestatis democritum vix. Ius elit minimum an, mea laoreet fabellas at, ei sint prodesset suscipiantur vim. Mel cu mundi oporteat. Malorum mentitum patrioque ne eam, ius nihil alterum eligendi ut.","is_active":true,"status_id":1,"category_id":1,"minimum_quantity":0,"vat_class_id":1,"quantity":10, "quantity_monitor": true}}
		
Sample Successful Response
{"id":12,"name":"Test Product","description":"Lorem ipsum dolor sit amet, summo copiosae et eam, vim graeco adolescens at, ad eam vocibus platonem. Mutat eloquentiam qui et, everti tritani oblique eu vim, cu maiestatis democritum vix. Ius elit minimum an, mea laoreet fabellas at, ei sint prodesset suscipiantur vim. Mel cu mundi oporteat. Malorum mentitum patrioque ne eam, ius nihil alterum eligendi ut.","part_number":"00001","is_active":true,"status_id":1,"category_id":1,"promote_category":false,"promote_front":false,"price1":null,"price2":null,"price3":null,"created_at":"2016-09-11T20:05:07.925Z","updated_at":"2016-09-11T20:05:07.925Z","image_file_name":null,"image_content_type":null,"image_file_size":null,"image_updated_at":null,"old_id":null,"minimum_quantity":"0.0","vat_class_id":1,"quantity":10, "quantity_monitor":true,"meta_description":null,"measurement_unit_id":null,"package_quantity":null,"has_variants":false,"code_upc":"","import_image_url":null,"import_image_url_updated_at":null,"import_uuid":null,"manufacturer_id":null,"price_msrp":null,"tag_line":null,"code":"00001", "gallery_image_urls": [], "category_path": "Sample Category 1", "product_variants": []}
		
Required fields name, category_id
Notes You can also add an image to the product, The following fields are required for images: image_file_name (the file name of the image) image_content_type (the file type of the image, eg image/png or image/jpeg

image_data (base64 encoded image data)

Description Update Product
Action PATCH
URL <your URL here>/api/products/12
Sample  request 
{"product":{"code":"00001","name":"Test Product Change","description":"Lorem ipsum dolor sit amet, summo copiosae et eam, vim graeco adolescens at, ad eam vocibus platonem. Mutat eloquentiam qui et, everti tritani oblique eu vim, cu maiestatis democritum vix. Ius elit minimum an, mea laoreet fabellas at, ei sint prodesset suscipiantur vim. Mel cu mundi oporteat. Malorum mentitum patrioque ne eam, ius nihil alterum eligendi ut.","is_active":true,"status_id":1,"category_id":1,"quantity":9, "minimum_quantity":0,"vat_class_id":1}}
		
Sample Successful
Response
Same as create
Description Update Product Quantity
Action POST
URL <your URL here>/api/products/update_quantity
Sample Request                                      
{
  "code":"APN 1020",
  "quantity":"99"
} 

OR 

{ 
  id":"912398",
  "quantity":"99"
}

OR in case of warehouses
{
	"code": "APN 1020",  //can also use "id": "912398" instead
	"product": {
		"quantities": [{
			"warehouse_id": 1,  //or use "warehouse_code"
			"quantity": 123
		}, {
			"warehouse_id": 2,
			"quantity": 321
		}]
	}
}
		
Sample Successful Response Same as Create


Field descriptions for Products

Name Type Description Required
name string Product name yes
code string Product code no
part_number string Alias for code no
code_upc string UPC code no
description text Product description, shown to customers. HTML is allowed no
is_active boolean Active products are shown yes
status_id integer Product status no
category_id integer Id of product category yes
brand_id integer Id of product brand
no
promote_category boolean Show product on top of products list per category no - default: false
promote_front boolean Show product at homepage for customers no - default: false
minimum_quantity integer Minimum quantity allowed to order no - default: false
vat_class_id integer VAT Class id yes
created_at datetime Create Time auto calculated
updated_at datetime Update Time auto calculated
image_file_name string Main image file name no
image_content_type string Main image content type no
image_data base64 encoded Image data for main product image base64 encoded no
meta_description string Meta description of product (used only when products are public) no
package_quantity integer If the product is a package, how many items are in the package. Used only when displaying product details no
measurement_unit_id integer Measurement unit of the product (eg item, mm, kg etc) no
has_variants boolean Has the product variants? eg colour, size -currently not supported by API no
quantity integer Available quantity no
quantity_monitor boolean Monitor quantity (if false, available quantity is ignored) no
can_backorder boolean This product can be backordered if quantity is less than zero
no
reference_code integer Reference number or code for this product no
pdf_description string Product description that will show in the PDF Catalog no
width decimal Width of the product no
height decimal Height of the product
no
length decimal Length of the product
no
scheduled_at datetime Scheduled availability date
no
import_image_url string -not used no
import_image_url_updated_at datetime -not used no
import_uuid string -not used no
manufacturer_id integer -not used no
price_msrp decimal -not used no
tag_line string -not used no
price1 decimal -not used no
price2 decimal -not used no
price3 decimal -not used no
old_id integer -not used no
image_url list List of main image URLs no
gallery_image_urls 
list List of gallery image URLs  no
privacy_groups
list List of privacy groups allowed to access the product
no
category_path string Name of Parent/Child category no
product_variants dictionary Dictionary of Product Variant parameters no

Still need help? Contact Us Contact Us