Overview

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

Request

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): ID of the invoice that you want to get. 

Sample
{
  "authenticationToken": "token_info_goes_here",
  "invoiceId": 354002
 }

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. 

Sample
 {
  "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"
 }