Global API
Request

Get PDF Response

2min

The request includes the following parameters.

Field Name

Data Type

Description

referenceId

string

Internal Id of the Transaction

type

string

Pass the type of the Xero Transaction (invoice/ bill/ purchaseorder/ creditnote).

Supported Transactions Types:

  • Invoice - Pass the type as invoice
  • Bill - Pass the type as bill  
  • Purchase Order - Pass the type as purchaseorder
  • Credit Note - Pass the type as creditnote
Request
Response


Use the response to Download the PDF of the transaction. Either we can write some javascript to download the blob content or use the Salesforce Attachment object or a combination of both.

Sample Usage of the response:

Apex


In the above code sample, we are using the Attachment object (attach the PDF to any Salesforce record).

You can even use the Document object in place of the Attachment object.

Updated 03 Mar 2023
Doc contributor
Doc contributor
Did this page help you?