{ "opencollection": "1.0.0", "info": { "name": "Metronome Alerts Contracts API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Contracts", "type": "folder" }, "items": [ { "info": { "name": "Get a contract (v1)", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/get", "body": { "type": "json", "data": "{}" } }, "docs": "This is the v1 endpoint to get a contract. New clients should implement using the v2 endpoint.\n" }, { "info": { "name": "List customer contracts (v1)", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/list", "body": { "type": "json", "data": "{}" } }, "docs": "Retrieves all contracts for a specific customer, including pricing, terms, credits, and commitments. Use this to view a customer's contract history and current agreements for billing management. Returns contract details with optional ledgers and balance information. \n\n⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2 endpoint for enhanced features.\n" }, { "info": { "name": "Create a contract", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/create", "body": { "type": "json", "data": "{}" } }, "docs": "Contracts define a customer's products, pricing, discounts, access duration, and billing configuration. Contracts serve as the central billing agreement for both PLG and Enterprise customers, you can automatically customers access to your products and services directly from your product or CRM.\n\n### Use this endpoint to:\n- PLG onboarding: Automatically provision new self-serve customers with contracts when they sign up.\n- Enterprise sales: Push negotiated contracts from Salesforce with custom pr" }, { "info": { "name": "Amend a contract", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/amend", "body": { "type": "json", "data": "{}" } }, "docs": "Amendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.\n" }, { "info": { "name": "Archive a contract", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/archive", "body": { "type": "json", "data": "{}" } }, "docs": "Permanently end and archive a contract along with all its terms. Any draft invoices will be canceled, and all upcoming scheduled invoices will be voided–also all finalized invoices can optionally be voided. Use this in the event a contract was incorrectly created and needed to be removed from a customer.\n\n#### Impact on commits and credits:\nWhen archiving a contract, all associated commits and credits are also archived. For prepaid commits with active segments, Metronome automatically generates " }, { "info": { "name": "Set a contract usage filter", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/setUsageFilter", "body": { "type": "json", "data": "{}" } }, "docs": "If a customer has multiple contracts with overlapping rates, the usage filter routes usage to the appropriate contract based on a predefined group key. \n\nAs an example, imagine you have a customer associated with two projects. Each project is associated with its own contract. You can create a usage filter with group key `project_id`\non each contract, and route usage for `project_1` to the first contract and `project_2` to the second contract. \n\n### Use this endpoint to:\n- Support enterprise cont" }, { "info": { "name": "Update invoice issue date", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/updateInvoiceIssueDate", "body": { "type": "json", "data": "{}" } }, "docs": "Updates the issue date of a specific DRAFT invoice within a contract. Use this endpoint to reschedule when an invoice should be issued without affecting future billing cycles or the underlying contract terms. Only works with invoices still in DRAFT status, and the new issue date cannot be later than the contract's end date. \n\n### Usage guidelines:\nThis only changes the individual invoice's issue date - it does not modify the recurring invoice schedule of associated charges or commits. To update " }, { "info": { "name": "Update the contract end date", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/updateEndDate", "body": { "type": "json", "data": "{}" } }, "docs": "Update or add an end date to a contract. Ending a contract early will impact draft usage statements, truncate any terms, and remove upcoming scheduled invoices. Moving the date into the future will only extend the contract length. Terms and scheduled invoices are not extended. In-advance subscriptions will not be extended. Use this if a contract's end date has changed or if a perpetual contract ends.\n" }, { "info": { "name": "Get the rate schedule for a contract", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/getContractRateSchedule", "params": [ { "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." } ], "body": { "type": "json", "data": "{}" } }, "docs": "For a specific customer and contract, get the rates at a specific point in time. This endpoint takes the contract's rate card into consideration, including scheduled changes. It also takes into account overrides on the contract. \n\nFor example, if you want to show your customer a summary of the prices they are paying, inclusive of any negotiated discounts or promotions, use this endpoint. This endpoint only returns rates that are entitled.\n" }, { "info": { "name": "Get subscription quantity history", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/getSubscriptionQuantityHistory", "body": { "type": "json", "data": "{}" } }, "docs": "Get the history of subscription quantities and prices over time for a given `subscription_id`. This endpoint can be used to power an in-product experience where you show a customer their historical changes to seat count. Future changes are not included in this endpoint - use the `getContract` endpoint to view the future scheduled changes to a subscription's quantity. \n\nSubscriptions are used to model fixed recurring fees as well as seat-based recurring fees. To model changes to the number of sea" }, { "info": { "name": "Get subscription seats history", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/getSubscriptionSeatsHistory", "body": { "type": "json", "data": "{}" } }, "docs": "Get the history of subscription seats schedule over time for a given `subscription_id`. This endpoint provides information about seat assignments and total quantities for different time periods, allowing you to track how seat assignments have changed over time.\n\n### Use this endpoint to:\n- Track changes to seat assignments over time\n- Get seat schedule for a specific date using the `covering_date` parameter\n- Get seat schedule history with optional date range filtering using `starting_at` and `e" }, { "info": { "name": "Schedule ProService invoice", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/scheduleProServicesInvoice", "body": { "type": "json", "data": "{}" } }, "docs": "Create a new scheduled invoice for Professional Services terms on a contract. This endpoint's availability is dependent on your client's configuration.\n" }, { "info": { "name": "Create historical invoices", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/contracts/createHistoricalInvoices", "body": { "type": "json", "data": "{}" } }, "docs": "Create historical usage invoices for past billing periods on specific contracts. Use this endpoint to generate retroactive invoices with custom usage line items, quantities, and date ranges. Supports preview mode to validate invoice data before creation. Ideal for billing migrations or correcting past billing periods.\n" }, { "info": { "name": "Create a customer and provision a contract.", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/composite/createCustomerWithContract", "body": { "type": "json", "data": "{}" } }, "docs": "Create a new customer and provision a contract. This endpoint's availability is dependent on your client's configuration." }, { "info": { "name": "Create a package", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/packages/create", "body": { "type": "json", "data": "{}" } }, "docs": "Create a package that defines a set of reusable, time-relative contract terms that can be used across cohorts of customers. Packages provide an abstraction layer on top of rate cards to provide an easy way to provision customers with standard pricing. \n\n### **Use this endpoint to:**\n- Model standard pay-as-you-go pricing packages that can be easily reused across customers\n- Define standardized contract terms and discounting for sales-led motions\n- Set aliases for the package to facilitate easy p" }, { "info": { "name": "List contracts associated with a package", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v1/packages/listContractsOnPackage", "params": [ { "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." } ], "body": { "type": "json", "data": "{}" } }, "docs": "For a given package, returns all contract IDs and customer IDs associated with the package over a specific time period. \n\n### Use this endpoint to:\n- Understand which customers are provisioned on a package at any given time for internal cohort management\n- Manage customer migrations to a new package. For example, to migrate all active customers to a new package, call this endpoint, end contracts, and provision customers on a new package.\n\n### **Usage guidelines:**\nUse the **`starting_at`**, **`c" }, { "info": { "name": "Get a contract (v2)", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v2/contracts/get", "body": { "type": "json", "data": "{}" } }, "docs": "Gets the details for a specific contract, including contract term, rate card information, credits and commits, and more. \n\n### Use this endpoint to: \n- Check the duration of a customer's current contract\n- Get details on contract terms, including access schedule amounts for commitments and credits\n- Understand the state of a contract at a past time. As you can evolve the terms of a contract over time through editing, use the `as_of_date` parameter to view the full contract configuration as of th" }, { "info": { "name": "Get contract edit history", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v2/contracts/getEditHistory", "body": { "type": "json", "data": "{}" } }, "docs": "List all the edits made to a contract over time. In Metronome, you can edit a contract at any point after it's created to fix mistakes or reflect changes in terms. Metronome stores a full history of all edits that were ever made to a contract, whether through the UI, `editContract` endpoint, or other endpoints like `updateContractEndDate`. \n\n### Use this endpoint to: \n- Understand what changes were made to a contract, when, and by who\n\n### Key response fields: \n- An array of every edit ever made" }, { "info": { "name": "List customer contracts (v2)", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v2/contracts/list", "body": { "type": "json", "data": "{}" } }, "docs": "For a given customer, lists all of their contracts in chronological order. \n\n### Use this endpoint to:\n- Check if a customer is provisioned with any contract, and at which tier\n- Check the duration and terms of a customer's current contract\n- Power a page in your end customer experience that shows the customer's history of tiers (e.g. this customer started out on the Pro Plan, then downgraded to the Starter plan).\n\n### Usage guidelines:\nUse the `starting_at`, `covering_date`, and `include_archiv" }, { "info": { "name": "Edit a contract", "type": "http" }, "http": { "method": "POST", "url": "https://api.metronome.com/v2/contracts/edit", "body": { "type": "json", "data": "{}" } }, "docs": "The ability to edit a contract helps you react quickly to the needs of your customers and your business.\n\n### Use this endpoint to:\n- Encode mid-term commitment and discount changes\n- Fix configuration mistakes and easily roll back packaging changes\n\n### Key response fields:\n- The `id` of the edit\n- Complete edit details. For example, if you edited the contract to add new overrides and credits, you will receive the IDs of those overrides and credits in the response.\n\n### Usage guidelines:\n- When" } ] } ], "bundled": true }