Use this method to get the content of an Invoice in bytes.

Valid Tokens: Company and Customer.


Request


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

Method: POST

Content-Type: Application/JSON


Input Parameters

authenticationToken (required)(string:50)

Komet Sales security token.


invoiceId (required)(integer:20)

Invoice ID.


enableDistributeAdditionalCharges (optional)(boolean) 

Distribute additional charges between the Items in the Invoice.

Valid values: True | False  


addAdditionalChargesInUnitPrice (optional)(boolean)

Show description and amount of the additional charges in the Invoice.

This parameter only works if enableDistributeAdditionalCharges is true.

Valid values: True | False

Default is false.


{
  "authenticationToken": "token_goes_here",
  "invoiceId": 11678925
}

Response


status (integer:1)

Transaction status.

Valid values: 1 = Success | 0 = Failure


message (string:500)

Transaction status description.


suggestedFileName (string:50)

Suggested file name of the invoice generated.


file (array of bytes)

An array containing bytes that represent the Invoice file generated. 


 {
  "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"
 }
defaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacockadea2a47-3226-42cd-97e0-48152fdd0605ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock149d3ed5-f2df-42d2-84c8-98441517902adefaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacockadea2a47-3226-42cd-97e0-48152fdd0605ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock149d3ed5-f2df-42d2-84c8-98441517902a