Add Inventory

Use this method to add items to the Inventory.

Valid Tokens: Company.

Ensure every product sent through this method is mapped in your company. Products marked as UNKNOWN will be skipped.


Request


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

Method: POST

Content-Type: URL Parameters


Input parameters


authenticationToken (required)

Komet Sales security token.


growerId (optional)(integer:20)

Komet Sales internal Vendor ID.

Required if vendorCode is not sent.

You can get this value from the vendor.list API method. 


vendorCode (optional)(string:20)

Komet Sales internal Vendor Code.

Required if growerId is not sent.

You can get this value from the vendor.list API method. 


awb (required)(string:20)

AWB number. 


isTmpAwb (optional)(boolean)

Defines if the AWB is temporary.

Valid values: 1 = Yes | 0 = No.


reference (optional)(string:20)

Informative reference number.


shipDate (required)(date)

The date when the grower sends the product.

Date format YYYY-MM-DD


arrivalDate  (optional)(date)

The product’s arrival date at the warehouse.

Date format: YYYY-MM-DD


customerId (optional)(integer:20)

Customer ID.


productId (optional)(integer:20)

The product ID. 

Required if productDescription or productCode are not sent.

You can get this value from the product.list API method. 


productCode (optional)(string:20)

Product Code. 

Required if productId or productDescription are not sent.

You can get this value from the product.list API method. 


productDescription (optional)(string:20)

Product Description. 

Required if productId or productCode are not sent.

You can get this value from the product.list API method. 


quantity (required)(integer:10)

The number of boxes to be added to inventory. 

The maximum number of boxes allowed is 100.


boxTypeId (optional)(integer: 20)

The box-type ID.

Required if boxTypeCode is not sent.

You can get this value from the boxtype.list API method. 


boxTypeCode (optional)(string:10)

The box-type code.

Required if boxTypeId is not sent.

You can get this value from the boxtype.list API method. 


unitType (required)(string:10)

The Unit-type.

Valid values: Stem or Bunch.


stemsBunch (required)(integer:10)

The number of Stems per Bunch.


bunches (required)(integer:10)

The number of Bunches per Box.


unitCost (required)(decimal:10,3)

The cost per Unit.

You must use the cost of the selected Unit-type.


companyLocationId (optional)(integer:20)

Location ID. 

You can get this value from the location.list API method. 


notes (optional)(string:200)

Any additional notes associated with the product. 


markCode (string:20)

The mark code to print on the labels.


inventoryType (string:1)

Inventory type.

Valid values: L = Local | S = Standing Order | P = Prebook | M = Open Market.


boxCodes (optional)(string:200)

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 (optional)(string:20)

Box Reference.

This field will be printed on inventory labels.


lotNumber (optional)(string)

The lot number # for the line added to the inventory. 


confirmInventory (optional)(boolean)

Automatically confirm and transfer products to the Inventory.

Valid values: 1 = Yes | 0 = No


customField1 (optional)(string:10)

Alphanumeric text to save any custom data (e.g. customer code).

Maximum characters: 20


purchaseOrderItemId (optional)(integer:20)

The Purchase Order line ID that you want to add to the Inventory.


quantityHold (optional)(integer:10)

The number of Boxes that will be held in the Inventory. 


priceA (optional)(decimal:10,3)

Product’s price A. 


priceB (optional)(decimal:10,3)

Product’s price B. 


breakdowns (optional)(array)

An array of breakdowns; use this array to specify the breakdown of mixed boxes.

It begins with 0 to breakdowns array size - 1.


breakdownProductId (required if breakdowns is sent)(array index)(integer)

The product IDs.

The values must be separated by commas and keep the same sequence order in every breakdown parameter.


breakdownBunches (required if breakdowns is sent)(array index)(integer)

The number of Bunches.

The values must be separated by commas and keep the same sequence order in every breakdown parameter.


breakdownStemsBunch (required if breakdowns is sent)(array index)(integer)

The number of Stems per Bunch.

The values must be separated by commas and keep the same sequence order in every breakdown parameter.


breakdownUnitCost (required if breakdowns is sent)(array index)(decimal: 10,1)

The Unit cost.

The values must be separated by commas and keep the same sequence order in every breakdown parameter.


https://api.kometsales.com/api/inventory.add?authenticationToken={yourtokenhere}&awb=000-000-9913&shipDate=2023-01-28&arrivalDate=2023-01-28&productCode=45h6456k&productDescription=ACHILEA Rose&quantity=10&unitType=Stem&stemsBunch=10&bunches=10&unitCost=1.0&boxTypeCode=HB&vendorCode=569397&customerCode=3456VS&originChannel=data-import-broker&breakdowns=1&breakdownProductCode%5B0%5D=preuba2355&breakdownProductDescription%5B0%5D=Achillea Assorted Bouquet&breakdownBunches%5B0%5D=10&breakdownStemsBunch%5B0%5D=10&breakdownUnitCost%5B0%5D=1.00

Response


status (integer:1)

Transaction status.

Valid values: 1 = Success | 0 = Failure.


message (string:500)

The transaction status description.


boxes (array)

An array containing Box IDs.


{ "status": "1", "message": "OK", "boxes": [ "KS3871981", "KS3871982", "KS3871983" ] }





Peacock