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}
Export Customers CSV
- In order to request customers list as CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/customer/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- You can use Filter variable for this request to filter by Customer Variables.
{
filter: (optional)
}
Export Plans CSV
- In order to request plans as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/plans/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Export Campaigns CSV
- In order to request campaigns as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/campaigns/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Export Payment Schedules CSV
- In order to request payment schedules as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/payment-schedules/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Export One-Time Payments CSV
- In order to request one-time payments as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST /one-time-payments/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Get Invoice HTML
- To request an invoice download as HTML, your request should go to https://api.subsbase.io/exporter/invoices/html
- You can use the following variables to request invoice HTML
{
id: {invoiceId},
extraFees: (optional),
}
Export Invoices CSV
- In order to request an invoices list as CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should look like this:
POST https://api.subsbase.io/exporter/invoices/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- You can use Filter variable for this request to filter by Invoice Variables.
{
filter: (optional)
}
Export Invoice PDF
- In order to request invoices as a PDF, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/invoices/pdf?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- You can use the following variables to request invoices as a 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 Transactions CSV
- In order to request transactions as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/transactions/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on the user's region.
- Before exporting, you must specify the exportable fields in your request. The fields you can specify include:
{
"exportableFields": [
"color",
"age",
"name",
"email",
"location"
]
}
Export Wallet Movements CSV
- In order to request wallet movements as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/wallet-movements/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- The request body should contain the following:
{
"siteId": "test-site",
"customerId": "test-site_17037842261869340177",
"from": "2024-09-30T21:00:00.000Z",
"to": "2024-12-31T21:59:59.999Z",
"currency": [
"",
"EGP",
"USD"
],
"narrativeTemplateId": null,
"format": "CSV"
}
Export Wallet Movements PDF
- In order to request wallet movements as a PDF, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/wallet-movements/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- The request body should contain the following:
{
"siteId": "test-site",
"customerId": "test-site_17037842261869340177",
"from": "2024-09-30T21:00:00.000Z",
"to": "2024-12-31T21:59:59.999Z",
"currency": [
"",
"EGP",
"USD"
],
"narrativeTemplateId": "b9ee387b-1ee6-4c0c-9bfe-3143a182115f",
"format": "PDF"
}
- You must specify a
narrativeTemplateId
to download the account statement as a PDF using the template. You can obtain the id from the Narrative Templates Query.
Export Account Statement CSV
- In order to request an account statement as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/account-statement/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- The request body should contain the following:
{
"siteId": "test-site",
"customerId": "test-site_17037842261869340177",
"from": "2024-09-30T21:00:00.000Z",
"to": "2024-12-31T21:59:59.999Z",
"currency": [
"",
"EGP",
"USD"
],
"narrativeTemplateId": null,
"format": "CSV"
}
Export Account Statement PDF
- In order to request an account statement as a PDF, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/account-statement/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- The request body should contain the following:
{
"siteId": "test-site",
"customerId": "test-site_17037842261869340177",
"from": "2024-09-30T21:00:00.000Z",
"to": "2024-12-31T21:59:59.999Z",
"currency": [
"",
"EGP",
"USD"
],
"narrativeTemplateId": "b9ee387b-1ee6-4c0c-9bfe-3143a182115f",
"format": "PDF"
}
- You must specify a
narrativeTemplateId
to download the account statement as a PDF using the template. You can obtain the id from the Narrative Templates Query.
Export Customer Report PDF
- In order to request a customer report as a PDF, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/customer-report?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- The request body should contain the following:
{
"siteId": "test-site",
"customerId": "test-site_17037842261869340177",
"from": "2024-09-30T21:00:00.000Z",
"to": "2024-12-31T21:59:59.999Z",
"currency": [
"",
"EGP",
"USD"
],
"narrativeTemplateId": "b9ee387b-1ee6-4c0c-9bfe-3143a182115f",
"format": "PDF"
}
- The customer report is always exported as a PDF. You must specify a
narrativeTemplateId
to download the report using the specified template.
Export MRR Reports CSV
- In order to request MRR reports as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/mrr-reports/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Export Term Limit Reports CSV
- In order to request term limit reports as a CSV, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/term-limit-reports/list?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
Export Aging Report PDF
- In order to request an aging report as a PDF, you should send a request to the designated endpoint with the appropriate parameters.
- Then your request should go to:
POST https://api.subsbase.io/exporter/reports/aging-report/?timezone=Africa/Cairo&timezoneOffset=-120
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
timezone
and timezoneOffset
should be configured based on your region.
- Export Customers CSV
- Export Plans CSV
- Export Campaigns CSV
- Export Payment Schedules CSV
- Export One-Time Payments CSV
- Get Invoice HTML
- Export Invoices CSV
- Export Invoice PDF
- Export Transactions CSV
- Export Wallet Movements CSV
- Export Wallet Movements PDF
- Export Account Statement CSV
- Export Account Statement PDF
- Export Customer Report PDF
- Export MRR Reports CSV
- Export Term Limit Reports CSV
- Export Aging Report PDF