{ "opencollection": "1.0.0", "info": { "name": "Metronome Alerts Invoices API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Invoices", "type": "folder" }, "items": [ { "info": { "name": "Invoice seats", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices/invoice_seats", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates an prorated invoice for a seat addition. As an alternative to this endpoint, you can elect to use automatic seat invoicing feature. Metronome will check for new seat usage every hour and automatically invoice for any new seats. For newly created active customer plans, there will be up to 4 hour delay before the first automatic seat invoice is generated.\n" }, { "info": { "name": "List invoices", "type": "http" }, "http": { "method": "GET", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" }, { "name": "limit", "value": "", "type": "query", "description": "Max number of results that should be returned" }, { "name": "next_page", "value": "", "type": "query", "description": "Cursor that indicates where the next page of results should start." }, { "name": "status", "value": "", "type": "query", "description": "Invoice status, e.g. DRAFT, FINALIZED, or VOID" }, { "name": "type", "value": "", "type": "query", "description": "Filter invoices by type. Defaults to returning all invoice types." }, { "name": "skip_zero_qty_line_items", "value": "", "type": "query", "description": "If set, all zero quantity line items will be filtered out of the response" }, { "name": "sort", "value": "", "type": "query", "description": "Invoice sort order by issued_at, e.g. date_asc or date_desc. Defaults to date_asc." }, { "name": "credit_type_id", "value": "", "type": "query", "description": "Only return invoices for the specified credit type" }, { "name": "contract_id", "value": "", "type": "query", "description": "Only return invoices for the specified contract" }, { "name": "starting_on", "value": "", "type": "query", "description": "RFC 3339 timestamp (inclusive). Invoices will only be returned for billing periods that start at or after this time." }, { "name": "ending_before", "value": "", "type": "query", "description": "RFC 3339 timestamp (exclusive). Invoices will only be returned for billing periods that end before this time." } ] }, "docs": "Retrieves a paginated list of invoices for a specific customer, with flexible filtering options to narrow results by status, date range, credit type, and more. This endpoint provides a comprehensive view of a customer's billing history and current charges, supporting both real-time billing dashboards and historical reporting needs.\n\n### Use this endpoint to:\n- Display historical invoice details in customer-facing dashboards or billing portals.\n- Retrieve current month draft invoices to show cust" }, { "info": { "name": "List invoice breakdowns", "type": "http" }, "http": { "method": "GET", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices/breakdowns", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" }, { "name": "next_page", "value": "", "type": "query", "description": "Cursor that indicates where the next page of results should start." }, { "name": "status", "value": "", "type": "query", "description": "Invoice status, e.g. DRAFT or FINALIZED" }, { "name": "skip_zero_qty_line_items", "value": "", "type": "query", "description": "If set, all zero quantity line items will be filtered out of the response" }, { "name": "limit", "value": "", "type": "query", "description": "Max number of results that should be returned. For daily breakdowns, the response can return up to 35 days worth of breakdowns. For hourly breakdowns, the response can return up to 24 hours. If there are more results, a cursor to the next page is returned." }, { "name": "window_size", "value": "", "type": "query", "description": "The granularity of the breakdowns to return. Defaults to day." }, { "name": "sort", "value": "", "type": "query", "description": "Invoice sort order by issued_at, e.g. date_asc or date_desc. Defaults to date_asc." }, { "name": "credit_type_id", "value": "", "type": "query", "description": "Only return invoices for the specified credit type" }, { "name": "starting_on", "value": "2024-01-01T00:00:00Z", "type": "query", "description": "RFC 3339 timestamp. Breakdowns will only be returned for time windows that start on or after this time." }, { "name": "ending_before", "value": "2024-02-01T00:00:00Z", "type": "query", "description": "RFC 3339 timestamp. Breakdowns will only be returned for time windows that end on or before this time." } ] }, "docs": "Retrieve granular time-series breakdowns of invoice data at hourly or daily intervals. This endpoint transforms standard invoices into detailed timelines, enabling you to track usage patterns, identify consumption spikes, and provide customers with transparency into their billing details throughout the billing period.\n\n### Use this endpoint to:\n- Build usage analytics dashboards showing daily or hourly consumption trends\n- Identify peak usage periods for capacity planning and cost optimization\n-" }, { "info": { "name": "Get an invoice PDF", "type": "http" }, "http": { "method": "GET", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices/:invoice_id/pdf", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" }, { "name": "invoice_id", "value": "6a37bb88-8538-48c5-b37b-a41c836328bd", "type": "path" } ] }, "docs": "Retrieve a PDF version of a specific invoice by its unique identifier. This endpoint generates a professionally formatted invoice document suitable for sharing with customers, accounting teams, or for record-keeping purposes.\n\n### Use this endpoint to:\n- Provide customers with downloadable or emailable copies of their invoices\n- Support accounting and finance teams with official billing documents\n- Maintain accurate records of billing transactions for audits and compliance\n\n### Key response deta" }, { "info": { "name": "Get an invoice", "type": "http" }, "http": { "method": "GET", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices/:invoice_id", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" }, { "name": "invoice_id", "value": "6a37bb88-8538-48c5-b37b-a41c836328bd", "type": "path" }, { "name": "skip_zero_qty_line_items", "value": "", "type": "query", "description": "If set, all zero quantity line items will be filtered out of the response" } ] }, "docs": "Retrieve detailed information for a specific invoice by its unique identifier. This endpoint returns comprehensive invoice data including line items, applied credits, totals, and billing period details for both finalized and draft invoices.\n\n### Use this endpoint to:\n- Display historical invoice details in customer-facing dashboards or billing portals.\n- Retrieve current month draft invoices to show customers their month-to-date spend.\n- Access finalized invoices for historical billing records a" }, { "info": { "name": "List spend invoice breakdowns", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/customers/:customer_id/invoices/spend-breakdowns", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" }, { "name": "include_list_prices", "value": "", "type": "query", "description": "If set, list prices will be returned for each contract usage and subscription line item." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Granularly analyze customer spend patterns by dynamically slicing and dicing costs across any dimension. This endpoint empowers you to break down spending by granular properties like user, organization, model, region, or any custom event property—even if these aren't the default groupings on your invoices. Unlike standard invoice breakdowns, this endpoint focuses purely on spend analysis, making helpful for building powerful cost analytics dashboards that show spend before credit/commit applicat" }, { "info": { "name": "Void an invoice", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/invoices/void", "body": { "type": "json", "data": "{}" } }, "docs": "Permanently cancels an invoice by setting its status to voided, preventing collection and removing it from customer billing. Use this to correct billing errors, cancel incorrect charges, or handle disputed invoices that should not be collected. Returns the voided invoice ID with the status change applied immediately to stop any payment processing.\n" }, { "info": { "name": "Regenerate an invoice", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/invoices/regenerate", "body": { "type": "json", "data": "{}" } }, "docs": "This endpoint regenerates a voided invoice and recalculates the invoice based on up-to-date rates, available balances, and other fees regardless of the billing period.\n\n### Use this endpoint to:\nRecalculate an invoice with updated rate terms, available balance, and fees to correct billing disputes or discrepancies\n\n### Key response fields:\nThe regenerated invoice id, which is distinct from the previously voided invoice.\n\n### Usage guidelines:\nIf an invoice is attached to a contract with a billin" }, { "info": { "name": "Preview events", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/customers/:customer_id/previewEvents", "params": [ { "name": "customer_id", "value": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "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.\n" } ] } ], "bundled": true }