Exports

Export your business data programmatically using the Core API. Request and download exports for subscriptions, invoices, customers, payments, and more.

Overview

The Core API Exports feature allows you to download large datasets from your Pelcro account. Exports run in the background - you request an export, and when it's ready, you receive an email with a download link.

Enterprise Feature: Exports are available exclusively for Enterprise accounts.


How It Works

  1. Request an export - Send a POST request specifying the data type and filters. You receive an export ID immediately.
  2. Wait for the email - The system processes your request in the background. When complete, you receive an email notification.
  3. Download your file - Use the export ID to download your CSV or ZIP file. Each file can only be downloaded once.

Example: To export all active subscriptions from January 2024, you would request a subscriptions export with date_from set to January 1st, date_to set to January 31st, and status set to active. Within a few minutes, you'll receive an email with a link to download your CSV file.


API Endpoints

MethodEndpointDescription
GET/api/v1/core/exportsList available export types
POST/api/v1/core/exportsRequest a new export
GET/api/v1/core/exports/{uuid}Download a completed export

Important Behaviors

  • Enterprise only: Exports require an enterprise-tier account. Non-enterprise accounts receive a 403.
  • Async processing: Exports are queued and processed in the background. Poll the list endpoint to check status.
  • One at a time: Bulk exports of the same type cannot run simultaneously.
  • Date range limit: Export date ranges are restricted to 6 months maximum.
  • Auto-cleanup: Downloaded export files are automatically deleted from storage after download.

Webhooks

Subscribe to these webhooks to know when an export is ready or has failed, instead of polling.

EventSent when
export.requestedAn export request is accepted
export.completedThe export finished and the file is ready to download
export.downloadedThe export file was downloaded
export.failedThe export failed. The payload includes failed_reason.

See Exports webhooks for the payloads.


Available Export Types

Export TypeWhat You Get
subscriptionsAll subscription details including plan, status, billing cycle, and customer info
membershipsMembership records for membership-type products
invoicesInvoice records with line items, amounts, and payment status
paymentsPayment transactions including amount, method, and status
refundsRefund records with amounts and reasons
customersCustomer profiles including name, email, and account details
customers_metadataCustom metadata fields you've defined for customers
newslettersNewsletter subscription records
addressesCustomer shipping and billing addresses
balance_transactionsCustomer balance credits and debits
credit_noteCredit notes issued to customers
ordersE-commerce order records with fulfillment status
campaign_reportsMarketing campaign performance data
accountingComplete monthly accounting package (11 reports in a ZIP file)

Processing Time

Processing time depends on the amount of data and the current load. Large exports can take several hours. Use the export.completed and export.failed webhooks to know when an export is done.


File Retention

Export files are temporary. Each file can only be downloaded once - after you download it, the file is automatically deleted. If you need the data again, simply request a new export.