Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Excerpt

This method allows you to add an item to an existing invoice on Komet Sales

. Warning
titleImportant
The invoices created with this method will be subject to a transaction fee of 1.5%

.

Request

URL: https://api.kometsales.com/api/invoice.item.add

Method: POST

Content-Type: application/

json

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.

  • locationId (optional)(integer:20): location Komet Sales internal ID. You can obtain this value from the location.list API method. This only applies

    for

    to companies in Multi-Location mode. 

Note

You can use either orderItemId or the productCode, boxTypeCode, unitsPerBox, and unitType, but you cannot use both parameters at the same time.

Elite soft json viewer
width100%
languagejs
themeConfluence
titleSample 1
height200
{
  "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"
}
270
Elite soft json viewer
width100%
languagejs
themeConfluence
titleSample 2
height

Sample Request

Code Block
{
  "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
}

Response

Output

:

width100%languagejsthemeConfluencetitle
  • status (integer:1): transaction status. 1 for success or 0 for failure.

  • message (string:500): description of the status of the transaction.


Elite soft json viewer

Sample Response

100%
height
Code Block
{
  "status": "1",
  "message": "OK"
}
Panel
titleRelated Articles

Filter by label (Content by label)
showLabelsfalse
max10
showSpacefalse
sorttitle
cqllabel in ("invoice","order","invoice-creation")
labelsinvoice invoice-creation order

title
Info
Tip

Valid Tokens: Company.

Info

Invoices created through this method are subject to a transaction fee of 1.5%.

Multicurrency Option Enabled

If the customer

for who

you are editing an

invoice

Invoice for has a different currency, you should enter prices in your customer's currency

and the

. The system will generate the

invoice

Invoice in your company's currency, based on the exchange rate set up at the transaction time

of the transaction.

.

Filter by label (Content by label)
showLabelsfalse
max5
sorttitle
titleRelated Articles
cqllabel in ( "invoice" , "order" , "invoice-creation" )
labelsinvoice invoice-creation order