Usage Lines
Overview
Usage Lines represent usage for a subscription and usage product for a single billing period.
Endpoints
Save Usage Lines
- Save Usage Lines For a Pax8 Subscription
- POST /usage/lines?subscriptionId={subscriptionId}&billingPeriod={billingPeriod}
- POST /usage/lines?externalSubscriptionId={externalSubscriptionId}&billingPeriod={billingPeriod}
Get Usage Lines
- Get Usage Lines for a Pax8 Subscription
- GET /usage/lines?subscriptionId={subscriptionId}&billingPeriod={billingPeriod}&summaryKey={summaryKey}
- GET /usage/lines?externalSubscriptionId={externalSubscriptionId}&billingPeriod={billingPeriod}&summaryKey={summaryKey}
Note that
billingPeriod
is a year-month, taking the formatyyyy-MM
.Our API also offers an optional feature that enables Vendors to store a unique identifier on a subscription during provisioning. The externalProvisionerSubscriptionId serves as a reference point for future interactions with the object, making it easy to locate and modify without complex mappings.
The Usage Line Object
{
"summaryKey": "key",
"summaryDisplayName": "name",
"quantity": 1,
"productId": "c53df278-d591-427d-8039-1dc5f4dec15e",
"unitOfMeasurement": "unit"
}
Additional Information
Pax8 Partners may have many usage lines for a subscription, and those lines could be for many different companies, so we offer a grouping mechanism called summaryKey
to aggregate usage lines into summaries.
The most common grouping pattern - and the pattern recommended by Pax8 - is to group usage lines by company.
- Usage Lines are grouped by a
summaryKey
for a Subscription. Every usage line that shares an identicalsummaryKey
will grouped together for display purposes.- The key must be a unique identifier, most often a company id.
- The
summaryDisplayName
is used in the Pax8 UI, this is the label that partners will see on their invoices and throughout the month when monitoring their usage. It gives a friendly name to the group defined by asummaryKey
.- If you are grouping usage by Company ID, then Company name is a good candidate for
summaryDisplayName
- If you are grouping usage by Company ID, then Company name is a good candidate for
NOTE: both
summaryKey
andsummaryDisplayName
have a 255 character limit.
Updated 22 days ago