Progtech Informatique 0 Posted March 30 Share Posted March 30 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 post Share on other sites
Progtech Informatique 0 Posted March 30 Author Share Posted March 30 I forgot to mention that I am using Node.js and Axios. Link to post Share on other sites
Administrators Ben Smith 11 Posted March 31 Administrators Share Posted March 31 Hi, Welcome to the community! Can you provide me with the headers you are passing with this request please? Ben Link to post Share on other sites
Progtech Informatique 0 Posted March 31 Author Share Posted March 31 I am passing the following headers: headers: { Accept: 'application/pdf' } Link to post Share on other sites
Administrators Ben Smith 11 Posted March 31 Administrators Share Posted March 31 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 post Share on other sites
Progtech Informatique 0 Posted April 12 Author Share Posted April 12 Thank you for the reply, but we decided to just create a pdf template from scratch. Link to post Share on other sites
Administrators Ben Smith 11 Posted April 13 Administrators Share Posted April 13 Thanks for letting me know, if you decide to revisit this please get in touch. Ben Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now