Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.47 KB

File metadata and controls

58 lines (40 loc) · 1.47 KB

BillaBear.ReceiptApi

All URIs are relative to https://{customerId}.billabear.cloud/api/v1

Method HTTP request Description
downloadReceipt GET /receipt/{receiptId}/download Download Receipt

downloadReceipt

'Blob' downloadReceipt(receipt)

Download Receipt

Returns the pdf blob for the Receipt

Example

import {BillaBear} from 'billa_bear';
let defaultClient = BillaBear.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';

let apiInstance = new BillaBear.ReceiptApi();
let receipt = "receipt_example"; // String | The id of the receipt

apiInstance.downloadReceipt(receipt, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
receipt String The id of the receipt

Return type

'Blob'

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf