Connecting to ChartMogul
Using API Key Authentication
ChartMogul uses API Key authentication. To obtain an API Key:
- Log in to your ChartMogul account at https://app.chartmogul.com
- Navigate to Settings > API Keys
- Click "Add API Key" to generate a new key
- Copy the generated API Key (it will only be shown once)
After obtaining your API Key, set the following connection properties:
- AuthScheme: Set this to APIKey.
- APIKey: Set this to your ChartMogul API Key.
Connecting to ChartMogul
Once the authentication is configured, you can connect to ChartMogul and query data from any of the available tables such as Customers, Subscriptions, Invoices, and metrics.
Available Tables
The ChartMogul API Profile provides access to the following tables:
- Account: Retrieve account information including currency and timezone settings
- Customers: Access customer records with subscription and revenue data
- Subscriptions: Query customer subscriptions with billing and revenue details
- Invoices: Access invoice records with line items and transaction details
- Plans: Retrieve billing plans with pricing and interval configuration
- Activities: Query revenue activities across all customers with MRR movement tracking
- Opportunities: Access sales opportunities with deal tracking and forecasting
- Tasks: Retrieve customer-related tasks with assignment and due date tracking
- Metrics: Query comprehensive revenue metrics including MRR, ARR, ARPA, ASP, LTV, and churn rates
Important Notes
- The ChartMogul API uses cursor-based pagination for most endpoints to efficiently handle large datasets.
- Metrics endpoints require StartDate and EndDate parameters to retrieve time-series data.
- Some tables like Subscriptions and PlanGroupPlans require parent identifiers (e.g., CustomerUuid, PlanGroupUuid) for querying.
- Date fields use ISO-8601 format, and revenue amounts are represented in cents.
- Rate limiting applies - refer to ChartMogul API documentation for current limits.
API Documentation
For more information about the ChartMogul API, see the official ChartMogul API documentation.
Usage Examples
Account:
SELECT * FROM Account
Activities:
SELECT * FROM Activities
ActivitiesExport:
SELECT * FROM ActivitiesExport WHERE Id = 'export_123abc'
BulkImportStatus:
SELECT * FROM BulkImportStatus WHERE DataSourceUuid = 'ds_uuid123' AND ImportId = 'import_456'
Contacts:
SELECT * FROM Contacts
CustomerActivities:
SELECT * FROM CustomerActivities WHERE CustomerUuid = 'cus_abc123'
CustomerAttributes:
SELECT * FROM CustomerAttributes WHERE CustomerUuid = 'cus_abc123'
CustomerInvoices:
SELECT * FROM CustomerInvoices WHERE CustomerUuid = 'cus_abc123'
CustomerNotes:
SELECT * FROM CustomerNotes
Customers:
SELECT * FROM Customers
CustomerSearch:
SELECT * FROM CustomerSearch WHERE Email = '[email protected]'
DataSources:
SELECT * FROM DataSources
Invoices:
SELECT * FROM Invoices
InvoiceLineItems:
SELECT * FROM InvoiceLineItems WHERE Uuid = 'li_abc123'
MetricsAll:
SELECT * FROM MetricsAll WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsARPA:
SELECT * FROM MetricsARPA WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsARR:
SELECT * FROM MetricsARR WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsASP:
SELECT * FROM MetricsASP WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsChurnRate:
SELECT * FROM MetricsChurnRate WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsCustomerCount:
SELECT * FROM MetricsCustomerCount WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsLTV:
SELECT * FROM MetricsLTV WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsMRR:
SELECT * FROM MetricsMRR WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
MetricsMRRChurnRate:
SELECT * FROM MetricsMRRChurnRate WHERE StartDate = '2024-01-01' AND EndDate = '2024-12-31'
Opportunities:
SELECT * FROM Opportunities
PlanGroupPlans:
SELECT * FROM PlanGroupPlans WHERE PlanGroupUuid = 'plg_abc123'
PlanGroups:
SELECT * FROM PlanGroups
Plans:
SELECT * FROM Plans
SubscriptionEvents:
SELECT * FROM SubscriptionEvents
Subscriptions:
SELECT * FROM Subscriptions WHERE CustomerUuid = 'cus_abc123'
Tasks:
SELECT * FROM Tasks
Transactions:
SELECT * FROM Transactions WHERE Uuid = 'tr_abc123'
Connection Properties
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.
| Property | Description |
| APIKey | Your ChartMogul API Key. |
| AuthScheme | The scheme used for authentication. Accepted entries are APIKey or None. Allowed values are: BASIC, NONE, NTLM, OAUTH, APIKEY, OAUTH_CLIENT |