Exporter APIs
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.
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 ondownloadAll
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
In order to request invoices list as CSV, your request should go to https://api.subsbase.io/exporter/invoices/list
then your request should look like:
POST https://api.subsbase.io/exporter/invoices/list
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
- you can use Filter variable for this request to filter by Invoice Variables
{
filter: (optional)
}
Export Customers CSV
In order to request customers list as CSV, your request should go to https://api.subsbase.io/exporter/customers/list
then your request should look like:
POST https://api.subsbase.io/exporter/customer/list
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
- you can use Filter variable for this request to filter by Customer Variables
{
filter: (optional)
}