Good morning,
We need to print a detailed invoice for one of our carriers on top of the label. Is there a way to get the invoice .pdf of an order through the API?
The .pdf I would like to get using the API is usually located here: https://app.shiphero.com/dashboard/orders/view_invoice/381998322
Thank you
Hey @hansdaigle,
Thanks for reaching out!
I’ll take a closer look at that and get back to you shortly.
Please let me know if you have any questions or concerns,
Best,
RayanP
Hello @hansdaigle!
Absolutely. You can overwrite the invoice with a custom one.
You can run an order_update
mutation to and send the custom_invoice_url
. This will change the one that ShipHero automatically generates. You can send a multipage PDF if you need to.
More info here: https://developer.shiphero.com/wp-content/uploads/spectaql/#definition-UpdateOrderInput
If you create the order using the API, you can send that field upon creation.
Ensure you are not sending clean URLs; the PDF extension is required.
Have a nice day!
TomasFD
Hey @tomasfd,
Apologies for the lack of clarity in my previous message. What I’m looking to do is to obtain the binary data of a PDF generated at this link: https://app.shiphero.com/dashboard/orders/view_invoice through an API call.
I ended up generating my own invoice. If anyone is interested I can share the code to take any order data (shipment, label request, etc) and produce a .pdf
invoice in Python.