Skip to main content

Product Service

Product describe the goods or services you are offering to your customers or vendors. For example, you might offer Essential and Premium version of your product. Offering of each version of your product would be separate product with different pricing. You can create, and retrieve products by using API.

ProductRequest Object

Attributes


AttributeTypeDescription
namestringName of the product.
typeenumType of the product. Possible values for product type.
barcodestringBarcode of product.
descriptionstringDescription of the product.
purchasePricedoublePurchase price of the product.
salesPricedoubleSales price of the product.
purchaseAccountCodestringPurhcase account code.
salesAccountCodestringSales account code.
purchaseReturnAccountCodestringPurchase return account code.
salesReturnAccountCodestringSales return account code.
purchaseTaxCodestringPurchase tax code.
salesTaxCodestringSales tax code.
purchasePriceTaxInclusivebooleanHas the value true if the purchase price of the product is inclusive of tax or false if the purchase price of the product is exclusive of tax.
salesPriceTaxInclusivebooleanHas the value true if the sales price of the product is inclusive of tax or false if the sales price of the product is exclusive of tax.
stockUomlongUnit of measurement for stock.
imagesstringImage of the product.
inventoryInventoryDtoInventory information of the product.
categoryCodestringCategory code of product.
categoryDescstringCategory description of product.
taxablebooleanHas the value true if the product is taxable or false if the product is not taxable.
customFieldjsonobjectKey-value pair for custom field name and its value.
reorderEnabledbooleanHas the value true if the reordering is enabled or false if the reordering is disabled.
reorderLevellongReorder level of the product.

API


Create Product

Creates a new product

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

public ProductResponse createProduct(ProductRequest productRequest, String accessToken){
return this.productsApiClient.createProduct(productRequest, accessToken);
}

List All Products

Returns list of products.

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

public List<ProductShortInfo> getProducts(String accessToken){
return this.productsApiClient.getProductBriefInfo(accessToken);
}

Objects


ProductResponse

AttributeTypeDescription
idlongUnique identifier for the product.
productIdstringUnique code assigned to the product.
activebooleanHas the value true if the product is active or false if the product is not active.
deletedbooleanHas the value true if the product is deleted or false if the product is not deleted.
namestringName of the product.
typeenumType of the product. Possible values for product type.
barcodestringBarcode of product.
descriptionstringDescription of the product
purchasePricedoublePurchase price of the product.
salesPricedoubleSales price of the product.
purchaseAccountCodestringPurhcase account code.
salesAccountCodestringSales account code.
purchaseReturnAccountCodestringPurchase return account code.
salesReturnAccountCodestringSales return account code.
purchaseTaxCodestringPurchase tax code.
salesTaxCodestringSales tax code.
purchasePriceTaxInclusivebooleanHas the value true if the purchase price of the product is inclusive of tax or false if the purchase price of the product is exclusive of tax.
salesPriceTaxInclusivebooleanHas the value true if the sales price of the product is inclusive of tax or false if the sales price of the product is exclusive of tax.
stockUomlongUnit of measurement for stock.
imagesstringImage of the product.
inventoryInventoryDtoInventory information of the product.
categoryCodestringCategory code of product.
categoryDescstringCategory description of product.
taxablebooleanHas the value true if the product is taxable or false if the product is not taxable.
customFieldjsonobjectKey-value pair for custom field name and its value.
reorderEnabledbooleanHas the value true if the reordering is enabled or false if the reordering is disabled.
reorderLevellongReorder level of the product.

InventoryDto

AttributeTypeDescription
openingQuantitydoubleOpening quantity of the product.
openingValuationdoubleOpening valuation of the product.
availableQuantitydoubleAvailable quantity of the product.
costOfGoodsSoldAccountCodestringCost of goods sold account code.
inventoryAccountCodestringInventory account code.
stockAdjustmentAccountCodestringStock adjustment account code.
inventoryAccountNamestringInventory account name.
warehouseCodestringWarehouse code.

Enums


ProductType

  • TRACKED
  • NONTRACKED
  • BILL_OF_MATERIALS