Exporter API

The Exporter API is part of the exporter service. The exporter service is responsible for handling data export requests as CSV or PDF files.

The exporter service expects 2 headers, the X-SITE-ID and Authorization so the request would be:

POST https://api.subsbase.io/exporter/{destination}
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
{destination} represents where your request is going in our exporter files system.

Here are some examples:

Get Invoice PDF

In order to request invoices download as PDF, your request should go to https://api.subsbase.io/exporter/invoices

  • You can use the following variables to request invoices PDF
    {
        ids: [{invoiceId}],
        extraFees: (optional),
        downloadAll: Boolean,
        filter: (optional)
    }
  • Use ids to specify a set of required invoice IDs.
  • Use downloadAll to download all invoices.
  • Use a filter to apply on downloadAll option. Check Invoice Variables, and Filter.
  • Use extraFees to add the pre-defined extra fees to the requested invoices. Check extra fees from Invoice Subtotal definition.

You should use either ids or downloadAll to request invoices downloads.
At least 1 is mandatory.

Export Invoices CSV

POST https://api.subsbase.io/exporter/invoices/list
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
    {
        filter: (optional)
    }

Export Customers CSV

POST https://api.subsbase.io/exporter/customer/list
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
    {
        filter: (optional)
    }