Versions Compared

Key

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

Overview

Excerpt

This method allows you to get the content of a certain invoice in bytes.


Request

https://api.kometsales.com/api/invoice.pdf.get

  • Method: GETPOST
  • Content-Type: URL Params application/json

Input Parameters:

  • authenticationToken (required)(string:50): Komet Sales security token.
  • invoiceId (required)(integer:20): ID of the invoice that you want to get. 
  • enableDistributeAdditionalCharges (optional) (boolean: true or false): If it's true the system will distribute the additional charges through the items added to the invoice. By default this value is false. 
  • addAdditionalChargesInUnitPrice (optional) (boolean: true or false). If it's true, the system will show the description of the additional charges in the invoice when they are distributed. If it's false, the system won't show the description of the additional charges in the invoice nor the amount. By default this value its false. This filter will only work when the parameter enableDistributeAdditionalCharges is true.  


Code Block
languagejs
themeConfluence
titleSample
https://api.kometsales.com/api/invoice.pdf.get?
authenticationToken=token_info_goes_here&invoiceId=83934{
  "authenticationToken": "token_goes_here",
  "invoiceId": 11678925
}

Response

Output:

  • status (integer:1): transaction status. 1 for success or 0 for failure.
  • message (string:500): description of the status of the transaction.
  • suggestedFileName (string:50): Suggested file name of the invoice generated. 
  • file (array of bytes): Array of bytes that represents the invoice file generated. 

JSON Viewer
width100%
languagejs
titleSample
height300
 {
  "status": "1",
  "message": "The invoice was successfully generated",
  "suggestedFileName": "Invoice #001626.pdf",
  "file": "00, 37, 80, 68, 70, 45, 49, 46, 52, 10, 37, -30, -29, -49, -45, 10, 52, 32, 48, 32, 111, 98, 106, 32, 60, 60, 47, 67, 111, 108, 111, 114, 83, 112, 97, 99, 101, 47, 68, 101, 118, 105, 99, 101, 82, 71, 66, 47, 83, 117, 98, 116, 121, 112, 101, 47, 73, 109, 97, 103, 101, 47, 72, 00"
 }



Panel
titleRelated Articles

Content by Label
showLabelsfalse
max10
showSpacefalse
sortmodified
cqllabel in ("print-invoice","invoice","order","invoice-creation","invoice-editing")
labelsprint-invoice invoice invoice-creation order invoice-editing