Preview how a set of events will affect a customer’s invoices. Generates draft invoices for a customer using their current contract configuration and the provided events. This is useful for testing how new events will affect the customer’s invoices before they are actually processed. Customers on contracts with SQL billable metrics are not supported.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The events to preview
Array of usage events to include in the preview calculation. Must contain at least one event in merge mode.
1 - 100 elementsControls how the provided events are combined with existing usage data. Use replace to calculate the preview as if these are the only events for the customer, ignoring all historical usage. Use merge to combine these events with the customer's existing usage. Defaults to replace.
replace, merge When true, line items with zero quantity are excluded from the response.
Success