Xero Purchase Order to PDF

Hi all,

Has anyone worked out how to get a PDF file from a purchase order in Xero?

I tried using HTML get a file but it returns a json. And there doesn’t seem to be a way to convert the json in the automation into a PDF.

I tried making an 0auth 2 API call but Xero just error 500s me for 2 days straight.

Anyone else had any luck?

1 Like

Hi @ANna4,

This is possible using Xero’s Make app. Please select the “Make an API Call” action (Pictured)

and use the following endpoint

GET /PurchaseOrders/{PurchaseOrderID}/pdf

Hope this helps!

-@Trainward_Consulting

Hey @Trainward_Consulting - thank you so much for your response! When I tried this I got the following error.

Am I doing something wrong?

@ANna4,

You may need to adjust the url and test a few variations out.

This is what the endpoint should appear as:

GET https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/pdf

maybe try adding “/2.0/” to your endpoint field?