Overview
This method allows you to add an item to an existing invoice on Komet Sales.
Request
https://api.kometsales.com/api/invoice.item.add
- Method: POST
- Content-Type: application/json
Input Parameters:
- authenticationToken (required)(string:50): Komet Sales security token.
- invoiceId (required)(integer:20): The Komet Sales internal Invoice ID that you want to update. You can obtain this value from the invoice.create API method.
- orderItemId (required)(integer:20): Id of the Komet Sales internal inventory item. This field is required if productCode is not given. This value can be obtained from the inventory.list API method.
- productCode (required: if orderItemId is not given)(string:20): Product code of the Komet Sales inventory item. This field is required if orderItemId is not given. You can obtain this value from the product.list API method.
- boxTypeCode (required: if orderItemId is not given)(string:3): Box type code of the Komet Sales inventory item. This field is required if orderItemId is not given. You can obtain this value from the boxtype.list API method.
- unitsPerBox (required: if orderItemId is not given)(integer:10): Units per box.
- unitType (required: if orderItemId is not given)(string:5): Stem or Bunch are the unique valid values.
- boxes (required)(integer:10): Number of boxes.
- price (required) (decimal:10,2): Unit price.
- markCode (optional)(string:20): Item mark code.
- productAlias (optional)(string:50): Product description alias.
- notes (optional)(string:200): Item notes.
- returnAvailableBoxes (optional)(boolean: 1 or 0): Default 0. If it's 1, the response will include the number of boxes available.
You can use either orderItemId or the productCode, boxTypeCode, unitsPerBox and unitType, but you cannot use both parameters at the same time.
Sample 1
{ "authenticationToken": "token_info_goes_here", "invoiceId": 85063, "orderItemId": 9999999, "boxes": 5, "price": 2.50, "markCode": "text for mark code", "productAlias" : "text for product alias", "notes": "text for notes" }
Sample 2
{ "authenticationToken": "token_info_goes_here", "invoiceId": 85063, "productCode": "RS50", "boxTypeCode": "HB", "unitsPerBox": 150, "unitType": "Stem", "boxes": 5, "price": 2.50, "markCode": "text for mark code", "productAlias" : "text for product alias", "notes": "text for notes", "returnAvailableBoxes":1 }