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, retrieve, update, and delete products by using API.

ProductRequest Object

Attributes


AttributeTypeDescription
namestringName of the product.
typeenumType of the product. Possible values for product type.
productTransactionTypeenumTransaction type of the product. Possible values for product transaction 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.
manufacturingCostAccountCodestringManufacturing cost 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.
autoFulfillmentEnabledbooleanHas the value true if auto fulfillment is enabled for the product or false otherwise.
isFinishedProductbooleanHas the value true if the product is a finished product or false otherwise.
stockUomlongUnit of measurement for stock.
imagesarrayArray of image URLs 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.
customFieldlistList of key-value pairs for custom field name and its value.
bomMetaListlistList of bill-of-materials component details for the product.
bomOperationListlistList of bill-of-materials operation details for the product.
bomAdditionalCostListlistList of bill-of-materials additional cost details for the product.
bomMetaDetailsListlistList of bill-of-materials meta details for the product.
reorderEnabledbooleanHas the value true if the reordering is enabled or false if the reordering is disabled.
reorderLevellongReorder level of the product.
reorderQuantitylongReorder quantity of the product.
reorderVendorCodestringVendor code used for reordering the product.
restockLevelBigDecimalRestock level of the product.
restockBuildQuantityBigDecimalRestock build quantity of the product.
documentSequenceCodestringUnique code associated with the product.
sequenceFormatstringSequence format id.
advancedTrackingenumAdvanced tracking type of the product. Possible values for advanced tracking type.
advancedTrackingMetaDatalistList of advanced tracking (batch/serial) details for the product.
exciseRateIndoBigDecimalExcise rate for Indonesia.
isVariantbooleanHas the value true if the product is a variant of another product or false otherwise.
hasVariantsbooleanHas the value true if the product has variants or false otherwise.
masterProductCodestringCode of the master product, when this product is a variant.
attributeslistList of variant attribute definitions.
variantAttributesmapMap of variant attribute name to value.
multipleUomSchemabooleanHas the value true if the product uses multiple units of measurement or false otherwise.
uomSchemalongIdentifier of the unit of measurement schema used by the product.
bomProductCostDetailslistList of bill-of-materials product cost details.
inventoryWarehouseDetailslistList of warehouse-level inventory details for the product.
reorderVendorNamestringVendor name used for reordering the product.
sourcestringSource of the product record.
landedCostCategoryarrayArray of landed cost categories associated with the product.
barcodeDetailsobjectAdditional barcode details of the product.
productSubstitutesDetailslistList of substitute products for the product.
deferredRevenueAccountCodestringDeferred revenue account code.
unbilledAccountReceivableAccountCodestringUnbilled accounts receivable account code.
basePricedoubleBase price of the product.
revenueRecognitionInfoobjectRevenue recognition details of the product.
valuationMethodenumValuation method of the product. Possible values for valuation method.
deferredExpenseAccountCodestringDeferred expense account code.
amortizationTemplateCodestringAmortization template code.
amortizationPeriodintAmortization period, in months.
hasConsentForImageUpdatebooleanHas the value true if consent was given to update product images or false otherwise.
attachmentsarrayArray of file attachments.
leadTimeDetailslistList of vendor lead time details for the product.
productGroupIdslistList of product group identifiers the product belongs to.
quotePriceEditablebooleanHas the value true if the price is editable on a quotation or false otherwise.
preferredVendorDetailslistList of preferred vendor details for 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);
}

Update Product

Updates the details of an existing product.

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

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

Delete Products

Deletes one or more existing products.

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

public BulkApiResponse deleteProducts(Set<Long> productIds, String accessToken){
return this.productsApiClient.deleteProducts(productIds, accessToken);
}

Search Products

Returns a paginated list of products matching the given filter criteria.

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

public CustomPage<ProductResponse> searchProducts(String search, String barcode, String customfield, String sort,
String sortDir, Integer page, Integer limit, String contactCode, ProductTransactionType productTransactionType,
String accessToken){
return this.productsApiClient.searchProducts(search, barcode, customfield, sort, sortDir, page, limit,
contactCode, productTransactionType, accessToken);
}

Get Product Brief Info

Returns a lightweight list of products, useful for populating product selectors.

Parameters

Code

  @Autowired
private ProductsApiClient productsApiClient;

public List<ProductShortInfo> getProductBriefInfo(String search, Integer page, Integer limit, String accessToken){
return this.productsApiClient.getProductBriefInfo(search, page, limit, accessToken);
}

Toggle Product Status

Activates or deactivates one or more existing products.

Parameters

  • productCodes set of string
  • status boolean
  • accessToken string

Code

  @Autowired
private ProductsApiClient productsApiClient;

public void toggleProductStatus(Set<String> productCodes, Boolean status, String accessToken){
this.productsApiClient.toggleProductStatus(productCodes, status, accessToken);
}

Objects


ProductResponse

ProductResponse includes all attributes of ProductRequest, plus the following response-only attributes.

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.
variantCountintNumber of variants the product has.
recommendedUomlongRecommended unit of measurement identifier for the product.
uomSchemaDtoobjectUnit of measurement schema details of the product.
incomingQtyBigDecimalIncoming quantity of the product.
outgoingQtyBigDecimalOutgoing quantity of the product.
reorderLevelReachedbooleanHas the value true if the product's available quantity has reached its reorder level or false otherwise.
reorderVendorNamestringVendor name used for reordering the product.
hasBuildAssemblybooleanHas the value true if the product has a build assembly or false otherwise.
attachmentsWithLinklistList of attachment details including download links.
isArchivedbooleanHas the value true if the product is archived or false otherwise.

ProductShortInfo

Lightweight product representation returned by Get Product Brief Info.

AttributeTypeDescription
pidstringUnique code assigned to the product.
idlongUnique identifier for the product.
documentSequenceCodestringUnique code associated with the product.
namestringName of the product.
descriptionstringDescription of the product.
typestringType of the product.
barcodestringBarcode of the product.
availableQuantityBigDecimalAvailable quantity of the product.
reservedQuantityBigDecimalReserved quantity of the product.
openingQuantityBigDecimalOpening quantity of the product.
statusbooleanHas the value true if the product is active or false if the product is not active.
categoryCodestringCategory code of the product.
unitPriceBigDecimalUnit price of the product.
taxablebooleanHas the value true if the product is taxable or false if the product is not taxable.
hasVariantsbooleanHas the value true if the product has variants or false otherwise.
isVariantbooleanHas the value true if the product is a variant of another product or false otherwise.
masterProductCodestringCode of the master product, when this product is a variant.
advancedTrackingenumAdvanced tracking type of the product. Possible values for advanced tracking type.
product_transaction_typestringTransaction type of the product.
stockUomintUnit of measurement for stock.
uomSchemalongIdentifier of the unit of measurement schema used by the product.
multipleUomSchemabooleanHas the value true if the product uses multiple units of measurement or false otherwise.
recommendedUomlongRecommended unit of measurement identifier for the product.
uomSchemaDtoobjectUnit of measurement schema details of the product.
salesPriceBigDecimalSales price of the product.
purchasePriceBigDecimalPurchase price of the product.
reorderLevellongReorder level of the product.
reorderQuantitylongReorder quantity of the product.
incomingQtyBigDecimalIncoming quantity of the product.
outgoingQtyBigDecimalOutgoing quantity of the product.
openingValuationBigDecimalOpening valuation of the product.
customFieldlistList of key-value pairs for custom field name and its value.
landedCostCategoryarrayArray of landed cost categories associated with the product.
valuationMethodenumValuation method of the product. Possible values for valuation method.
bomMetaDetailsListlistList of bill-of-materials meta details for the product.
bomOperationListlistList of bill-of-materials operation details for the product.
bomAdditionalCostListlistList of bill-of-materials additional cost details for the product.
bomMetaListlistList of bill-of-materials component details for the product.
restockLevelBigDecimalRestock level of the product.
restockBuildQuantityBigDecimalRestock build quantity of the product.
activebooleanHas the value true if the product is active or false if the product is not active.
warehouseCodestringWarehouse code.
rowCodestringRow code within the warehouse.
rackCodestringRack code within the warehouse.
binCodestringBin code within the warehouse.
rowNamestringRow name within the warehouse.
rackNamestringRack name within the warehouse.
binNamestringBin name within the warehouse.

InventoryDto

AttributeTypeDescription
openingQuantitydoubleOpening quantity of the product.
openingValuationdoubleOpening valuation of the product.
availableQuantitydoubleAvailable quantity of the product.
reservedQuantitydoubleReserved quantity of the product.
unAssignedQuantitydoubleUnassigned quantity of the product.
costOfGoodsSoldAccountCodestringCost of goods sold account code.
inventoryAccountCodestringInventory account code.
wipInventoryAccountCodestringWork-in-progress inventory account code.
stockAdjustmentAccountCodestringStock adjustment account code.
inventoryAccountNamestringInventory account name.
warehouseCodestringWarehouse code.
rowCodestringRow code within the warehouse.
rackCodestringRack code within the warehouse.
binCodestringBin code within the warehouse.
rowNamestringRow name within the warehouse.
rackNamestringRack name within the warehouse.
binNamestringBin name within the warehouse.
landedCostWeightBigDecimalLanded cost weight of the product.

Enums


ProductType

  • TRACKED
  • NONTRACKED
  • BILL_OF_MATERIALS

ProductTransactionType

  • BOTH
  • PURCHASE
  • SALES

AdvancedTrackingType

  • NONE
  • BATCH
  • SERIAL

ValuationMethod

  • FIFO
  • AVERAGE