Close
logo

Exporting Invoices

Git RepositoryEdit on Github
Last update: 2 years ago by luigi mangaReading time: 2 min

Onport offers the opportunity to integrate with external systems, create custom export workflows or customer experiences by using our API.

This article will describe how to export:

  • Customer Invoice by Sales Order
  • Customer Invoice for specific Purchase Order
  • Vendor Invoice by Purchase Order

Customer Invoice by Sales Order

In order to download a PDF with the Customer Invoice for a specific Sales Order, you can send the following cURL request to the https://api.jetti.io/api/sales/:id/print.json endpoint.

curl --request GET \
--url 'https://api.jetti.io/api/sales/:id/print.json' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

The :id will need to be replaced with the Sales Order's id.

Below is the JSON response containing the direct URL to the PDF:

{
"url": "https://url-to-server/folder/purchase-xxxxxxx.pdf"
}

Customer Invoice for specific Purchase Order

In order to download a PDF with the Customer Invoice containing the items specified in the given Purchase Order, you can send the following cURL request to the https://api.jetti.io/api/purchases/:id/print.json endpoint.

curl --request GET \
--url 'https://api.jetti.io/api/purchases/:id/print.json?target=customer' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

The :id will need to be replaced with the Purchase's id.

Below is the JSON response containing the direct URL to the PDF:

{
"link": "https://url-to-server/folder/purchase-xxxxxxx.pdf"
}

Vendor Invoice for specific Purchase Order

The following cURL request will return a PDF with the Vendor Invoice for a specific Purchase Order.

curl --request GET \
--url 'https://api.jetti.io/api/purchases/:id/print.json?scope=invoice' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'

The :id will need to be replaced with the Purchase's id.

Below is the JSON response containing the direct URL to the PDF:

{
"link": "https://url-to-server/folder/purchase-xxxxxxxxx.pdf"
}
๐Ÿ“‚ Exports โ€” Previous
Api Data Exports
Next โ€” ๐Ÿ“‚ Exports
Exporting Packing Slips