Get an Invoice in PDF

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.


invoiceNumber (optional)(string:50)

Invoice number you want to retrieve.

If you are sending multiple invoice numbers, separate each value with a comma.


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, "invoiceNumber": "1234" }

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" }
Peacock