Progtech Informatique Posted March 30, 2021 Share Posted March 30, 2021 When I make a GET request for a sales invoice PDF and I save it as a pdf file it is blank? Has anyone had this issue and resolved it ? Below is the link for instructions on how to get a pdf (bottom of the page). https://developer.sage.com/api/accounting/guides/invoicing/ Link to comment Share on other sites More sharing options...
Progtech Informatique Posted March 30, 2021 Author Share Posted March 30, 2021 I forgot to mention that I am using Node.js and Axios. Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted March 31, 2021 Administrators Share Posted March 31, 2021 Hi, Welcome to the community! Can you provide me with the headers you are passing with this request please? Ben Link to comment Share on other sites More sharing options...
Progtech Informatique Posted March 31, 2021 Author Share Posted March 31, 2021 I am passing the following headers: headers: { Accept: 'application/pdf' } Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted March 31, 2021 Administrators Share Posted March 31, 2021 When the response is received are you getting a 200 OK, then saving the response as a file of type .pdf? Can you attempt this process outside of your application using something like Postman to achieve the same? Link to comment Share on other sites More sharing options...
Progtech Informatique Posted April 12, 2021 Author Share Posted April 12, 2021 Thank you for the reply, but we decided to just create a pdf template from scratch. Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted April 13, 2021 Administrators Share Posted April 13, 2021 Thanks for letting me know, if you decide to revisit this please get in touch. Ben Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now