Overview


This method allows you to add items to the staging area of the system.

Request

https://api.kometsales.com/api/inventory.add

  • Method: GET
  • Content-Type: URL Params.


Input parameters:

  • authenticationToken (required): Komet Sales security token.
  • growerId (required if vendorCode is not sent) (integer: 20): Vendor Id in Komet Sales. You can obtain this value from the the vendor.list API method. 
  • vendorCode (required if growerId is not sent) (string: 20): Vendor Code in Komet Sales. You can obtain this value from the the vendor.list API method. 
  • awb (required) (string: 20): AWB number. 
  • isTmpAwb (boolean): defines if the AWB is temporary: 1 = Yes, 0 = No.
  • reference (string: 20): informative reference number.
  • shipDate (required)(date): date when grower sends product, date format YYYY-MM-DD.
  • arrivalDate  (date): date of product arrival at warehouse, date format YYYY-MM-DD.
  • customerId (integer: 20): customer ID.
  • productId (required if productCode is not sent) (integer: 20): Product ID. You can obtain this value from the product.list API method. 
  • productCode (required if productId is not sent) (string: 20): Product Code. You can obtain this value from the the product.list API method. 
  • quantity (required) (integer: 10): quantity of boxes to be added to inventory.
  • boxTypeId (required if boxTypeCode is not sent) (integer: 20): box type ID. You can obtain this value from the  boxtype.list API method. 
  • boxTypeCode (required if boxTypeId is not sent)(string: 10): box type code. You can obtain this value from the boxtype.list API method. 
  • unitType (required) (string: 10): stem or bunch. It's a constant.
  • stemsBunch (required) (integer: 10): stems for bunch.
  • bunches (required) (integer: 10): bunches per box.
  • unitCost (required) (decimal: 10,3): when unitType is bunch you must use the bunch cost. When unitType is stem you must use the stem cost.
  • companyLocationId (integer: 20): company location ID. You can obtain this value from the location.list API method. 
  • notes (string: 200): Any additional notes associated to the product. 
  • markCode (string: 20): the mark code will be printed on the labels.
  • inventoryType (string: 1): use the following options to classify the products in the inventory: L for Local, S for Standing Order, P for Prebook, or M for Open Market.
  • boxCodes (string: 200): you can specify the box codes for your product by separating each box with a comma. Make sure there are no blank spaces in between. If this field is blank the system will automatically create the box codes. The total number of box codes must be equal to the amount set in the quantity parameter for this method.
  • boxReference (string: 20): box reference. This field will be printed on inventory labels.
  • lotNumber (integer: 10): lot # that can be specified for the line added to the inventory. 
  • confirmInventory (boolean): 1 or 0. When it is 1 the product will be automatically confirmed and transferred to the inventory.
  • customField1 (string: 10): alphanumeric text (no more than 20 characters long) to save any "custom" data (e.g. customer code).
  • purchaseOrderItemId (integer: 20) ID of the purchase order line that want to add into the inventory.
  • quantityHold (integer:10): Number of boxes that will be held in the inventory. 
  • priceA (decimal:10,3): The price A. 
  • priceB (decimal:10,3): The price B. 
  • breakdowns: array of breakdowns, i is array index beguin in 0 to breakdowns array size - 1.
    • breakdownProductId [ i ] (number).
    • breakdownBunches [ i ] (number).
    • breakdownStemsBunch [ i ] (number).
    • breakdownUnitCost [ i ] (number).


Input Example
https://api.kometsales.com/api/inventory.add?authenticationToken=your_token_goes_here&growerId=69184&awb=101-1011-1010&unitType=Stem&productId=340442&quantity=5&boxTypeId=901&bunches=12&unitCost=0.78&shipDate=2016-11-22&breakdownProductId[0]=179814&breakdownBunches[0]=5&breakdownStemsBunch[0]=5&breakdownUnitCost[0]=.12&breakdownProductId[1]=157751&breakdownBunches[1]=10&breakdownStemsBunch[1]=6&breakdownUnitCost[1]=.23

Response

Output:

Important

Make sure that all of the products sent through this method have already been mapped in the company. Products marked as UNKNOWN will be skipped.