Reporting API v1 - data model
Introduction
This article explains the data model structure of the Reporting API v1 and how to use internal IDs to join data across different endpoints. Understanding the data relationships will help you create comprehensive reports and find related information across multiple data sources.
In this article:
How the data model works
The Reporting API endpoints use the internal IDs of the Platform, which enables joining data from various endpoints to create reports and find related information across different data sources.
Using internal IDs to join data
You can connect data across different endpoints using shared ID fields. For example, if you want to find more information for each invoiced Subscription, you can:
- Take the subscriptionId from the invoice-headers endpoint
- Join it to the subscriptions endpoint using the subscriptionId
- Access all related Subscription details
This approach works across all endpoints in the Reporting API, allowing you to build comprehensive views of your data.
Entity relationship diagram
All the relationships between endpoints are mapped out in the entity relationship diagram shown above. The diagram illustrates how different data entities connect:
Invoices: invoice-headers and invoice-rows endpoints connect to Organizations, Subscriptions, and Contracts
Orders: orders and orders/items endpoints connect to Organizations, Contracts, and Subscriptions
Subscriptions, Offers & Products: subscriptions, offers, offers/properties, and subscription-events endpoints form the core transactional data
Contracts: contracts endpoint links providers and consumers across the hierarchy
Organizations & Organization Details: organizations, organizations/addresses, organizations/contacts, tenants/details, and organizations/details endpoints provide organizational information
The legend explains the notation used in the diagram, with primary keys and foreign keys clearly marked to show relationships between entities.
Summary
The Reporting API v1 uses internal Platform IDs to enable data joining across multiple endpoints, allowing you to create comprehensive reports by connecting related information. You can join data by matching shared ID fields, such as using subscriptionId from invoice-headers to retrieve detailed Subscription information from the subscriptions endpoint. The entity relationship diagram maps all connections between endpoints, showing how Invoices, Orders, Subscriptions, Contracts, and Organizations relate to each other through primary and foreign key relationships. This structure enables flexible reporting and analysis across your entire sales channel data.
Was this article helpful?
Articles in this section
- Reporting API v1 - overview
- Reporting API v2 - overview
- Reporting API v1/v2 - requesting access
- Reporting API v1 - data model
- Reporting API v1 - how to map your invoice data
- Reporting API v1 - detailed invoice line items
- Reporting API v2 - Invoice Taxes
- Reporting API v1 - how to identify organizations in your sales channel
- Reporting API v1 - currencies within the invoices
- Reporting API v1 - preview invoices in status 'New'
Add comment
Please sign in to leave a comment.