openapi: 3.0.1 info: title: Metronome Alerts Contracts API version: 1.0.0 description: '[Alerts](https://docs.metronome.com/connecting-metronome/alerts/) monitor customer spending, balances, and other billing factors. Use these endpoints to create, retrieve, and archive customer alerts. To view sample alert payloads by alert type, navigate [here.](https://docs.metronome.com/manage-product-access/create-manage-alerts/#webhook-notifications)' servers: - url: https://api.metronome.com description: Production server security: - bearerAuth: [] tags: - name: Contracts description: A contract defines a customer’s products, pricing, discounts, commitments, and more. Use these endpoints to create and update contracts data. paths: /v1/contracts/get: post: description: 'This is the v1 endpoint to get a contract. New clients should implement using the v2 endpoint. ' operationId: getContract-v1 summary: Get a contract (v1) tags: - Contracts requestBody: description: Contract and customer IDs content: application/json: schema: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid contract_id: type: string format: uuid include_ledgers: type: boolean description: Include commit ledgers in the response. Setting this flag may cause the query to be slower. include_balance: type: boolean description: Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Contract' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc customer_id: e3fd63fd-fc9f-4153-a543-1fc2261a0e1c initial: name: My contract rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false ledger: - invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 timestamp: '2020-03-01T00:00:00.000Z' type: PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION segment_id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: [] scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc reseller_royalties: [] usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice current: rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc reseller_royalties: [] usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice amendments: - id: 4e2fab26-31ea-473c-b07d-1ce10e7c0146 starting_at: '2020-04-01T00:00:00.000Z' scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' commits: [] overrides: [] created_at: '2019-12-31T16:12:45.123Z' created_by: Bob custom_fields: x_account_id: KyVnHhSBWl7eY2bl '404': $ref: '#/components/responses/NotFound' /v1/contracts/list: post: description: "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" operationId: listContracts-v1 summary: List customer contracts (v1) tags: - Contracts requestBody: description: List all contracts for a customer content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid include_ledgers: type: boolean description: Include commit ledgers in the response. Setting this flag may cause the query to be slower. include_balance: type: boolean description: Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower. include_archived: type: boolean description: Include archived contracts in the response starting_at: description: Optional RFC 3339 timestamp. If provided, the response will include only contracts where effective_at is on or after the provided date. This cannot be provided if the covering_date filter is provided. type: string format: date-time covering_date: type: string format: date-time description: Optional RFC 3339 timestamp. If provided, the response will include only contracts effective on the provided date. This cannot be provided if the starting_at filter is provided. example: customer_id: 9b85c1c1-5238-4f2a-a409-61412905e1e1 responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Contract' example: data: - id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc customer_id: e3fd63fd-fc9f-4153-a543-1fc2261a0e1c initial: name: My contract rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false ledger: - invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 timestamp: '2020-03-01T00:00:00.000Z' type: PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION segment_id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: [] scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc reseller_royalties: [] usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice current: rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc reseller_royalties: [] usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice amendments: - id: 4e2fab26-31ea-473c-b07d-1ce10e7c0146 starting_at: '2020-04-01T00:00:00.000Z' scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' commits: [] overrides: [] created_at: '2019-12-31T16:12:45.123Z' created_by: Bob custom_fields: x_account_id: KyVnHhSBWl7eY2bl '404': $ref: '#/components/responses/NotFound' /v1/contracts/create: post: description: '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. ### Use this endpoint to: - PLG onboarding: Automatically provision new self-serve customers with contracts when they sign up. - Enterprise sales: Push negotiated contracts from Salesforce with custom pricing and commitments - Promotional pricing: Implement time-limited discounts and free trials through overrides ### Key components: #### Contract Term and Billing Schedule - Set contract duration using `starting_at` and `ending_before` fields. PLG contracts typically use perpetual agreements (no end date), while Enterprise contracts have fixed end dates which can be edited over time in the case of co-term upsells. #### Rate Card If you are offering usage based pricing, you can set a rate card for the contract to reference through `rate_card_id` or `rate_card_alias`. The rate card is a store of all of your usage based products and their centralized pricing. Any new products or price changes on the rate card can be set to automatically propagate to all associated contracts - this ensures consistent pricing and product launches flow to contracts without manual updates and migrations. The `usage_statement_schedule` determines the cadence on which Metronome will finalize a usage invoice for the customer. This defaults to monthly on the 1st, with options for custom dates, quarterly, or annual cadences. Note: Most usage based billing companies align usage statements to be evaluated aligned to the first of the month. Read more about [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/). #### Overrides and discounts Customize pricing on the contract through time-bounded overrides that can target specific products, product families, or complex usage scenarios. Overrides enable two key capabilities: - Discounts: Apply percentage discounts, fixed rate reductions, or quantity-based pricing tiers - Entitlements: Provide special pricing or access to specific products for negotiated deals Read more about [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/). #### Commits and Credits Using commits, configure prepaid or postpaid spending commitments where customers promise to spend a certain amount over the contract period paid in advance or in arrears. Use credits to provide free spending allowances. Under the hood these are the same mechanisms, however, credits are typically offered for free (SLA or promotional) or as a part of an allotment associated with a Subscription. In Metronome, you can set commits and credits to only be applicable for a subset of usage. Use `applicable_product_ids` or `applicable_product_tags` to create product or product-family specific commits or credits, or you can build complex boolean logic specifiers to target usage based on pricing and presentation group values using `override_specifiers`. These objects can also also be configured to have a recurrence schedule to easily model customer packaging which includes recurring monthly or quarterly allotments. Commits support rollover settings (`rollover_fraction`) to transfer unused balances between contract periods, either entirely or as a percentage. Read more about [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/). #### Subscriptions You can add a fixed recurring charge to a contract, like monthly licenses or seat-based fees, using the subscription charge. Subscription charges are defined on your rate card and you can select which subscription is applicable to add to each contract. When you add a subscription to a contract you need to: - Define whether the subscription is paid for in-advance or in-arrears (`collection_schedule`) - Define the proration behavior (`proration`) - Specify an initial quantity (`initial_quantity`) - Define which subscription rate on the rate card should be used (`subscription_rate`) Read more about [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/). #### Scheduled Charges Set up one-time, recurring, or entirely custom charges that occur on specific dates, separate from usage-based billing or commitments. These can be used to model non-recurring platform charges or professional services. #### Threshold Billing Metronome allows you to configure automatic billing triggers when customers reach spending thresholds to prevent fraud and manage risk. You can use `spend_threshold_configuration` to trigger an invoice to cover current charges whenever the threshold is reached or you can ensure the customer maintains a minimum prepaid balance using the `prepaid_balance_configuration`. Read more about [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/) and [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/). ### Usage guidelines: - You can always [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/) after it has been created, using the `editContract` endpoint. Metronome keeps track of all edits, both in the audit log and over the `getEditHistory` endpoint. - Customers in Metronome can have multiple concurrent contracts at one time. Use `usage_filters` to route the correct usage to each contract. [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter). ' operationId: createContract-v1 summary: Create a contract tags: - Contracts requestBody: description: Create a new contract content: application/json: schema: $ref: '#/components/schemas/CreateContractPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d rate_card_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc starting_at: '2020-01-01T00:00:00.000Z' billing_provider_configuration: billing_provider: stripe delivery_method: direct_to_billing_provider responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/amend: post: description: '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. ' operationId: amendContract-v1 summary: Amend a contract tags: - Contracts requestBody: description: Amend a contract content: application/json: schema: $ref: '#/components/schemas/AmendContractPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc starting_at: '2020-01-01T00:00:00.000Z' responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/archive: post: description: "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 expiration ledger entries to close out any remaining balances, ensuring accurate accounting of unused prepaid amounts. These ledger entries will appear in the commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.\n\n#### Archived contract visibility: \nArchived contracts remain accessible for historical reporting and audit purposes. They can be retrieved using the `ListContracts` endpoint by setting the `include_archived` parameter to `true` or in the Metronome UI when the \"Show archived\" option is enabled.\n" operationId: archiveContract-v1 summary: Archive a contract tags: - Contracts requestBody: description: "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\nImpact 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 expiration ledger entries to close out any remaining balances, ensuring accurate accounting of unused prepaid amounts. These ledger entries will appear in the commit's transaction history with type PREPAID_COMMIT_EXPIRATION.\n\nArchived contract visibility: \nArchived contracts remain accessible for historical reporting and audit purposes. They can be retrieved using the `ListContracts` endpoint by setting the `include_archived` parameter to `true` or in the Metronome UI when the \"Show archived\" option is enabled.\n" content: application/json: schema: $ref: '#/components/schemas/ArchiveContractPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc void_invoices: true responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: 8deed800-1b7a-495d-a207-6c52bac54dc9 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/setUsageFilter: post: description: "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 contracting scenarios where multiple contracts are associated to the same customer with the same rates.\n- Update the usage filter associated with the contract over time. \n\n### Usage guidelines:\nTo use usage filters, the `group_key` must be defined on the billable metrics underlying the rate card on the contracts.\n" operationId: setUsageFilter-v1 summary: Set a contract usage filter tags: - Contracts requestBody: description: Set usage filter for contract content: application/json: schema: $ref: '#/components/schemas/SetUsageFilterPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc group_key: business_subscription_id group_values: - ID-1 - ID-2 starting_at: '2020-01-01T00:00:00.000Z' responses: '200': description: Success '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/updateInvoiceIssueDate: post: description: "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 both the issue date and future billing schedule, use the 'edit contract' or 'edit commit' endpoints instead.\n" operationId: updateInvoiceIssueDate-v1 summary: Update invoice issue date tags: - Contracts requestBody: description: The invoice_id and new issue_date content: application/json: schema: $ref: '#/components/schemas/UpdateInvoiceIssueDatePayload' example: invoice_id: 13117714-3f05-48e5-a6e9-a66093f13b4d issue_date: '2020-01-01T00:00:00.000Z' responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/updateEndDate: post: description: '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. ' operationId: updateContractEndDate-v1 summary: Update the contract end date tags: - Contracts requestBody: description: Update the end date of a contract content: application/json: schema: $ref: '#/components/schemas/UpdateContractEndDatePayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc ending_before: '2020-01-01T00:00:00.000Z' responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/getContractRateSchedule: post: description: "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" operationId: getContractRateSchedule-v1 summary: Get the rate schedule for a contract parameters: - $ref: '#/components/parameters/PageLimit' - $ref: '#/components/parameters/NextPage' tags: - Contracts requestBody: description: Contract rate schedule filter options. content: application/json: schema: $ref: '#/components/schemas/GetContractRateSchedulePayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc at: '2020-01-01T00:00:00.000Z' selectors: - product_id: d6300dbb-882e-4d2d-8dec-5125d16b65d0 partial_pricing_group_values: region: us-west-2 cloud: aws responses: '200': description: Success content: application/json: schema: type: object required: - data properties: next_page: type: string nullable: true data: type: array items: $ref: '#/components/schemas/ContractRateSchedule' /v1/contracts/getSubscriptionQuantityHistory: post: description: "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 seats in Metronome, you can increment or decrement the quantity on a subscription at any point in the past or future.\n" summary: Get subscription quantity history operationId: getSubscriptionQuantityHistory-v1 tags: - Contracts requestBody: content: application/json: schema: type: object required: - customer_id - contract_id - subscription_id properties: customer_id: type: string format: uuid contract_id: type: string format: uuid subscription_id: type: string format: uuid example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc subscription_id: 1a824d53-bde6-4d82-96d7-6347ff227d5c responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/SubscriptionQuantityHistory' example: data: subscription_id: 1a824d53-bde6-4d82-96d7-6347ff227d5c fiat_credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 history: - starting_at: '2020-01-01T00:00:00.000Z' data: - quantity: 100 unit_price: 1000 total: 100000 - starting_at: '2020-02-01T00:00:00.000Z' data: - quantity: 100 unit_price: 1000 total: 100000 - quantity: 200 unit_price: 2000 total: 400000 '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - ContractNotFound - CustomerNotFound - SubscriptionNotFound message: type: string /v1/contracts/getSubscriptionSeatsHistory: post: description: '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. ### Use this endpoint to: - Track changes to seat assignments over time - Get seat schedule for a specific date using the `covering_date` parameter - Get seat schedule history with optional date range filtering using `starting_at` and `ending_before` ### Key response fields: - data: array of seat schedule entries with time periods, quantity, and assignments - next_page: cursor for pagination to retrieve additional results ### Usage guidelines: - Use `covering_date` to get the active seats for a specific point in time. `covering_date` cannot be used with `starting_at` or `ending_before`. - Use `starting_at` and `ending_before` to filter results by time range. `starting_at` and `ending_before` cannot be used with `covering_date`. - Maximum limit is 10 seat schedule entries per request - Results are ordered by `starting_at` timestamp ' summary: Get subscription seats history operationId: getSubscriptionSeatsHistory-v1 tags: - Contracts requestBody: content: application/json: schema: type: object required: - customer_id - contract_id - subscription_id properties: customer_id: type: string format: uuid contract_id: type: string format: uuid subscription_id: type: string format: uuid limit: type: integer default: 10 nullable: true description: 'Maximum number of seat schedule entries to return. Defaults to 10. Required range: 1 <= x <= 10.' cursor: type: string nullable: true description: Cursor for pagination. Use the value from the `next_page` field of the previous response to retrieve the next page of results. covering_date: type: string format: date-time nullable: true description: Get the seats history segment for the covering date. Cannot be used with `starting_at` or `ending_before`. starting_at: type: string format: date-time nullable: true description: Include seats history segments that are active at or after this timestamp. Use with `ending_before` to get a specific time range. If not set, there's no lower bound. ending_before: type: string format: date-time nullable: true description: Include seats history segments that are active at or before this timestamp. Use with `starting_at` to get a specific time range. If not set, there's no upper bound. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc subscription_id: 1a824d53-bde6-4d82-96d7-6347ff227d5c covering_date: '2024-01-15T00:00:00.000Z' limit: 10 responses: '200': description: Success content: application/json: schema: type: object required: - data - next_page properties: data: type: array items: $ref: '#/components/schemas/SubscriptionSeatsScheduleEntry' next_page: type: string nullable: true description: Cursor for the next page of results example: data: - starting_at: '2024-01-01T00:00:00.000Z' ending_before: '2024-01-15T00:00:00.000Z' total_quantity: 5 assigned_seat_ids: - seat-1 - seat-2 - seat-3 - seat-4 - seat-5 - starting_at: '2024-01-15T00:00:00.000Z' ending_before: null total_quantity: 3 assigned_seat_ids: - seat-1 - seat-2 - seat-3 next_page: eyJzdGFydGluZ19hdCI6IjIwMjQtMDEtMTVUMDA6MDA6MDAuMDAwWiJ9 '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - ContractNotFound - CustomerNotFound - SubscriptionNotFound - InvalidArgument message: type: string /v1/contracts/scheduleProServicesInvoice: post: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 description: 'Create a new scheduled invoice for Professional Services terms on a contract. This endpoint''s availability is dependent on your client''s configuration. ' operationId: scheduleProServicesInvoice-v1 summary: Schedule ProService invoice tags: - Contracts requestBody: description: schedule an invoice for the specified Professional Services terms on a contract content: application/json: schema: type: object required: - customer_id - contract_id - issued_at - line_items properties: customer_id: type: string format: uuid contract_id: type: string format: uuid issued_at: type: string format: date-time description: The date the invoice is issued netsuite_invoice_header_start: type: string format: date-time description: The start date of the invoice header in Netsuite netsuite_invoice_header_end: type: string format: date-time description: The end date of the invoice header in Netsuite line_items: description: Each line requires an amount or both unit_price and quantity. type: array items: $ref: '#/components/schemas/ProServiceInvoiceLineItem' responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Invoice' '404': $ref: '#/components/responses/NotFound' /v1/contracts/createHistoricalInvoices: post: description: '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. ' operationId: createHistoricalContractUsageInvoices-v1 summary: Create historical invoices tags: - Contracts requestBody: description: Create a historical usage invoice for a contract content: application/json: schema: $ref: '#/components/schemas/CreateHistoricalContractUsageInvoiceRequestPayload' example: invoices: - customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 inclusive_start_date: '2020-01-01T00:00:00.000Z' exclusive_end_date: '2020-02-01T00:00:00.000Z' issue_date: '2020-02-01T00:00:00.000Z' usage_line_items: - product_id: f14d6729-6a44-4b13-9908-9387f1918790 inclusive_start_date: '2020-01-01T00:00:00.000Z' exclusive_end_date: '2020-02-01T00:00:00.000Z' quantity: 100 preview: false responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: type: object $ref: '#/components/schemas/Invoice' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' /v1/composite/createCustomerWithContract: post: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 description: Create a new customer and provision a contract. This endpoint's availability is dependent on your client's configuration. operationId: createCustomerWithContract-v1 summary: Create a customer and provision a contract. tags: - Contracts requestBody: description: The customer and contract details to create content: application/json: schema: $ref: '#/components/schemas/CreateCustomerWithContractPayload' example: customer: name: Example, Inc. ingest_aliases: - team@example.com contract: starting_at: '2020-01-01T00:00:00.000Z' responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/CustomerAndContract' example: data: customer_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc ingest_aliases: - team@example.com customer_name: Aperture, Inc. contract_id: 7aa11640-0703-4600-8eb9-293f535a6b74 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/packages/create: post: description: "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 package transition. Aliases are human-readable names that you can use in the place of the id of the package when provisioning a customer’s contract. By using an alias, you can easily create a contract and provision a customer by choosing the “Starter Plan” package, without storing the package ID in your internal systems. This is helpful when launching terms for a package, as you can create a new package with the “Starter Plan” alias scheduled to be assigned without updating your provisioning code.\n\n### Key input fields:\n- `starting_at_offset`: Starting date relative to contract start. Generates the `starting_at` date when a contract is provisioned using a package.\n- `duration`: Duration starting from `starting_at_offset`. Generates the `ending_before` date when a contract is provisioned using a package.\n- `date_offset`: Date relative to contract start. Used for point-in-time dates without a duration.\n- `aliases`: Human-readable name to use when provisioning contracts with a package.\n\n### Usage guidelines:\n- Use packages for standard self-serve use cases where customers have consistent terms. For customers with negotiated custom contract terms, use the `createContract` endpoint for maximum flexibility.\n- Billing provider configuration can be set when creating a package by using `billing_provider` and `delivery_method`. To provision a customer successfully with a package, the customer must have one and only one billing provider configuration that matches the billing provider configuration set on the package.\n- A package alias can only be used by one package at a time. If you create a new package with an alias that is already in use by another package, the original package’s alias schedule will be updated. The alias will reference the package to which it was most recently assigned.\n- Terms can only be specified using times relative to the contract start date. Supported granularities are: `days`, `weeks`, `months`, `years`\n- Packages cannot be edited once created. Use the rate card to easily add new rates across all of your customers or make direct edits to a contract after provisioning with a package. Edited contracts will still be associated with the package used during provisioning.\n" operationId: createPackage-v1 summary: Create a package tags: - Contracts requestBody: description: Create a new package content: application/json: schema: $ref: '#/components/schemas/CreatePackagePayload' example: name: My package rate_card_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc billing_provider: stripe delivery_method: direct_to_billing_provider responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/packages/listContractsOnPackage: post: description: "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`**, **`covering_date`**, and **`include_archived`** parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass **`covering_date`** equal to the current time.\n" summary: List contracts associated with a package operationId: listContractsOnPackage-v1 tags: - Contracts parameters: - $ref: '#/components/parameters/PageLimit' - $ref: '#/components/parameters/NextPage' requestBody: description: Package ID and optional filters content: application/json: schema: type: object required: - package_id properties: package_id: type: string format: uuid starting_at: type: string format: date-time description: Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided. covering_date: type: string format: date-time description: Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided. include_archived: type: boolean description: Default false. Determines whether to include archived contracts in the results example: package_id: 13117714-3f05-48e5-a6e9-a66093f13b4d responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/ContractProjectionSummary' next_page: type: string nullable: true example: data: - contract_id: 63798fdb-6883-4e53-8365-74d42a3e1f09 customer_id: f0b78a5e-01d1-4ed1-96da-05bc225963ec starting_at: '2024-01-01T00:00:00Z' next_page: eyJvZmZzZXQiOjF9 '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - PackageNotFound message: type: string /v2/contracts/get: post: description: "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 that point in time. \n\n### Usage guidelines: \n- Optionally, use the `include_balance` and `include_ledger` fields to include balances and ledgers in the credit and commit responses. Using these fields will cause the query to be slower.\n" operationId: getContract-v2 summary: Get a contract (v2) tags: - Contracts requestBody: description: Contract and customer IDs content: application/json: schema: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid contract_id: type: string format: uuid include_ledgers: type: boolean description: Include commit/credit ledgers in the response. Setting this flag may cause the query to be slower. Cannot be used with as_of_date parameter. as_of_date: type: string format: date-time description: Optional RFC 3339 timestamp. Return the contract as of this date. Cannot be used with include_ledgers parameter. include_balance: type: boolean description: Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/ContractV2' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice custom_fields: x_account_id: KyVnHhSBWl7eY2bl usage_filter: [] '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - CustomerNotFound - ContractNotFound message: type: string /v2/contracts/getEditHistory: post: description: "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 to the contract\n- Details on each individual edit - for example showing that in one edit, a user added two discounts and incremented a subscription quantity.\n" summary: Get contract edit history operationId: getContractEditHistory-v2 tags: - Contracts requestBody: description: Contract ID content: application/json: schema: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid contract_id: type: string format: uuid example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/ContractEdit' example: data: - id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc add_commits: - id: addda517-6d7a-42ea-834c-f5e6cf8c670e type: PREPAID product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A description: A new commit applicable_product_tags: - tag1 - tag2 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false - id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc add_overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 1.5 priority: 1 override_specifiers: - product_tags: - tag1 pricing_group_values: region: us-west-1 hardware_type: gpu entitled: true '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - ContractNotFound - CustomerNotFound message: type: string /v2/contracts/list: post: description: "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_archived` parameters to filter the list of returned contracts. For example, to list only currently active contracts, pass `covering_date` equal to the current time.\n" summary: List customer contracts (v2) operationId: listContracts-v2 tags: - Contracts requestBody: description: Customer ID and optional filters content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid include_ledgers: type: boolean description: Include commit/credit ledgers in the response. Setting this flag may cause the response to be slower. include_archived: type: boolean description: Include archived contracts in the response. include_balance: type: boolean description: Include the balance of credits and commits in the response. Setting this flag may cause the response to be slower. starting_at: type: string format: date-time description: Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided. covering_date: type: string format: date-time description: Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/ContractV2' example: data: - id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d rate_card_id: 92f3080d-27ca-4306-a23f-2430de61851e starting_at: '2020-01-01T00:00:00.000Z' net_payment_terms_days: 7 ending_before: '2022-01-01T00:00:00.000Z' commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID name: My test commit description: My test commit description product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 access_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a amount: 10000000 starting_at: '2020-02-01T00:00:00.000Z' ending_before: '2021-02-01T00:00:00.000Z' invoice_schedule: credit_type: id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 name: USD (cents) schedule_items: - id: f15e4e23-f74e-4de4-9b3a-8b07434116c4 invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false created_at: '2020-01-01T00:00:00.000Z' overrides: - id: 6cf3292a-e85c-4be6-822c-e25ba9d19757 created_at: '2020-01-01T00:00:00.000Z' product: id: eae8903b-693b-41a7-8c0b-f23748c9a9c8 name: My product B starting_at: '2020-01-01T00:00:00.000Z' type: MULTIPLIER multiplier: 0.1 scheduled_charges: - id: 8e511ff1-3fd5-4d86-bc89-1e80239874bf name: My test scheduled charge product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A schedule: schedule_items: - id: 6ca40ebc-9c01-484e-a64e-4e47fbbd0ebe invoice_id: 5cced82b-5464-41b4-9ea7-3e080e0a4dba amount: 1000000 unit_price: 1000000 quantity: 1 timestamp: '2020-02-15T00:00:00.000Z' scheduled_charges_on_usage_invoices: ALL transitions: - type: RENEWAL from_contract_id: 9bf48856-b430-42f4-844f-4d2ea85bcff8 to_contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc usage_statement_schedule: frequency: MONTHLY billing_anchor_date: '2020-01-01T00:00:00.000Z' created_at: '2019-12-31T14:23:55.234Z' created_by: Alice custom_fields: x_account_id: KyVnHhSBWl7eY2bl usage_filter: [] '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - CustomerNotFound message: type: string /v2/contracts/edit: post: description: 'The ability to edit a contract helps you react quickly to the needs of your customers and your business. ### Use this endpoint to: - Encode mid-term commitment and discount changes - Fix configuration mistakes and easily roll back packaging changes ### Key response fields: - The `id` of the edit - 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. ### Usage guidelines: - When you edit a contract, any draft invoices update immediately to reflect that edit. Finalized invoices remain unchanged - you must void and regenerate them in the UI or API to reflect the edit. - Contract editing must be enabled to use this endpoint. Reach out to your Metronome representative to learn more. ' summary: Edit a contract operationId: editContract-v2 tags: - Contracts requestBody: description: Contract and customer IDs and fields to update content: application/json: schema: $ref: '#/components/schemas/EditContractPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc add_overrides: - type: MULTIPLIER starting_at: '2024-11-02T00:00:00Z' product_id: d4fc086c-d8e5-4091-a235-fbba5da4ec14 multiplier: 2 priority: 100 add_scheduled_charges: - product_id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 schedule: schedule_items: - timestamp: '2020-02-15T00:00:00.000Z' unit_price: 1000000 quantity: 1 responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc '400': description: Error content: application/json: schema: type: object required: - code - message properties: code: type: string enum: - CustomerNotFound - ContractNotFound message: type: string components: schemas: BillingProviderDeliveryMethodType: type: string enum: - direct_to_billing_provider - aws_sqs - tackle - aws_sns HierarchyLink: type: object required: - contract_id - customer_id properties: contract_id: type: string format: uuid customer_id: type: string format: uuid SpendThresholdConfiguration: type: object required: - is_enabled - threshold_amount - commit - payment_gate_config properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated. type: number commit: $ref: '#/components/schemas/SpendThresholdCommit' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfig' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts $ref: '#/components/schemas/DiscountConfiguration' SubscriptionProrationInput: type: object properties: is_prorated: type: boolean description: Indicates if the partial period will be prorated or charged a full amount. invoice_behavior: type: string enum: - BILL_IMMEDIATELY - BILL_ON_NEXT_COLLECTION_DATE - bill_immediately - bill_on_next_collection_date description: "Indicates how mid-period quantity adjustments are invoiced. \n**BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The quantity increase will be billed immediately on the scheduled date.\n**BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for in-arrears at the end of the period.\n" HierarchyConfigurationV2: oneOf: - $ref: '#/components/schemas/ParentHierarchyConfiguration' - $ref: '#/components/schemas/ChildHierarchyConfigurationV2' description: 'Either a **parent** configuration with a list of children or a **child** configuration with a single parent. ' Override: type: object required: - id - created_at - starting_at properties: id: type: string format: uuid created_at: type: string format: date-time product: type: object required: - id - name properties: id: type: string format: uuid name: type: string applicable_product_tags: type: array items: type: string override_specifiers: type: array items: $ref: '#/components/schemas/OverrideSpecifier' starting_at: type: string format: date-time ending_before: type: string format: date-time entitled: type: boolean type: type: string enum: - OVERWRITE - MULTIPLIER - TIERED priority: type: number multiplier: type: number overwrite_rate: $ref: '#/components/schemas/OverwriteRate' override_tiers: type: array items: $ref: '#/components/schemas/OverrideTier' is_commit_specific: type: boolean target: type: string enum: - COMMIT_RATE - LIST_RATE rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 SUBSCRIPTION: - ff:legacy-subscriptions-enabled subscription: - ff:legacy-subscriptions-enabled TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. quantity: type: number x-mint: groups: - ff:legacy-subscriptions-enabled description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean x-mint: groups: - ff:legacy-subscriptions-enabled description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. value: type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. credit_type: $ref: '#/components/schemas/CreditType' UpdateScheduledChargeInput: type: object required: - scheduled_charge_id properties: scheduled_charge_id: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true invoice_schedule: $ref: '#/components/schemas/UpdateInvoiceScheduleInput' PrepaidCommitSeatBasedAdjustmentLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid CreditSeatBasedAdjustmentLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - CREDIT_SEAT_BASED_ADJUSTMENT timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid SpendThresholdConfigurationV2: type: object required: - is_enabled - threshold_amount - commit - payment_gate_config properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated. type: number commit: $ref: '#/components/schemas/SpendThresholdCommit' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfigV2' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts $ref: '#/components/schemas/DiscountConfiguration' PostpaidCommitRolloverLedgerEntry: type: object required: - type - timestamp - amount - new_contract_id - segment_id properties: type: type: string enum: - POSTPAID_COMMIT_ROLLOVER timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid new_contract_id: type: string format: uuid RecurringCommitInput: allOf: - $ref: '#/components/schemas/RecurringCreditInput' - type: object properties: invoice_amount: type: object required: - unit_price - quantity - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount the customer should be billed for the commit. Not required. PrepaidBalanceThresholdCommit: type: object allOf: - $ref: '#/components/schemas/BaseThresholdCommit' - type: object properties: applicable_product_ids: type: array items: type: string format: uuid description: Which products the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: x-mint: groups: - ff:commit-specifiers type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' DiscountConfiguration: type: object required: - payment_fraction properties: payment_fraction: type: number description: The fraction of the original amount that the customer pays after applying the discount. For example, 0.85 means the customer pays 85% of the original amount (a 15% discount). ProServiceInvoiceLineItem: description: Describes the line item for a professional service charge on an invoice. type: object required: - professional_service_id properties: professional_service_id: type: string format: uuid amendment_id: type: string format: uuid description: If the professional_service_id was added on an amendment, this is required. unit_price: type: number description: If specified, this overrides the unit price on the pro service term. Must also provide quantity (but not amount) if providing unit_price. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount. amount: type: number description: Amount for the term on the new invoice. netsuite_invoice_billing_start: type: string format: date-time description: The start date for the billing period on the invoice. netsuite_invoice_billing_end: type: string format: date-time description: The end date for the billing period on the invoice. metadata: type: string description: For client use. HistoricalContractUsageInvoiceInputPayload: type: object required: - customer_id - contract_id - credit_type_id - inclusive_start_date - exclusive_end_date - issue_date - usage_line_items properties: customer_id: type: string format: uuid contract_id: type: string format: uuid credit_type_id: type: string format: uuid inclusive_start_date: type: string format: date-time exclusive_end_date: type: string x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:9c7e2b27-9b4c-4b76-9df7-f9cb05665a6a - client_id:8e3a848a-4566-4cfb-be49-64d80118a7fc format: date-time issue_date: type: string format: date-time breakdown_granularity: type: string enum: - hour - day - HOUR - DAY - Hour - Day usage_line_items: type: array items: $ref: '#/components/schemas/HistoricalContractUsageInvoiceLineItemInput' billable_status: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:9c7e2b27-9b4c-4b76-9df7-f9cb05665a6a - client_id:8e3a848a-4566-4cfb-be49-64d80118a7fc $ref: '#/components/schemas/BillableStatus' description: This field's availability is dependent on your client's configuration. custom_fields: $ref: '#/components/schemas/CustomField' AmendContractPayload: type: object required: - customer_id - contract_id - starting_at properties: customer_id: type: string format: uuid description: ID of the customer whose contract is to be amended contract_id: type: string format: uuid description: ID of the contract to amend netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. total_contract_value: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: number description: This field's availability is dependent on your client's configuration. starting_at: type: string format: date-time description: inclusive start time for the amendment commits: type: array items: $ref: '#/components/schemas/CommitInput' credits: type: array items: $ref: '#/components/schemas/CreditInput' overrides: type: array items: $ref: '#/components/schemas/OverrideInput' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/DiscountInput' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProServiceInput' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ResellerRoyaltyOrUpdateInput' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeInput' custom_fields: x-cf-entity: contract $ref: '#/components/schemas/CustomField' CreateContractPayload: type: object required: - customer_id - starting_at properties: customer_id: type: string format: uuid package_id: type: string format: uuid description: If provided, provisions a customer on a package instead of creating a traditional contract. When specified, only customer_id, starting_at, package_id, uniqueness_key, transition, and custom_fields are allowed. package_alias: type: string description: Selects the package linked to the specified alias as of the contract's start date. Mutually exclusive with package_id. name: type: string uniqueness_key: $ref: '#/components/schemas/UniquenessKey' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. net_payment_terms_days: type: number rate_card_id: type: string format: uuid rate_card_alias: type: string description: Selects the rate card linked to the specified alias as of the contract's start date. total_contract_value: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: number description: This field's availability is dependent on your client's configuration. starting_at: type: string format: date-time description: inclusive contract start time ending_before: type: string format: date-time description: exclusive contract end time commits: type: array items: $ref: '#/components/schemas/CommitInput' credits: type: array items: $ref: '#/components/schemas/CreditInput' recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitInput' recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditInput' multiplier_override_prioritization: type: string enum: - LOWEST_MULTIPLIER - lowest_multiplier - EXPLICIT - explicit description: Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit. overrides: type: array items: $ref: '#/components/schemas/OverrideInput' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/DiscountInput' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProServiceInput' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ResellerRoyaltyInput' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeInput' scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' transition: $ref: '#/components/schemas/ContractTransitionInput' usage_filter: $ref: '#/components/schemas/BaseUsageFilter' usage_statement_schedule: $ref: '#/components/schemas/UsageStatementScheduleInput' custom_fields: x-cf-entity: contract $ref: '#/components/schemas/CustomField' billing_provider_configuration: $ref: '#/components/schemas/CustomerBillingProviderConfigurationLookup' revenue_system_configuration: x-mint: groups: - ff:revenue-rec-configurations-enabled $ref: '#/components/schemas/CustomerRevenueSystemConfigurationLookup' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfiguration' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfiguration' subscriptions: $ref: '#/components/schemas/SubscriptionsInput' hierarchy_configuration: $ref: '#/components/schemas/ContractHierarchyConfigurationInput' CommitPaymentGateConfig: type: object required: - payment_gate_type properties: payment_gate_type: type: string enum: - NONE - STRIPE - EXTERNAL description: Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance. tax_type: type: string enum: - NONE - STRIPE - ANROK - PRECALCULATED description: Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE. stripe_config: description: Only applicable if using STRIPE as your payment gate type. type: object required: - payment_type properties: payment_type: type: string enum: - INVOICE - PAYMENT_INTENT description: If left blank, will default to INVOICE invoice_metadata: type: object additionalProperties: type: string description: Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. on_session_payment: type: boolean description: "If true, the payment will be made assuming the customer is present (i.e. on session). \n\nIf false, the payment will be made assuming the customer is not present (i.e. off session). \nFor cardholders from a country with an e-mandate requirement (e.g. India), the payment may be declined.\n\nIf left blank, will default to false." precalculated_tax_config: description: Only applicable if using PRECALCULATED as your tax type. type: object required: - tax_amount properties: tax_amount: type: number description: Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule tax_name: type: string description: Name of the tax to be applied. This may be used in an invoice line item description. Invoice: required: - id - customer_id - credit_type - line_items - status - total - type type: object properties: id: type: string format: uuid customer_id: type: string format: uuid customer_custom_fields: $ref: '#/components/schemas/CustomField' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. net_payment_terms_days: type: number credit_type: $ref: '#/components/schemas/CreditType' line_items: type: array items: $ref: '#/components/schemas/InvoiceLineItem' start_timestamp: description: Beginning of the usage period this invoice covers (UTC) type: string format: date-time end_timestamp: description: End of the usage period this invoice covers (UTC) type: string format: date-time issued_at: description: When the invoice was issued (UTC) type: string format: date-time created_at: description: When the invoice was created (UTC). This field is present for correction invoices only. type: string format: date-time status: $ref: '#/components/schemas/InvoiceStatus' total: type: number type: $ref: '#/components/schemas/InvoiceType' external_invoice: $ref: '#/components/schemas/ExternalInvoice' nullable: true revenue_system_invoices: type: array items: $ref: '#/components/schemas/RevenueSystemInvoice' nullable: true contract_id: type: string format: uuid contract_custom_fields: $ref: '#/components/schemas/CustomField' amendment_id: type: string format: uuid correction_record: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 required: - reason - memo - corrected_invoice_id type: object properties: reason: type: string memo: type: string corrected_invoice_id: type: string format: uuid corrected_external_invoice: $ref: '#/components/schemas/ExternalInvoice' reseller_royalty: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: object description: Only present for contract invoices with reseller royalties. required: - reseller_type - netsuite_reseller_id - fraction properties: reseller_type: $ref: '#/components/schemas/ResellerType' netsuite_reseller_id: type: string fraction: type: string aws_options: type: object properties: aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_options: type: object properties: gcp_account_id: type: string gcp_offer_id: type: string custom_fields: x-cf-entity: invoice type: object x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:9c7e2b27-9b4c-4b76-9df7-f9cb05665a6a - client_id:8e3a848a-4566-4cfb-be49-64d80118a7fc additionalProperties: true billable_status: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:9c7e2b27-9b4c-4b76-9df7-f9cb05665a6a - client_id:8e3a848a-4566-4cfb-be49-64d80118a7fc type: object $ref: '#/components/schemas/BillableStatus' description: This field's availability is dependent on your client's configuration. constituent_invoices: type: array description: Required on invoices with type USAGE_CONSOLIDATED. List of constituent invoices that were consolidated to create this invoice. items: type: object required: - contract_id - invoice_id - customer_id properties: contract_id: type: string format: uuid invoice_id: type: string format: uuid customer_id: type: string format: uuid payer: type: object required: - contract_id - customer_id properties: contract_id: type: string format: uuid customer_id: type: string format: uuid description: Required for account hierarchy usage invoices. An object containing the contract and customer UUIDs that pay for this invoice. UpdateCreditInput: type: object required: - credit_id properties: credit_id: type: string format: uuid name: type: string description: type: string access_schedule: $ref: '#/components/schemas/UpdateAccessScheduleInput' rollover_fraction: type: number nullable: true netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true applicable_product_ids: type: array nullable: true items: type: string format: uuid description: Which products the credit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the credit applies to all products. applicable_product_tags: type: array nullable: true items: type: string description: Which tags the credit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the credit applies to all products. product_id: type: string format: uuid priority: type: number nullable: true hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control rate_type: type: string enum: - LIST_RATE - list_rate - COMMIT_RATE - commit_rate description: If provided, updates the credit to use the specified rate type for current and future invoices. Previously finalized invoices will need to be voided and regenerated to reflect the rate type change. SubscriptionSeatConfigTemplateInput: type: object required: - seat_group_key properties: seat_group_key: type: string description: The property name, sent on usage events, that identifies the seat ID associated with the usage event. For example, the property name might be seat_id or user_id. The property must be set as a group key on billable metrics and a presentation/pricing group key on contract products. This allows linked recurring credits with an allocation per seat to be consumed by only one seat's usage. initial_unassigned_seats: type: number description: The initial amount of unassigned seats on this subscription. RelativeScheduleDurationInput: type: object required: - schedule_items properties: credit_type_id: type: string format: uuid description: Defaults to USD (cents) if not passed schedule_items: type: array items: type: object required: - amount - starting_at_offset - duration properties: amount: type: number starting_at_offset: $ref: '#/components/schemas/RelativeDate' description: Date relative to the contract start date indicating the start of this schedule segment. duration: $ref: '#/components/schemas/RelativeDate' description: Offset relative to the start of this segment indicating when it should end. RevenueSystemProviderType: x-mint: groups: - ff:revenue-rec-configurations-enabled type: string enum: - netsuite RelativeSchedulePointInTimeInput: type: object description: Must provide schedule_items. required: - schedule_items properties: credit_type_id: type: string format: uuid description: Defaults to USD (cents) if not passed. schedule_items: type: array description: Either provide amount or provide both unit_price and quantity. items: type: object required: - unit_price - quantity - date_offset properties: unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount. date_offset: $ref: '#/components/schemas/RelativeDate' description: Date relative to the contract start date. OverwriteRate: type: object required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 SUBSCRIPTION: - ff:legacy-subscriptions-enabled subscription: - ff:legacy-subscriptions-enabled TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. quantity: type: number x-mint: groups: - ff:legacy-subscriptions-enabled description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean x-mint: groups: - ff:legacy-subscriptions-enabled description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' custom_rate: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. credit_type: $ref: '#/components/schemas/CreditType' OverrideInputV2: type: object required: - starting_at properties: starting_at: type: string format: date-time description: RFC 3339 timestamp indicating when the override will start applying (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when the override will stop applying (exclusive) entitled: type: boolean type: type: string enum: - OVERWRITE - overwrite - MULTIPLIER - multiplier - TIERED - tiered description: Overwrites are prioritized over multipliers and tiered overrides. multiplier: type: number description: Required for MULTIPLIER type. Must be >=0. priority: type: number description: Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides. Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered and multiplier overrides are prioritized by their priority value (lowest first). Must be > 0. overwrite_rate: $ref: '#/components/schemas/OverwriteRateInputV2' description: Required for OVERWRITE type. product_id: type: string format: uuid description: ID of the product whose rate is being overridden applicable_product_tags: type: array items: type: string description: tags identifying products whose rates are being overridden override_specifiers: type: array items: $ref: '#/components/schemas/OverrideSpecifierInputV2' description: Cannot be used in conjunction with product_id or applicable_product_tags. If provided, the override will apply to all products with the specified specifiers. tiers: type: array items: $ref: '#/components/schemas/OverrideTierInput' description: Required for TIERED type. Must have at least one tier. is_commit_specific: type: boolean description: Indicates whether the override should only apply to commits. Defaults to `false`. If `true`, you can specify relevant commits in `override_specifiers` by passing `commit_ids`. target: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have `is_commit_specific` set to `true`. Defaults to `"LIST_RATE"`. InvoiceType: type: string example: SCHEDULED or USAGE RevenueSystemInvoice: required: - revenue_system_provider - sync_status - revenue_system_external_entity_type type: object properties: revenue_system_provider: type: string revenue_system_external_entity_id: type: string sync_status: type: string revenue_system_external_entity_type: type: string error_message: type: string description: The error message from the revenue system, if available. SpendThresholdCommit: type: object allOf: - $ref: '#/components/schemas/BaseThresholdCommit' Contract: type: object required: - id - customer_id - initial - current - amendments properties: id: type: string format: uuid archived_at: type: string format: date-time description: RFC 3339 timestamp indicating when the contract was archived. If not returned, the contract is not archived. customer_id: type: string format: uuid package_id: type: string format: uuid description: ID of the package this contract was created from, if applicable. uniqueness_key: $ref: '#/components/schemas/UniquenessKey' initial: $ref: '#/components/schemas/ContractWithoutAmendments' current: $ref: '#/components/schemas/ContractWithoutAmendments' amendments: type: array items: $ref: '#/components/schemas/ContractAmendment' custom_fields: x-cf-entity: contract $ref: '#/components/schemas/CustomField' customer_billing_provider_configuration: type: object description: The billing provider configuration associated with a contract. required: - billing_provider - delivery_method - archived_at properties: billing_provider: $ref: '#/components/schemas/BillingProviderType' delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' id: type: string format: uuid configuration: type: object additionalProperties: true description: Configuration for the billing provider. The structure of this object is specific to the billing provider. archived_at: type: string format: date-time nullable: true scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' subscriptions: $ref: '#/components/schemas/Subscriptions' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfiguration' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfiguration' OverwriteRateInput: type: object required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 SUBSCRIPTION: - ff:legacy-subscriptions-enabled subscription: - ff:legacy-subscriptions-enabled TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. quantity: type: number x-mint: groups: - ff:legacy-subscriptions-enabled description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean x-mint: groups: - ff:legacy-subscriptions-enabled description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' custom_rate: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. credit_type_id: type: string format: uuid SubscriptionBillingPeriods: type: object description: Previous, current, and next billing periods for the subscription. properties: previous: $ref: '#/components/schemas/SubscriptionBillingPeriod' current: $ref: '#/components/schemas/SubscriptionBillingPeriod' next: $ref: '#/components/schemas/SubscriptionBillingPeriod' RecurringCommitV2: allOf: - $ref: '#/components/schemas/RecurringCreditV2' - type: object properties: invoice_amount: type: object required: - unit_price - quantity - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount the customer should be billed for the commit. Not required. PrepaidBalanceThresholdConfiguration: type: object required: - is_enabled - threshold_amount - recharge_to_amount - commit - payment_gate_config properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's prepaid balance lowers to this amount, a threshold charge will be initiated. type: number recharge_to_amount: description: Specify the amount the balance should be recharged to. type: number custom_credit_type_id: description: If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency. type: string format: uuid commit: $ref: '#/components/schemas/PrepaidBalanceThresholdCommit' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfig' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts $ref: '#/components/schemas/DiscountConfiguration' CommitUpdate: type: object required: - id properties: id: type: string format: uuid name: type: string description: type: string access_schedule: $ref: '#/components/schemas/AccessScheduleUpdate' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true rollover_fraction: type: number nullable: true invoice_schedule: $ref: '#/components/schemas/InvoiceScheduleUpdate' applicable_product_ids: type: array nullable: true items: type: string format: uuid description: Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: nullable: true type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' applicable_product_tags: type: array nullable: true items: type: string description: Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. product_id: type: string format: uuid hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control priority: type: number nullable: true description: If multiple commits are applicable, the one with the lower priority will apply first. rate_type: type: string enum: - COMMIT_RATE - LIST_RATE description: If set, the commit's rate type was updated to the specified value. BaseUsageFilterWithRequiredStartingAt: type: object required: - group_key - group_values - starting_at properties: group_key: type: string group_values: type: array items: type: string starting_at: type: string format: date-time BillingProviderType: type: string enum: - aws_marketplace - stripe - netsuite - custom - azure_marketplace - quickbooks_online - workday - gcp_marketplace - metronome x-mint-enum: netsuite: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf custom: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf workday: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf gcp_marketplace: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf UpdateInvoiceIssueDatePayload: type: object required: - invoice_id - issue_date properties: invoice_id: type: string format: uuid description: ID of the invoice to update. The invoice must still be in DRAFT status. issue_date: type: string format: date-time description: RFC 3339 timestamp. This will be the new issue date of the invoice. It must not be after the end date of the contract. AppliedCommitOrCredit: type: object required: - id - type properties: id: type: string format: uuid type: type: string enum: - PREPAID - POSTPAID - CREDIT SubscriptionConfigAllocationInput: type: string enum: - INDIVIDUAL - POOLED description: If set to POOLED, allocation added per seat is pooled across the account. If set to INDIVIDUAL, each seat in the subscription will have its own allocation. CreatePackagePayload: type: object required: - name properties: name: type: string contract_name: type: string uniqueness_key: $ref: '#/components/schemas/UniquenessKey' net_payment_terms_days: type: number rate_card_id: type: string format: uuid rate_card_alias: type: string description: Selects the rate card linked to the specified alias as of the contract's start date. aliases: type: array items: $ref: '#/components/schemas/PackageAlias' description: Reference this alias when creating a contract. If the same alias is assigned to multiple packages, it will reference the package to which it was most recently assigned. It is not exposed to end customers. duration: $ref: '#/components/schemas/RelativeDate' commits: type: array items: $ref: '#/components/schemas/CommitTemplateInput' credits: type: array items: $ref: '#/components/schemas/CreditTemplateInput' recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitTemplateInput' recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditTemplateInput' multiplier_override_prioritization: type: string enum: - LOWEST_MULTIPLIER - lowest_multiplier - EXPLICIT - explicit description: Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. If tiered overrides are used, prioritization must be explicit. overrides: type: array items: $ref: '#/components/schemas/OverrideTemplateInput' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeTemplateInput' scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' usage_statement_schedule: $ref: '#/components/schemas/UsageStatementScheduleTemplateInput' billing_provider: $ref: '#/components/schemas/ContractsBillingProviderType' delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfiguration' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfiguration' subscriptions: type: array items: $ref: '#/components/schemas/SubscriptionTemplateInput' ContractWithoutAmendments: type: object required: - starting_at - commits - overrides - scheduled_charges - transitions - created_at - created_by - usage_statement_schedule properties: name: type: string salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. rate_card_id: type: string format: uuid starting_at: type: string format: date-time commits: type: array items: $ref: '#/components/schemas/Commit' credits: type: array items: $ref: '#/components/schemas/Credit' recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommit' recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCredit' overrides: type: array items: $ref: '#/components/schemas/Override' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's items: $ref: '#/components/schemas/Discount' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProService' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledCharge' scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' transitions: type: array items: $ref: '#/components/schemas/ContractTransition' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ResellerRoyalty' created_at: type: string format: date-time created_by: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. net_payment_terms_days: type: number ending_before: type: string format: date-time total_contract_value: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: number description: This field's availability is dependent on your client's configuration. usage_filter: $ref: '#/components/schemas/UsageFilter' usage_statement_schedule: $ref: '#/components/schemas/UsageStatementSchedule' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfiguration' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfiguration' hierarchy_configuration: $ref: '#/components/schemas/HierarchyConfiguration' SubscriptionSeatUpdateInput: type: object properties: add_seat_ids: type: array description: Adds seat IDs to the subscription. If there are unassigned seats, the new seat IDs will fill these unassigned seats and not increase the total subscription quantity. Otherwise, if there are more new seat IDs than unassigned seats, the total subscription quantity will increase. items: $ref: '#/components/schemas/SubscriptionSeatUpdateAssignedSeat' remove_seat_ids: type: array description: Removes seat IDs from the subscription, if possible. If a seat ID is removed, the total subscription quantity will decrease. Otherwise, if the seat ID is not found on the subscription, this is a no-op. items: $ref: '#/components/schemas/SubscriptionSeatUpdateAssignedSeat' add_unassigned_seats: type: array description: Adds unassigned seats to the subscription. This will increase the total subscription quantity. items: $ref: '#/components/schemas/SubscriptionSeatUpdateUnassignedSeat' remove_unassigned_seats: type: array description: Removes unassigned seats from the subscription. This will decrease the total subscription quantity if there are are unassigned seats. items: $ref: '#/components/schemas/SubscriptionSeatUpdateUnassignedSeat' ScheduledChargeInputV2: type: object required: - product_id - schedule properties: product_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices schedule: $ref: '#/components/schemas/SchedulePointInTimeInputV2' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: scheduled_charge $ref: '#/components/schemas/CustomField' ContractParentHierarchyConfigurationInput: type: object required: - contract_id - customer_id properties: contract_id: type: string format: uuid customer_id: type: string format: uuid SchedulePointInTimeInput: type: object description: Must provide either schedule_items or recurring_schedule. properties: credit_type_id: type: string format: uuid description: Defaults to USD (cents) if not passed. schedule_items: type: array description: Either provide amount or provide both unit_price and quantity. items: type: object required: - timestamp properties: unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided. amount: type: number description: Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1. timestamp: type: string format: date-time description: timestamp of the scheduled event recurring_schedule: type: object description: Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1. required: - starting_at - ending_before - frequency - amount_distribution properties: starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive). ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive). frequency: $ref: '#/components/schemas/RecurringScheduleFrequency' unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided. amount: type: number description: Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1. amount_distribution: type: string enum: - DIVIDED - divided - DIVIDED_ROUNDED - divided_rounded - EACH - each do_not_invoice: type: boolean description: This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice. default: false CommitLedger: oneOf: - $ref: '#/components/schemas/PrepaidCommitSegmentStartLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitRolloverLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitExpirationLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitCanceledLedgerEntry' x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 - $ref: '#/components/schemas/PrepaidCommitCreditedLedgerEntry' x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 - $ref: '#/components/schemas/PrepaidCommitSeatBasedAdjustmentLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitInitialBalanceLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitRolloverLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitTrueupLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitManualLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitManualLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitExpirationLedgerEntry' CreditLedger: oneOf: - $ref: '#/components/schemas/CreditSegmentStartLedgerEntry' - $ref: '#/components/schemas/CreditAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/CreditExpirationLedgerEntry' - $ref: '#/components/schemas/CreditCanceledLedgerEntry' x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 - $ref: '#/components/schemas/CreditCreditedLedgerEntry' x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 - $ref: '#/components/schemas/CreditManualLedgerEntry' - $ref: '#/components/schemas/CreditSeatBasedAdjustmentLedgerEntry' - $ref: '#/components/schemas/CreditRolloverLedgerEntry' RevenueSystemProviderTypeV2: type: string enum: - netsuite description: The revenue system provider type. InvoiceStatus: type: string example: DRAFT, VOID, or FINALIZED ContractRateSchedule: type: object required: - rate_card_id - product_id - product_name - product_tags - product_custom_fields - starting_at - entitled - list_rate properties: rate_card_id: type: string format: uuid product_id: type: string format: uuid product_name: type: string product_tags: type: array items: type: string product_custom_fields: $ref: '#/components/schemas/CustomField' starting_at: type: string format: date-time ending_before: type: string format: date-time entitled: type: boolean pricing_group_values: type: object additionalProperties: type: string list_rate: $ref: '#/components/schemas/Rate' override_rate: $ref: '#/components/schemas/Rate' commit_rate: $ref: '#/components/schemas/CommitRate' billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY CommitRate: type: object description: A distinct rate on the rate card. You can choose to use this rate rather than list rate when consuming a credit or commit. required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 SUBSCRIPTION: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf subscription: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf percentage: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf PERCENTAGE: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Commit rate price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' SubscriptionSeatUpdateAssignedSeat: type: object required: - seat_ids - starting_at properties: seat_ids: type: array items: type: string starting_at: type: string format: date-time description: Assigned seats will be added/removed starting at this date. SubscriptionSeatConfigInput: type: object required: - seat_group_key - initial_seat_ids properties: seat_group_key: type: string description: The property name, sent on usage events, that identifies the seat ID associated with the usage event. For example, the property name might be seat_id or user_id. The property must be set as a group key on billable metrics and a presentation/pricing group key on contract products. This allows linked recurring credits with an allocation per seat to be consumed by only one seat's usage. initial_seat_ids: type: array items: type: string description: The initial assigned seats on this subscription. initial_unassigned_seats: type: number description: The initial amount of unassigned seats on this subscription. OverrideTemplateInput: type: object required: - starting_at_offset - override_specifiers properties: starting_at_offset: $ref: '#/components/schemas/RelativeDate' description: Offset relative to contract start date indicating when the override will start applying (inclusive) duration: $ref: '#/components/schemas/RelativeDate' description: Offset relative to override start indicating when the override will stop applying (exclusive) entitled: type: boolean type: type: string enum: - OVERWRITE - overwrite - MULTIPLIER - multiplier - TIERED - tiered description: Overwrites are prioritized over multipliers and tiered overrides. multiplier: type: number description: Required for MULTIPLIER type. Must be >=0. priority: type: number description: Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides. Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered and multiplier overrides are prioritized by their priority value (lowest first). Must be > 0. overwrite_rate: $ref: '#/components/schemas/OverwriteRateInput' description: Required for OVERWRITE type. override_specifiers: type: array items: $ref: '#/components/schemas/OverrideSpecifierInput' description: Specifies which products the override will apply to. tiers: type: array items: $ref: '#/components/schemas/OverrideTierInput' description: Required for TIERED type. Must have at least one tier. is_commit_specific: type: boolean description: Indicates whether the override should only apply to commits. Defaults to `false`. If `true`, you can specify relevant commits in `override_specifiers` by passing `commit_ids`. if you do not specify `commit_ids`, then the override will apply when consuming any prepaid or postpaid commit. target: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have `is_commit_specific` set to `true`. Defaults to `"LIST_RATE"`. RevenueSystemConfigurationUpdate: x-mint: groups: - ff:revenue-rec-configurations-enabled required: - revenue_system_configuration - schedule properties: revenue_system_configuration: type: object properties: revenue_system_configuration_id: type: string format: uuid provider: $ref: '#/components/schemas/RevenueSystemProviderTypeV2' delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' schedule: type: object required: - effective_at properties: effective_at: $ref: '#/components/schemas/RevenueSystemConfigurationUpdateEffectiveAtType' ScheduledChargeInput: type: object required: - product_id - schedule properties: product_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices schedule: $ref: '#/components/schemas/SchedulePointInTimeInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: scheduled_charge $ref: '#/components/schemas/CustomField' CommitSpecifier: type: object properties: product_id: type: string format: uuid description: If provided, the specifier will only apply to the product with the specified ID. product_tags: type: array items: type: string description: If provided, the specifier will only apply to products with all the specified tags. pricing_group_values: type: object additionalProperties: type: string presentation_group_values: type: object additionalProperties: type: string exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' SchedulePointInTimeInputV2: type: object description: Must provide either schedule_items or recurring_schedule. properties: credit_type_id: type: string format: uuid description: Defaults to USD (cents) if not passed. schedule_items: type: array description: Either provide amount or provide both unit_price and quantity. items: type: object required: - timestamp properties: unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided. amount: type: number description: Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1. timestamp: type: string format: date-time description: timestamp of the scheduled event recurring_schedule: type: object description: Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1. required: - starting_at - ending_before - frequency - amount_distribution properties: starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive). ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive). frequency: $ref: '#/components/schemas/RecurringScheduleFrequencyV2' unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided. amount: type: number description: Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1. amount_distribution: type: string enum: - DIVIDED - divided - DIVIDED_ROUNDED - divided_rounded - EACH - each do_not_invoice: type: boolean description: This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice. default: false SubscriptionSeatConfig: type: object required: - seat_group_key properties: seat_group_key: type: string description: The property name, sent on usage events, that identifies the seat ID associated with the usage event. For example, the property name might be seat_id or user_id. The property must be set as a group key on billable metrics and a presentation/pricing group key on contract products. This allows linked recurring credits with an allocation per seat to be consumed by only one seat's usage. UsageStatementSchedule: type: object required: - frequency - billing_anchor_date properties: frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly billing_anchor_date: type: string format: date-time description: Contract usage statements follow a selected cadence based on this date. RecurringScheduleFrequencyV2: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - SEMI_ANNUAL - semi_annual - ANNUAL - annual - WEEKLY - weekly CustomerAndContract: required: - ingest_aliases - customer_id - customer_name - contract_id type: object properties: customer_id: type: string format: uuid description: the Metronome ID of the customer ingest_aliases: type: array description: aliases for this customer that can be used instead of the Metronome customer ID in usage events items: type: string customer_name: type: string custom_fields: x-cf-entity: customer $ref: '#/components/schemas/CustomField' contract_id: type: string format: uuid InvoiceLineItem: required: - name - total - credit_type - type type: object properties: name: type: string quantity: type: number description: The quantity associated with the line item. total: type: number unit_price: type: number description: The unit price associated with the line item. list_price: $ref: '#/components/schemas/Rate' description: 'Only present for contract invoices and when the `include_list_prices` query parameter is set to true. This will include the list rate for the charge if applicable. Only present for usage and subscription line items. ' product_id: type: string format: uuid description: ID of the product associated with the line item. product_custom_fields: $ref: '#/components/schemas/CustomField' product_tags: $ref: '#/components/schemas/Tags' description: The current product tags associated with the line item's `product_id`. product_type: type: string description: 'The type of the line item''s product. Possible values are `FixedProductListItem` (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products), `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled charges, commit and credit payments, the value is `FixedProductListItem`. ' type: type: string description: 'The type of line item. - `scheduled`: Line item is associated with a scheduled charge. View the scheduled_charge_id on the line item. - `commit_purchase`: Line item is associated with a payment for a prepaid commit. View the commit_id on the line item. - `usage`: Line item is associated with a usage product or composite product. View the product_id on the line item to determine which product. - `subscription`: Line item is associated with a subscription. e.g. monthly recurring payment for an in-advance subscription. - `applied_commit_or_credit`: On metronome invoices, applied commits and credits are associated with their own line items. These line items have negative totals. Use the applied_commit_or_credit object on the line item to understand the id of the applied commit or credit, and its type. Note that the application of a postpaid commit is associated with a line item, but the total on the line item is not included in the invoice''s total as postpaid commits are paid in-arrears. - `cpu_conversion`: Line item converting between a custom pricing unit and fiat currency, using the conversion rate set on the rate card. This line item will appear when there are products priced in custom pricing units, and there is insufficient prepaid commit/credit in that custom pricing unit to fully cover the spend. Then, the outstanding spend in custom pricing units will be converted to fiat currency using a cpu_conversion line item. ' netsuite_item_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string is_prorated: type: boolean description: Indicates whether the line item is prorated for `SUBSCRIPTION` type product. credit_type: $ref: '#/components/schemas/CreditType' starting_at: type: string format: date-time description: The line item's start date (inclusive). ending_before: type: string format: date-time description: The line item's end date (exclusive). commit_id: type: string format: uuid description: For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, the ID of the credit or commit that was applied to this line item. For line items with product type of `FIXED`, the ID of the prepaid or postpaid commit that is being paid for. applied_commit_or_credit: $ref: '#/components/schemas/AppliedCommitOrCredit' description: Details about the credit or commit that was applied to this line item. Only present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE` types. commit_custom_fields: $ref: '#/components/schemas/CustomField' commit_segment_id: type: string format: uuid commit_type: type: string description: '`PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`).' commit_netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string commit_netsuite_item_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string postpaid_commit: description: Only present for line items paying for a postpaid commit true-up. $ref: '#/components/schemas/PostpaidCommit' reseller_type: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 $ref: '#/components/schemas/ResellerType' custom_fields: x-cf-entity: product $ref: '#/components/schemas/CustomField' pricing_group_values: type: object description: Includes the pricing group values associated with this line item if dimensional pricing is used. additionalProperties: type: string presentation_group_values: type: object description: Includes the presentation group values associated with this line item if presentation group keys are used. additionalProperties: type: string nullable: true metadata: type: string netsuite_invoice_billing_start: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string format: date-time description: The start date for the billing period on the invoice. netsuite_invoice_billing_end: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string format: date-time description: The end date for the billing period on the invoice. professional_service_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string format: uuid professional_service_custom_fields: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 $ref: '#/components/schemas/CustomField' scheduled_charge_id: type: string format: uuid description: ID of scheduled charge. scheduled_charge_custom_fields: $ref: '#/components/schemas/CustomField' subscription_custom_fields: $ref: '#/components/schemas/CustomField' subscription_id: type: string format: uuid description: ID of the subscription that this line item is associated with. Only present on line items with product of `SUBSCRIPTION` type. tier: $ref: '#/components/schemas/TierMetadata' description: Populated if the line item has a tiered price. discount_id: type: string format: uuid description: ID of the discount applied to this line item. discount_custom_fields: x-cf-entity: discount $ref: '#/components/schemas/CustomField' origin: type: object description: Present on line items from invoices with type USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line item from which this line item was copied. required: - line_item_id - invoice_id - customer_id - contract_id properties: line_item_id: type: string format: uuid invoice_id: type: string format: uuid customer_id: type: string format: uuid contract_id: type: string format: uuid GetContractRateSchedulePayload: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid description: ID of the customer for whose contract to get the rate schedule for. contract_id: type: string format: uuid description: ID of the contract to get the rate schedule for. at: type: string format: date-time description: optional timestamp which overlaps with the returned rate schedule segments. When not specified, the current timestamp will be used. selectors: description: List of rate selectors, rates matching ANY of the selectors will be included in the response. Passing no selectors will result in all rates being returned. type: array items: $ref: '#/components/schemas/RateSelectorWithProductTags' CommitHierarchyChildAccessAll: type: object required: - type properties: type: type: string enum: - ALL - all HierarchyConfiguration: oneOf: - $ref: '#/components/schemas/ParentHierarchyConfiguration' - $ref: '#/components/schemas/ChildHierarchyConfiguration' description: 'Either a **parent** configuration with a list of children or a **child** configuration with a single parent. ' BaseThresholdCommit: type: object required: - product_id properties: product_id: type: string description: The commit product that will be used to generate the line item for commit payment. name: type: string description: Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name. description: type: string priority: type: number description: The priority of the commit, used to determine drawdown order. Lower priority commits are consumed first. Defaults to 100 if not specified. DiscountInput: type: object required: - product_id - schedule properties: product_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices schedule: $ref: '#/components/schemas/SchedulePointInTimeInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: discount $ref: '#/components/schemas/CustomField' ContractTransitionInput: type: object required: - type - from_contract_id properties: type: type: string enum: - SUPERSEDE - RENEWAL - supersede - renewal x-mint-enum: SUPERSEDE: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 supersede: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 description: This field's available values may vary based on your client's configuration. from_contract_id: type: string format: uuid future_invoice_behavior: type: object properties: trueup: type: string enum: - remove - as_is - REMOVE - AS_IS nullable: true description: Controls whether future trueup invoices are billed or removed. Default behavior is AS_IS if not specified. ExcludeSpecifier: type: object properties: product_tags: type: array items: type: string description: If provided, the specifier will not apply to products with all the specified tags. ScheduleDuration: type: object required: - schedule_items properties: credit_type: $ref: '#/components/schemas/CreditType' schedule_items: type: array items: type: object required: - id - amount - starting_at - ending_before properties: id: type: string format: uuid amount: type: number starting_at: type: string format: date-time ending_before: type: string format: date-time RecurringScheduleFrequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - SEMI_ANNUAL - semi_annual - ANNUAL - annual UpdateDiscountConfiguration: type: object properties: payment_fraction: type: number nullable: true description: 'The fraction of the original amount that the customer pays after applying the discount. Set to null to remove the discount fraction. For example, 0.85 means the customer pays 85% of the original amount (a 15% discount). ' ExternalInvoiceStatus: type: string enum: - DRAFT - FINALIZED - PAID - PARTIALLY_PAID - UNCOLLECTIBLE - VOID - DELETED - PAYMENT_FAILED - INVALID_REQUEST_ERROR - SKIPPED - SENT - QUEUED RevenueSystemConfigurationUpdateEffectiveAtType: type: string x-mint: groups: - ff:revenue-rec-configurations-enabled enum: - START_OF_CURRENT_PERIOD description: When the revenue system configuration update will take effect. Discount: type: object required: - id - product - schedule properties: id: type: string format: uuid product: type: object required: - id - name properties: id: type: string format: uuid name: type: string schedule: $ref: '#/components/schemas/SchedulePointInTime' name: type: string minLength: 1 netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: discount $ref: '#/components/schemas/CustomField' CreditTemplateInput: type: object required: - product_id - access_schedule properties: name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/RelativeScheduleDurationInput' description: Schedule for distributing the credit to the customer. description: type: string description: Used only in UI/API. It is not exposed to end customers. applicable_product_ids: type: array items: type: string format: uuid description: Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' priority: type: number description: If multiple credits are applicable, the one with the lower priority will apply first. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate custom_fields: x-cf-entity: package_credit $ref: '#/components/schemas/CustomField' PrepaidBalanceThresholdCommitV2: type: object allOf: - $ref: '#/components/schemas/BaseThresholdCommit' - $ref: '#/components/schemas/OptionalThresholdCommitFields' ResellerRoyaltyOrUpdateInput: type: object required: - reseller_type properties: reseller_type: $ref: '#/components/schemas/ResellerType' fraction: type: number netsuite_reseller_id: type: string applicable_product_ids: type: array items: type: string format: uuid description: Must provide at least one of applicable_product_ids or applicable_product_tags. applicable_product_tags: type: array items: type: string description: Must provide at least one of applicable_product_ids or applicable_product_tags. starting_at: type: string format: date-time ending_before: description: Use null to indicate that the existing end timestamp should be removed. type: string nullable: true format: date-time reseller_contract_value: type: number aws_options: type: object properties: aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_options: type: object properties: gcp_account_id: type: string gcp_offer_id: type: string HasMore: type: object description: Indicates whether there are more items than the limit for this endpoint. Use the respective list endpoints to get the full lists. required: - commits - credits properties: commits: type: boolean description: Whether there are more commits on this contract than the limit for this endpoint. Use the /contracts/customerCommits/list endpoint to get the full list of commits. credits: type: boolean description: Whether there are more credits on this contract than the limit for this endpoint. Use the /contracts/customerCredits/list endpoint to get the full list of credits. CreditCreditedLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - CREDIT_CREDITED timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid ContractProjectionSummary: type: object required: - customer_id - contract_id - starting_at properties: customer_id: type: string format: uuid contract_id: type: string format: uuid starting_at: type: string format: date-time ending_before: type: string format: date-time archived_at: type: string format: date-time CreateCustomerWithContractPayload: type: object required: - contract - customer properties: customer: $ref: '#/components/schemas/CreateCustomerPayload' contract: type: object required: - starting_at properties: name: type: string uniqueness_key: $ref: '#/components/schemas/UniquenessKey' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. net_payment_terms_days: type: number rate_card_id: type: string format: uuid rate_card_alias: type: string description: Selects the rate card linked to the specified alias as of the contract's start date. total_contract_value: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: number description: This field's availability is dependent on your client's configuration. starting_at: type: string format: date-time description: inclusive contract start time ending_before: type: string format: date-time description: exclusive contract end time commits: type: array items: $ref: '#/components/schemas/CommitInput' credits: type: array items: $ref: '#/components/schemas/CreditInput' recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitInput' recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditInput' multiplier_override_prioritization: type: string enum: - LOWEST_MULTIPLIER - lowest_multiplier - EXPLICIT - explicit description: Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. overrides: type: array items: $ref: '#/components/schemas/OverrideInput' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/DiscountInput' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ResellerRoyaltyInput' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProServiceInput' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeInput' scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' usage_filter: $ref: '#/components/schemas/BaseUsageFilter' usage_statement_schedule: $ref: '#/components/schemas/UsageStatementScheduleInput' custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' billing_provider_configuration: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 $ref: '#/components/schemas/CustomerBillingProviderConfigurationLookup' revenue_system_configuration: x-mint: groups: - ff:revenue-rec-configurations-enabled $ref: '#/components/schemas/CustomerRevenueSystemConfigurationLookup' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfiguration' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfiguration' subscriptions: $ref: '#/components/schemas/SubscriptionsInput' hierarchy_configuration: $ref: '#/components/schemas/ContractHierarchyConfigurationInput' CommitAdd: type: object required: - id - type - product properties: id: type: string format: uuid type: type: string enum: - PREPAID - POSTPAID rate_type: type: string enum: - COMMIT_RATE - LIST_RATE name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits purposed with this commit. invoice_schedule: $ref: '#/components/schemas/CommitAddInvoiceSchedule' description: The schedule that the customer will be invoiced for this commit. description: type: string rollover_fraction: type: number applicable_product_ids: type: array items: type: string format: uuid specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' applicable_product_tags: type: array items: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control UpdateBaseThresholdCommit: type: object properties: product_id: type: string description: The commit product that will be used to generate the line item for commit payment. name: type: string description: Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name. description: type: string priority: type: number nullable: true description: The priority of the commit, used to determine drawdown order. Lower priority commits are consumed first. Defaults to 100 if not specified. On updates, set to null to clear a previously configured priority. CommitV2: type: object required: - id - type - product - created_at properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid type: type: string enum: - PREPAID - POSTPAID rate_type: type: string enum: - COMMIT_RATE - LIST_RATE name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits purposed with this commit. invoice_schedule: $ref: '#/components/schemas/SchedulePointInTime' description: The schedule that the customer will be invoiced for this commit. invoice_contract: type: object required: - id properties: id: type: string format: uuid description: The contract that this commit will be billed on. rolled_over_from: type: object required: - contract_id - commit_id properties: commit_id: type: string format: uuid contract_id: type: string format: uuid description: type: string rollover_fraction: type: number applicable_product_ids: type: array items: type: string format: uuid applicable_product_tags: type: array items: type: string applicable_contract_ids: type: array items: type: string format: uuid specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. ledger: type: array items: $ref: '#/components/schemas/CommitLedgerV2' description: A list of ordered events that impact the balance of a commit. For example, an invoice deduction or a rollover. balance: $ref: '#/components/schemas/BalanceForCommitsAndCredits' custom_fields: x-cf-entity: commit $ref: '#/components/schemas/CustomField' archived_at: type: string format: date-time hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control created_at: type: string format: date-time description: 'Timestamp of when the commit was created. - Recurring commits: latter of commit service period date and parent commit start date - Rollover commits: when the new contract started ' recurring_commit_id: type: string format: uuid description: The ID of the recurring commit that created this commit subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfig' OverrideSpecifier: type: object properties: product_id: type: string format: uuid product_tags: type: array items: type: string pricing_group_values: type: object additionalProperties: type: string presentation_group_values: type: object additionalProperties: type: string nullable: true commit_ids: type: array items: type: string recurring_commit_ids: type: array items: type: string billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY - monthly - quarterly - annual - weekly exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' BaseUsageFilter: type: object required: - group_key - group_values properties: group_key: type: string group_values: type: array items: type: string starting_at: type: string format: date-time CustomField: type: object description: 'Custom fields to be added eg. { "key1": "value1", "key2": "value2" }' additionalProperties: type: string InvoiceScheduleUpdate: type: object properties: add_schedule_items: type: array items: type: object required: - timestamp properties: timestamp: type: string format: date-time amount: type: number quantity: type: number unit_price: type: number update_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid timestamp: type: string format: date-time amount: type: number quantity: type: number unit_price: type: number remove_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid CustomerBillingProviderConfigurationCreateCustomerInput: type: object properties: billing_provider: $ref: '#/components/schemas/ContractsBillingProviderType' description: The billing provider set for this configuration. tax_provider: $ref: '#/components/schemas/TaxProviderType' description: Specifies which tax provider Metronome should use for tax calculation when billing through Stripe. This is only supported for Stripe billing provider configurations with auto_charge_payment_intent or manual_charge_payment_intent collection methods. configuration: type: object additionalProperties: true description: Configuration for the billing provider. The structure of this object is specific to the billing provider and delivery provider combination. Defaults to an empty object, however, for most billing provider + delivery method combinations, it will not be a valid configuration. example: - aws_customer_id: cust_1234 aws_product_code: my_product aws_region: us-west-1 aws_is_subscription_product: false - azure_subscription_id: my_subscription - gcp_entitlement_id: my_entitlement gcp_service_name: my_service - stripe_collection_method: charge_automatically leave_stripe_invoices_in_draft: true - netsuite_customer_id: '12345' delivery_method_id: type: string format: uuid description: ID of the delivery method to use for this customer. If not provided, the `delivery_method` must be provided. delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' description: The method to use for delivering invoices to this customer. If not provided, the `delivery_method_id` must be provided. required: - billing_provider ScheduledChargeAdd: type: object required: - id - product - schedule properties: id: type: string format: uuid product: type: object required: - id - name properties: id: type: string format: uuid name: type: string schedule: $ref: '#/components/schemas/SchedulePointInTime' name: type: string minLength: 1 description: displayed on invoices netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. ContractTransition: type: object required: - type - from_contract_id - to_contract_id properties: type: type: string enum: - SUPERSEDE - RENEWAL from_contract_id: type: string format: uuid to_contract_id: type: string format: uuid UpdatePrepaidBalanceThresholdConfiguration: type: object properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated. type: number recharge_to_amount: description: Specify the amount the balance should be recharged to. type: number custom_credit_type_id: nullable: true description: If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency. type: string format: uuid commit: $ref: '#/components/schemas/UpdatePrepaidBalanceThresholdCommit' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfigV2' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts nullable: true allOf: - $ref: '#/components/schemas/UpdateDiscountConfiguration' Rate: type: object required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - CUSTOM - custom - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 SUBSCRIPTION: - ff:legacy-subscriptions-enabled subscription: - ff:legacy-subscriptions-enabled TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. custom_rate: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. quantity: type: number x-mint: groups: - ff:legacy-subscriptions-enabled description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean x-mint: groups: - ff:legacy-subscriptions-enabled description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' pricing_group_values: type: object description: if pricing groups are used, this will contain the values used to calculate the price additionalProperties: type: string credit_type: $ref: '#/components/schemas/CreditType' PostpaidCommitManualLedgerEntry: type: object required: - type - timestamp - amount - reason properties: type: type: string enum: - POSTPAID_COMMIT_MANUAL timestamp: type: string format: date-time amount: type: number reason: type: string ContractHierarchyConfigurationInput: type: object properties: parent: $ref: '#/components/schemas/ContractParentHierarchyConfigurationInput' payer: type: string enum: - SELF - PARENT - self - parent description: 'Indicates which customer should pay for the child''s invoice charges **SELF**: The child pays for its own invoice charges **PARENT**: The parent pays for the child''s invoice charges' usage_statement_behavior: type: string enum: - CONSOLIDATE - SEPARATE - consolidate - separate description: 'Indicates the behavior of the child''s invoice statements on the parent''s invoices. **CONSOLIDATE**: Child''s invoice statements will be added to parent''s consolidated invoices **SEPARATE**: Child''s invoice statements will appear not appear on parent''s consolidated invoices' parent_behavior: type: object properties: invoice_consolidation_type: type: string enum: - CONCATENATE - NONE - concatenate - none description: 'Indicates the desired behavior of consolidated invoices generated by the parent in a customer hierarchy **CONCATENATE**: Statements on the invoices of child customers will be appended to the consolidated invoice **NONE**: Do not generate consolidated invoices' ResellerRoyaltyOrUpdateV2: type: object required: - reseller_type properties: reseller_type: $ref: '#/components/schemas/ResellerType' fraction: type: number netsuite_reseller_id: type: string starting_at: type: string format: date-time ending_before: type: string format: date-time nullable: true applicable_product_tags: type: array items: type: string applicable_product_ids: type: array items: type: string reseller_contract_value: type: number aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_account_id: type: string gcp_offer_id: type: string RecurringCommit: allOf: - $ref: '#/components/schemas/RecurringCredit' - type: object properties: invoice_amount: type: object required: - unit_price - quantity - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount the customer should be billed for the commit. Not required. SubscriptionRateInput: type: object required: - billing_frequency - product_id properties: billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY - monthly - quarterly - annual - weekly description: Frequency to bill subscription with. Together with product_id, must match existing rate on the rate card. product_id: type: string format: uuid description: Must be subscription type product CommitHierarchyChildAccessNone: type: object required: - type properties: type: type: string enum: - NONE - none CommitInputV2: type: object required: - type - product_id properties: type: type: string enum: - PREPAID - prepaid - POSTPAID - postpaid rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/ScheduleDurationInputV2' description: 'Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.' invoice_schedule: $ref: '#/components/schemas/SchedulePointInTimeInputV2' description: 'Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.' amount: type: number description: (DEPRECATED) Use access_schedule and invoice_schedule instead. description: type: string description: Used only in UI/API. It is not exposed to end customers. rollover_fraction: type: number description: Fraction of unused segments that will be rolled over. Must be between 0 and 1. priority: type: number description: If multiple commits are applicable, the one with the lower priority will apply first. applicable_product_ids: type: array items: type: string format: uuid description: Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: commit $ref: '#/components/schemas/CustomField' temporary_id: type: string description: A temporary ID for the commit that can be used to reference the commit for commit specific overrides. payment_gate_config: $ref: '#/components/schemas/CommitPaymentGateConfigV2' description: optionally payment gate this commit hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control RecurringCreditTemplateInput: type: object required: - product_id - access_amount - priority - commit_duration - starting_at_offset properties: name: type: string minLength: 1 description: displayed on invoices. will be passed through to the individual commits product_id: type: string format: uuid access_amount: type: object required: - unit_price - credit_type_id properties: unit_price: type: number quantity: type: number description: This field is required unless a subscription is attached via `subscription_config`. credit_type_id: type: string format: uuid description: The amount of commit to grant. description: type: string description: Will be passed down to the individual commits rollover_fraction: type: number description: Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1. priority: type: number description: Will be passed down to the individual commits applicable_product_ids: type: array items: type: string format: uuid description: Will be passed down to the individual commits applicable_product_tags: type: array items: type: string description: Will be passed down to the individual commits specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' temporary_id: type: string description: A temporary ID that can be used to reference the recurring commit for commit specific overrides. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Whether the created commits will use the commit rate or list rate starting_at_offset: $ref: '#/components/schemas/RelativeDate' description: Offset relative to the contract start date that determines the start time for the first commit duration: $ref: '#/components/schemas/RelativeDate' description: Offset relative to the recurring credit start that determines when the contract will stop creating recurring commits. optional commit_duration: type: object required: - value properties: value: type: number unit: type: string enum: - periods - PERIODS description: Defines the length of the access schedule for each created commit/credit. The value represents the number of units. Unit defaults to "PERIODS", where the length of a period is determined by the recurrence_frequency. recurrence_frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly description: 'The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit''s starting_at rather than the usage invoice dates.' proration: type: string enum: - NONE - none - FIRST - first - LAST - last - FIRST_AND_LAST - first_and_last description: Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits). subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfigInput' PostpaidCommitExpirationLedgerEntry: type: object required: - type - timestamp - amount properties: type: type: string enum: - POSTPAID_COMMIT_EXPIRATION timestamp: type: string format: date-time amount: type: number ContractV2: type: object required: - id - customer_id - starting_at - commits - overrides - scheduled_charges - transitions - created_at - created_by - usage_statement_schedule - usage_filter properties: id: type: string format: uuid customer_id: type: string format: uuid package_id: x-stainless-skip: true type: string format: uuid description: (BETA) ID of the package this contract was created from, if applicable. uniqueness_key: $ref: '#/components/schemas/UniquenessKey' description: Optional uniqueness key to prevent duplicate contract creations. name: type: string salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. rate_card_id: type: string format: uuid starting_at: type: string format: date-time commits: type: array items: $ref: '#/components/schemas/CommitV2' credits: type: array items: $ref: '#/components/schemas/CreditV2' has_more: $ref: '#/components/schemas/HasMore' overrides: type: array items: $ref: '#/components/schemas/OverrideV2' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/Discount' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProService' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledCharge' scheduled_charges_on_usage_invoices: $ref: '#/components/schemas/ScheduledChargesOnUsageInvoices' transitions: type: array items: $ref: '#/components/schemas/ContractTransition' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: type: object required: - reseller_type - segments properties: reseller_type: $ref: '#/components/schemas/ResellerType' segments: type: array items: $ref: '#/components/schemas/ResellerRoyalty' created_at: type: string format: date-time created_by: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. net_payment_terms_days: type: number ending_before: type: string format: date-time archived_at: type: string format: date-time total_contract_value: type: number usage_filter: type: array items: $ref: '#/components/schemas/UsageFilterV2' usage_statement_schedule: $ref: '#/components/schemas/UsageStatementSchedule' multiplier_override_prioritization: type: string enum: - LOWEST_MULTIPLIER - lowest_multiplier - EXPLICIT - explicit description: Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list prices automatically. EXPLICIT prioritization requires specifying priorities for each multiplier; the one with the lowest priority value will be prioritized first. custom_fields: x-cf-entity: contract $ref: '#/components/schemas/CustomField' customer_billing_provider_configuration: type: object description: This field's availability is dependent on your client's configuration. required: - id - billing_provider - delivery_method properties: id: type: string format: uuid description: ID of Customer's billing provider configuration. billing_provider: $ref: '#/components/schemas/BillingProviderType' delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitV2' recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditV2' spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfigurationV2' prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfigurationV2' subscriptions: $ref: '#/components/schemas/Subscriptions' hierarchy_configuration: $ref: '#/components/schemas/HierarchyConfigurationV2' priority: x-mint: groups: - ff:account-hierarchy-priority-enabled type: number description: Priority of the contract. CreateHistoricalContractUsageInvoiceRequestPayload: type: object required: - invoices - preview properties: invoices: type: array items: $ref: '#/components/schemas/HistoricalContractUsageInvoiceInputPayload' preview: type: boolean PaymentGateConfigV2: type: object required: - payment_gate_type properties: payment_gate_type: type: string enum: - NONE - STRIPE - EXTERNAL description: Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance. tax_type: type: string enum: - NONE - STRIPE - ANROK - PRECALCULATED description: Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE. stripe_config: description: Only applicable if using STRIPE as your payment gateway type. type: object required: - payment_type properties: payment_type: type: string enum: - INVOICE - PAYMENT_INTENT description: If left blank, will default to INVOICE invoice_metadata: type: object additionalProperties: type: string description: Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. precalculated_tax_config: description: Only applicable if using PRECALCULATED as your tax type. type: object required: - tax_amount properties: tax_amount: type: number description: Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule tax_name: type: string description: Name of the tax to be applied. This may be used in an invoice line item description. OverwriteRateInputV2: type: object required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. quantity: type: number description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' custom_rate: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. credit_type_id: type: string format: uuid RefundInvoiceUpdate: type: object required: - invoice_id - date properties: invoice_id: type: string format: uuid date: type: string format: date-time OptionalThresholdCommitFields: type: object properties: applicable_product_ids: type: array items: type: string format: uuid description: Which products the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: x-mint: groups: - ff:commit-specifiers type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' SetUsageFilterPayload: type: object required: - customer_id - contract_id - group_key - group_values - starting_at properties: customer_id: type: string format: uuid contract_id: type: string format: uuid group_key: type: string group_values: type: array items: type: string starting_at: type: string format: date-time ScheduledChargesOnUsageInvoices: type: string description: Determines which scheduled and commit charges to consolidate onto the Contract's usage invoice. The charge's `timestamp` must match the usage invoice's `ending_before` date for consolidation to occur. This field cannot be modified after a Contract has been created. If this field is omitted, charges will appear on a separate invoice from usage charges. enum: - ALL ScheduledCharge: type: object required: - id - product - schedule properties: id: type: string format: uuid product: type: object required: - id - name properties: id: type: string format: uuid name: type: string schedule: $ref: '#/components/schemas/SchedulePointInTime' name: type: string minLength: 1 description: displayed on invoices netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: scheduled_charge $ref: '#/components/schemas/CustomField' archived_at: type: string format: date-time ChildHierarchyConfiguration: type: object required: - parent properties: parent: $ref: '#/components/schemas/HierarchyLink' description: The single parent contract/customer for this child. payer: type: string enum: - SELF - PARENT description: 'Indicates which customer should pay for the child''s invoice charges **SELF**: The child pays for its own invoice charges **PARENT**: The parent pays for the child''s invoice charges' usage_statement_behavior: type: string enum: - CONSOLIDATE - SEPARATE description: 'Indicates the behavior of the child''s invoice statements on the parent''s invoices. **CONSOLIDATE**: Child''s invoice statements will be added to parent''s consolidated invoices **SEPARATE**: Child''s invoice statements will appear not appear on parent''s consolidated invoices' PrepaidCommitManualLedgerEntry: type: object required: - type - timestamp - amount - reason properties: type: type: string enum: - PREPAID_COMMIT_MANUAL timestamp: type: string format: date-time amount: type: number reason: type: string DiscountInputV2: type: object required: - product_id - schedule properties: product_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices schedule: $ref: '#/components/schemas/SchedulePointInTimeInputV2' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: discount $ref: '#/components/schemas/CustomField' UpdateInvoiceScheduleInput: type: object properties: add_schedule_items: type: array items: type: object required: - timestamp properties: timestamp: type: string format: date-time amount: type: number quantity: type: number unit_price: type: number update_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid timestamp: type: string format: date-time amount: type: number quantity: type: number unit_price: type: number remove_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid UsageStatementScheduleInput: type: object required: - frequency properties: frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly day: type: string description: If not provided, defaults to the first day of the month. enum: - FIRST_OF_MONTH - first_of_month - CONTRACT_START - contract_start - CUSTOM_DATE - custom_date billing_anchor_date: type: string format: date-time description: Required when using CUSTOM_DATE. This option lets you set a historical billing anchor date, aligning future billing cycles with a chosen cadence. For example, if a contract starts on 2024-09-15 and you set the anchor date to 2024-09-10 with a MONTHLY frequency, the first usage statement will cover 09-15 to 10-10. Subsequent statements will follow the 10th of each month. invoice_generation_starting_at: type: string format: date-time description: The date Metronome should start generating usage invoices. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them. OverrideSpecifierInput: type: object properties: commit_ids: type: array items: type: string description: Can only be used for commit specific overrides. Must be used in conjunction with one of `product_id`, `product_tags`, `pricing_group_values`, or `presentation_group_values`. If provided, the override will only apply to the specified commits. If not provided, the override will apply to all commits. recurring_commit_ids: type: array items: type: string description: Can only be used for commit specific overrides. Must be used in conjunction with one of `product_id`, `product_tags`, `pricing_group_values`, or `presentation_group_values`. If provided, the override will only apply to commits created by the specified recurring commit ids. product_id: type: string format: uuid description: If provided, the override will only apply to the product with the specified ID. product_tags: type: array items: type: string description: If provided, the override will only apply to products with all the specified tags. pricing_group_values: type: object description: A map of pricing group names to values. The override will only apply to products with the specified pricing group values. additionalProperties: type: string presentation_group_values: type: object description: A map of group names to values. The override will only apply to line items with the specified presentation group values. additionalProperties: type: string billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - monthly - quarterly - annual - WEEKLY - weekly exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' BillingProviderConfigurationUpdate: type: object required: - billing_provider_configuration - schedule properties: billing_provider_configuration: type: object properties: billing_provider_configuration_id: type: string format: uuid billing_provider: $ref: '#/components/schemas/BillingProviderType' delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' schedule: description: Indicates when the billing provider will be active on the contract. Any charges accrued during the schedule will be billed to the indicated billing provider. type: object required: - effective_at properties: effective_at: $ref: '#/components/schemas/BillingProviderConfigurationUpdateEffectiveAtType' description: When the billing provider update will take effect. UsageStatementScheduleTemplateInput: type: object required: - frequency properties: frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly day: type: string description: If not provided, defaults to the first day of the month. enum: - FIRST_OF_MONTH - first_of_month - CONTRACT_START - contract_start invoice_generation_starting_at_offset: $ref: '#/components/schemas/RelativeDate' description: The offset at which Metronome should start generating usage invoices, relative to the contract start date. If unspecified, contract start date will be used. This is useful to set if you want to import historical invoices via our 'Create Historical Invoices' API rather than having Metronome automatically generate them. RecurringCreditInputV2: type: object required: - product_id - access_amount - priority - commit_duration - starting_at properties: name: type: string minLength: 1 description: displayed on invoices. will be passed through to the individual commits product_id: type: string format: uuid access_amount: type: object required: - unit_price - credit_type_id properties: unit_price: type: number quantity: type: number description: This field is required unless a subscription is attached via `subscription_config`. credit_type_id: type: string format: uuid description: The amount of commit to grant. description: type: string description: Will be passed down to the individual commits rollover_fraction: type: number description: Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1. priority: type: number description: Will be passed down to the individual commits applicable_product_ids: type: array items: type: string format: uuid description: Will be passed down to the individual commits applicable_product_tags: type: array items: type: string description: Will be passed down to the individual commits specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: Will be passed down to the individual commits temporary_id: type: string description: A temporary ID that can be used to reference the recurring commit for commit specific overrides. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Whether the created commits will use the commit rate or list rate starting_at: type: string format: date-time description: determines the start time for the first commit ending_before: type: string format: date-time description: Determines when the contract will stop creating recurring commits. optional commit_duration: type: object required: - value properties: value: type: number unit: type: string enum: - periods - PERIODS description: Defines the length of the access schedule for each created commit/credit. The value represents the number of units. Unit defaults to "PERIODS", where the length of a period is determined by the recurrence_frequency. recurrence_frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly description: 'The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit''s starting_at rather than the usage invoice dates.' proration: type: string enum: - NONE - none - FIRST - first - LAST - last - FIRST_AND_LAST - first_and_last description: Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits). hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for recurring credit hierarchy access control subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfigInputV2' CustomerRevenueSystemConfigurationCreateCustomerInput: x-mint: groups: - ff:revenue-rec-configurations-enabled type: object properties: provider: $ref: '#/components/schemas/RevenueSystemProviderType' description: The revenue system provider set for this configuration. configuration: type: object additionalProperties: true description: Configuration for the revenue system provider. The structure of this object is specific to the revenue system provider. For NetSuite, this should contain `netsuite_customer_id`. delivery_method_id: type: string format: uuid description: ID of the delivery method to use for this customer. If not provided, the `delivery_method` must be provided. delivery_method: $ref: '#/components/schemas/RevenueSystemDeliveryMethodType' description: The method to use for delivering invoices to this customer. If not provided, the `delivery_method_id` must be provided. required: - provider UpdateSpendThresholdConfiguration: type: object properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated. type: number commit: $ref: '#/components/schemas/UpdateSpendThresholdCommit' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfigV2' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts nullable: true allOf: - $ref: '#/components/schemas/UpdateDiscountConfiguration' OptionalThresholdCommitFieldsUpdate: type: object properties: applicable_product_ids: nullable: true type: array items: type: string format: uuid description: Which products the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products. applicable_product_tags: nullable: true type: array items: type: string description: Which tags the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products. specifiers: x-mint: groups: - ff:commit-specifiers nullable: true type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' ContractAmendment: type: object required: - id - starting_at - commits - overrides - scheduled_charges - created_at - created_by properties: id: type: string format: uuid salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. starting_at: type: string format: date-time commits: type: array items: $ref: '#/components/schemas/Commit' credits: type: array items: $ref: '#/components/schemas/Credit' overrides: type: array items: $ref: '#/components/schemas/Override' discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/Discount' professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProService' scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledCharge' reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ResellerRoyaltyOrUpdate' created_at: type: string format: date-time created_by: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. SubscriptionTemplateInput: type: object required: - subscription_rate - collection_schedule - proration properties: subscription_rate: $ref: '#/components/schemas/SubscriptionRateInput' name: type: string description: type: string collection_schedule: type: string enum: - ADVANCE - ARREARS - advance - arrears proration: $ref: '#/components/schemas/SubscriptionProrationInput' initial_quantity: type: number description: The initial quantity for the subscription. It must be non-negative value. Required if quantity_management_mode is QUANTITY_ONLY. starting_at_offset: $ref: '#/components/schemas/RelativeDate' description: Relative date from contract start date corresponding to the inclusive start time for the subscription. If not provided, defaults to contract start date duration: $ref: '#/components/schemas/RelativeDate' description: Lifetime of the subscription from its start. If not provided, subscription inherits contract end date. temporary_id: type: string description: A temporary ID used to reference the subscription in recurring commit/credit subscription configs created within the same payload. quantity_management_mode: type: string enum: - SEAT_BASED - seat_based - QUANTITY_ONLY - quantity_only description: 'Determines how the subscription''s quantity is controlled. Defaults to QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified directly on the subscription. `initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation. **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add user_123) to increment and decrement a subscription quantity, rather than directly providing the quantity. You must use a **SEAT_BASED** subscription to use a linked recurring credit with an allocation per seat. `seat_config` must be provided with this option.' seat_config: $ref: '#/components/schemas/SubscriptionSeatConfigTemplateInput' custom_fields: x-cf-entity: package_subscription $ref: '#/components/schemas/CustomField' SubscriptionBillingPeriod: type: object required: - starting_at - ending_before properties: starting_at: type: string format: date-time ending_before: type: string format: date-time CommitSpecifierInput: type: object properties: product_id: type: string format: uuid description: If provided, the specifier will only apply to the product with the specified ID. product_tags: type: array items: type: string description: If provided, the specifier will only apply to products with all the specified tags. pricing_group_values: type: object additionalProperties: type: string description: If provided, the specifier will apply to product usage with these set of pricing group values. presentation_group_values: type: object additionalProperties: type: string description: If provided, the specifier will apply to product usage with these set of presentation group values. exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' TaxProviderType: type: string enum: - anrok - avalara - stripe Subscription: required: - subscription_rate - collection_schedule - proration - quantity_schedule - starting_at - quantity_management_mode - billing_periods type: object properties: id: type: string format: uuid subscription_rate: $ref: '#/components/schemas/SubscriptionRate' name: type: string description: type: string collection_schedule: type: string enum: - ADVANCE - ARREARS - advance - arrears proration: $ref: '#/components/schemas/SubscriptionProration' quantity_schedule: type: array description: List of quantity schedule items for the subscription. Only includes the current quantity and future quantity changes. items: $ref: '#/components/schemas/SubscriptionQuantitySchedule' billing_periods: $ref: '#/components/schemas/SubscriptionBillingPeriods' quantity_management_mode: type: string enum: - SEAT_BASED - seat_based - QUANTITY_ONLY - quantity_only description: 'Determines how the subscription''s quantity is controlled. Defaults to QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified directly on the subscription. `initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation. **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add user_123) to increment and decrement a subscription quantity, rather than directly providing the quantity. You must use a **SEAT_BASED** subscription to use a linked recurring credit with an allocation per seat. `seat_config` must be provided with this option.' seat_config: $ref: '#/components/schemas/SubscriptionSeatConfig' starting_at: type: string format: date-time ending_before: type: string format: date-time fiat_credit_type_id: type: string format: uuid custom_fields: x-cf-entity: subscription $ref: '#/components/schemas/CustomField' UpdateSubscriptionInput: type: object required: - subscription_id properties: subscription_id: type: string format: uuid ending_before: type: string format: date-time nullable: true quantity_management_mode_update: type: object description: Update the subscription's quantity management mode from QUANTITY_ONLY to SEAT_BASED with the provided seat_group_key. required: - quantity_management_mode - seat_config properties: quantity_management_mode: type: string enum: - SEAT_BASED - seat_based seat_config: type: object required: - seat_group_key properties: seat_group_key: type: string quantity_updates: type: array description: Quantity changes are applied on the effective date based on the order which they are sent. For example, if I scheduled the quantity to be 12 on May 21 and then scheduled a quantity delta change of -1, the result from that day would be 11. items: type: object required: - starting_at properties: quantity: type: number description: The new quantity for the subscription. Must be provided if quantity_delta is not provided. Must be non-negative. quantity_delta: type: number description: The delta to add to the subscription's quantity. Must be provided if quantity is not provided. Can't be zero. It also can't result in a negative quantity on the subscription. starting_at: type: string format: date-time seat_updates: $ref: '#/components/schemas/SubscriptionSeatUpdateInput' CreditV2: type: object required: - id - type - product properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid type: type: string enum: - CREDIT name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits. description: type: string applicable_product_ids: type: array items: type: string format: uuid applicable_product_tags: type: array items: type: string specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' applicable_contract_ids: type: array items: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. ledger: type: array items: $ref: '#/components/schemas/CreditLedgerV2' description: A list of ordered events that impact the balance of a credit. For example, an invoice deduction or an expiration. balance: $ref: '#/components/schemas/BalanceForCommitsAndCredits' custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control rolled_over_from: type: object required: - contract_id - credit_id properties: credit_id: type: string format: uuid contract_id: type: string format: uuid created_at: type: string format: date-time description: 'Timestamp of when the credit was created. - Recurring credits: latter of credit service period date and parent credit start date ' recurring_credit_id: type: string format: uuid description: The ID of the recurring credit that created this credit subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfig' CustomerBillingProviderConfigurationLookup: type: object description: The billing provider configuration associated with a contract. Provide either an ID or the provider and delivery method. properties: billing_provider_configuration_id: type: string format: uuid description: The Metronome ID of the billing provider configuration. Use when a customer has multiple configurations with the same billing provider and delivery method. Otherwise, specify the billing_provider and delivery_method. billing_provider: $ref: '#/components/schemas/ContractsBillingProviderType' description: Do not specify if using billing_provider_configuration_id. delivery_method: $ref: '#/components/schemas/BillingProviderDeliveryMethodType' description: Do not specify if using billing_provider_configuration_id. RecurringCommitUpdate: allOf: - $ref: '#/components/schemas/RecurringCreditUpdate' - type: object properties: invoice_amount: type: object properties: unit_price: type: number quantity: type: number ContractEdit: type: object required: - id properties: id: type: string format: uuid timestamp: type: string format: date-time uniqueness_key: $ref: '#/components/schemas/UniquenessKey' add_overrides: type: array items: $ref: '#/components/schemas/OverrideV2' add_pro_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/ProService' add_reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/ResellerRoyaltyOrUpdateV2' add_discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/Discount' add_scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeAdd' add_commits: type: array items: $ref: '#/components/schemas/CommitAdd' add_credits: type: array items: $ref: '#/components/schemas/CreditAdd' add_recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitV2' add_recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditV2' add_usage_filters: type: array items: $ref: '#/components/schemas/UsageFilterV2' add_subscriptions: $ref: '#/components/schemas/Subscriptions' add_prepaid_balance_threshold_configuration: $ref: '#/components/schemas/PrepaidBalanceThresholdConfigurationV2' add_spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfigurationV2' update_contract_name: type: string nullable: true description: Value to update the contract name to. If not provided, the contract name will remain unchanged. update_discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/DiscountUpdate' update_scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeUpdate' update_commits: type: array items: $ref: '#/components/schemas/CommitUpdate' update_credits: type: array items: $ref: '#/components/schemas/CreditUpdate' update_recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitUpdate' update_recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditUpdate' update_contract_end_date: type: string format: date-time update_refund_invoices: type: array items: $ref: '#/components/schemas/RefundInvoiceUpdate' update_subscriptions: type: array description: Optional list of subscriptions to update. items: $ref: '#/components/schemas/SubscriptionsUpdate' update_prepaid_balance_threshold_configuration: $ref: '#/components/schemas/UpdatePrepaidBalanceThresholdConfiguration' update_spend_threshold_configuration: $ref: '#/components/schemas/UpdateSpendThresholdConfiguration' archive_commits: type: array items: type: object required: - id properties: id: type: string format: uuid archive_credits: type: array items: type: object required: - id properties: id: type: string format: uuid archive_scheduled_charges: type: array items: type: object required: - id properties: id: type: string format: uuid remove_overrides: type: array items: type: object required: - id properties: id: type: string format: uuid PrepaidBalanceThresholdConfigurationV2: type: object required: - is_enabled - threshold_amount - recharge_to_amount - commit - payment_gate_config properties: is_enabled: type: boolean description: When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state. threshold_amount: description: Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated. type: number recharge_to_amount: description: Specify the amount the balance should be recharged to. type: number custom_credit_type_id: description: If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency. type: string format: uuid commit: $ref: '#/components/schemas/PrepaidBalanceThresholdCommitV2' payment_gate_config: $ref: '#/components/schemas/PaymentGateConfigV2' discount_configuration: x-mint: groups: - ff:threshold-billing-discounts $ref: '#/components/schemas/DiscountConfiguration' PrepaidCommitCreditedLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - PREPAID_COMMIT_CREDITED timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid CustomerRevenueSystemConfigurationLookup: x-mint: groups: - ff:revenue-rec-configurations-enabled type: object description: The revenue system configuration associated with a contract. Provide either an ID or the provider and delivery method. properties: revenue_system_configuration_id: type: string format: uuid description: The Metronome ID of the revenue system configuration. Use when a customer has multiple configurations with the same provider and delivery method. Otherwise, specify the provider and delivery_method. provider: $ref: '#/components/schemas/RevenueSystemProviderType' description: The system that is providing services for revenue recognition. Do not specify if using revenue_system_configuration_id. delivery_method: $ref: '#/components/schemas/RevenueSystemDeliveryMethodType' description: How revenue recognition records should be delivered to the revenue system. Do not specify if using revenue_system_configuration_id. TierMetadata: required: - level - starting_at type: object properties: size: type: string nullable: true level: type: number starting_at: type: string SubscriptionConfigAllocation: type: string enum: - INDIVIDUAL - POOLED HistoricalContractUsageInvoiceLineItemInput: type: object required: - product_id - inclusive_start_date - exclusive_end_date properties: product_id: type: string format: uuid inclusive_start_date: type: string format: date-time exclusive_end_date: type: string format: date-time quantity: type: number pricing_group_values: type: object additionalProperties: type: string presentation_group_values: type: object additionalProperties: type: string subtotals_with_quantity: type: array items: $ref: '#/components/schemas/HistoricalContractUsageInvoiceLineItemBreakdownSubtotal' ResellerRoyaltyInput: type: object required: - reseller_type - starting_at - fraction - netsuite_reseller_id properties: reseller_type: $ref: '#/components/schemas/ResellerType' fraction: type: number netsuite_reseller_id: type: string applicable_product_ids: type: array items: type: string format: uuid description: Must provide at least one of applicable_product_ids or applicable_product_tags. applicable_product_tags: type: array items: type: string description: Must provide at least one of applicable_product_ids or applicable_product_tags. starting_at: type: string format: date-time ending_before: type: string format: date-time reseller_contract_value: type: number aws_options: type: object properties: aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_options: type: object properties: gcp_account_id: type: string gcp_offer_id: type: string ProService: type: object required: - id - product_id - unit_price - quantity - max_amount properties: id: type: string format: uuid description: type: string product_id: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount. max_amount: type: number description: Maximum amount for the term. custom_fields: x-cf-entity: professional_service $ref: '#/components/schemas/CustomField' CreditRolloverLedgerEntry: type: object required: - type - timestamp - amount - new_contract_id - segment_id properties: type: type: string enum: - CREDIT_ROLLOVER timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid new_contract_id: type: string format: uuid SubscriptionProration: type: object required: - is_prorated - invoice_behavior properties: is_prorated: type: boolean invoice_behavior: type: string enum: - BILL_IMMEDIATELY - BILL_ON_NEXT_COLLECTION_DATE - bill_immediately - bill_on_next_collection_date RecurringCredit: type: object required: - id - product - access_amount - priority - commit_duration - starting_at - rate_type properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid name: type: string description: Displayed on invoices. Will be passed through to the individual commits product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_amount: type: object required: - unit_price - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount of commit to grant. description: type: string description: Will be passed down to the individual commits rollover_fraction: type: number description: Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1. priority: type: number description: Will be passed down to the individual commits applicable_product_ids: type: array items: type: string format: uuid description: Will be passed down to the individual commits applicable_product_tags: type: array items: type: string description: Will be passed down to the individual commits specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: Will be passed down to the individual commits rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Whether the created commits will use the commit rate or list rate starting_at: type: string format: date-time description: Determines the start time for the first commit ending_before: type: string format: date-time description: Determines when the contract will stop creating recurring commits. Optional commit_duration: type: object required: - value properties: value: type: number unit: type: string enum: - periods - PERIODS description: The amount of time the created commits will be valid for recurrence_frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly description: 'The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit''s starting_at rather than the usage invoice dates.' proration: type: string enum: - NONE - none - FIRST - first - LAST - last - FIRST_AND_LAST - first_and_last description: Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits). subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfig' hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for recurring commit/credit hierarchy access control UpdateRecurringCommitInput: type: object required: - recurring_commit_id properties: recurring_commit_id: type: string format: uuid access_amount: type: object properties: unit_price: type: number quantity: type: number invoice_amount: type: object properties: unit_price: type: number quantity: type: number ending_before: type: string format: date-time nullable: true rate_type: type: string enum: - LIST_RATE - list_rate - COMMIT_RATE - commit_rate description: If provided, updates the recurring commit to use the specified rate type when generating future commits. CommitHierarchyConfiguration: type: object required: - child_access properties: child_access: oneOf: - $ref: '#/components/schemas/CommitHierarchyChildAccessAll' - $ref: '#/components/schemas/CommitHierarchyChildAccessNone' - $ref: '#/components/schemas/CommitHierarchyChildAccessContractIds' ScheduledChargeTemplateInput: type: object required: - product_id - schedule properties: product_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices schedule: $ref: '#/components/schemas/RelativeSchedulePointInTimeInput' custom_fields: x-cf-entity: package_scheduled_charge $ref: '#/components/schemas/CustomField' PostpaidCommitAutomatedInvoiceDeductionLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid UsageFilter: type: object required: - initial - current - updates properties: initial: $ref: '#/components/schemas/BaseUsageFilter' current: nullable: true $ref: '#/components/schemas/BaseUsageFilter' updates: type: array items: $ref: '#/components/schemas/BaseUsageFilterWithRequiredStartingAt' PrepaidCommitRolloverLedgerEntry: type: object required: - type - timestamp - amount - new_contract_id - segment_id properties: type: type: string enum: - PREPAID_COMMIT_ROLLOVER timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid new_contract_id: type: string format: uuid RevenueSystemDeliveryMethodType: description: How revenue recognition records should be delivered to the revenue system. x-mint: groups: - ff:revenue-rec-configurations-enabled type: string enum: - direct_to_billing_provider CreditManualLedgerEntry: type: object required: - type - timestamp - amount - reason properties: type: type: string enum: - CREDIT_MANUAL timestamp: type: string format: date-time amount: type: number reason: type: string UsageFilterV2: type: object required: - group_key - group_values - starting_at properties: group_key: type: string group_values: type: array items: type: string starting_at: description: This will match contract starting_at value if usage filter is active from the beginning of the contract. type: string format: date-time ending_before: description: This will match contract ending_before value if usage filter is active until the end of the contract. It will be undefined if the contract is open-ended. type: string format: date-time ResellerType: type: string enum: - AWS - AWS_PRO_SERVICE - GCP - GCP_PRO_SERVICE CreditCanceledLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - CREDIT_CANCELED timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid CreditAdd: type: object required: - id - type - product properties: id: type: string format: uuid type: type: string enum: - CREDIT name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits. description: type: string rollover_fraction: type: number rate_type: type: string enum: - COMMIT_RATE - LIST_RATE applicable_product_ids: type: array items: type: string format: uuid applicable_product_tags: type: array items: type: string specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for recurring credit hierarchy access control UpdateRecurringCreditInput: type: object required: - recurring_credit_id properties: recurring_credit_id: type: string format: uuid access_amount: type: object properties: unit_price: type: number quantity: type: number ending_before: type: string format: date-time nullable: true rate_type: type: string enum: - LIST_RATE - list_rate - COMMIT_RATE - commit_rate description: If provided, updates the recurring credit to use the specified rate type when generating future credits. CreditInput: type: object required: - product_id - access_schedule properties: name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/ScheduleDurationInput' description: Schedule for distributing the credit to the customer. description: type: string description: Used only in UI/API. It is not exposed to end customers. applicable_product_ids: type: array items: type: string format: uuid description: Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. priority: type: number description: If multiple credits are applicable, the one with the lower priority will apply first. custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' rollover_fraction: type: number description: Fraction of unused segments that will be rolled over. Must be between 0 and 1. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control AccessScheduleUpdate: type: object properties: add_schedule_items: type: array items: type: object required: - amount - starting_at - ending_before properties: amount: type: number starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive) update_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid amount: type: number starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive) remove_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid RecurringCommitSubscriptionConfigInput: type: object required: - apply_seat_increase_config - subscription_id properties: allocation: $ref: '#/components/schemas/SubscriptionConfigAllocationInput' apply_seat_increase_config: $ref: '#/components/schemas/ApplySeatIncreaseConfigForRecurringCommit' subscription_id: type: string description: ID of the subscription to configure on the recurring commit/credit. PostpaidCommit: type: object required: - id description: ID of the commit. properties: id: type: string format: uuid ResellerRoyalty: type: object required: - reseller_type - starting_at - fraction - netsuite_reseller_id properties: reseller_type: $ref: '#/components/schemas/ResellerType' fraction: type: number applicable_product_tags: type: array items: type: string applicable_product_ids: type: array items: type: string netsuite_reseller_id: type: string starting_at: type: string format: date-time ending_before: type: string format: date-time reseller_contract_value: type: number aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_account_id: type: string gcp_offer_id: type: string ContractsBillingProviderType: type: string enum: - aws_marketplace - azure_marketplace - gcp_marketplace - stripe - netsuite UniquenessKey: type: string minLength: 1 maxLength: 128 description: Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error. BillableStatus: type: string enum: - billable - unbillable SubscriptionsUpdate: type: object required: - id properties: id: type: string format: uuid ending_before: type: string format: date-time quantity_updates: type: array items: type: object required: - starting_at properties: quantity: type: number quantity_delta: type: number starting_at: type: string format: date-time seat_updates: $ref: '#/components/schemas/SubscriptionSeatUpdateInput' description: Manage subscription seats for subscriptions in SEAT_BASED mode. Error: required: - message type: object properties: message: type: string Id: required: - id type: object properties: id: type: string format: uuid RelativeDate: type: object required: - value - unit properties: value: type: integer unit: type: string enum: - DAYS - WEEKS - MONTHS - YEARS RecurringCreditUpdate: type: object required: - id properties: id: type: string format: uuid ending_before: type: string format: date-time access_amount: type: object properties: unit_price: type: number quantity: type: number rate_type: type: string enum: - LIST_RATE - list_rate - COMMIT_RATE - commit_rate CommitLedgerV2: oneOf: - $ref: '#/components/schemas/PrepaidCommitSegmentStartLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitRolloverLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitExpirationLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitCanceledLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitCreditedLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitSeatBasedAdjustmentLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitInitialBalanceLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitRolloverLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitTrueupLedgerEntry' - $ref: '#/components/schemas/PrepaidCommitManualLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitManualLedgerEntry' - $ref: '#/components/schemas/PostpaidCommitExpirationLedgerEntry' Credit: type: object required: - id - type - product properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid type: type: string enum: - CREDIT name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits. description: type: string recurring_credit_id: type: string format: uuid description: The ID of the recurring credit that this credit was generated from, if applicable. subscription_config: type: object properties: subscription_id: type: string format: uuid allocation: $ref: '#/components/schemas/SubscriptionConfigAllocation' apply_seat_increase_config: $ref: '#/components/schemas/ApplySeatIncreaseConfigForRecurringCommit' description: The subscription configuration for this credit, if it was generated from a recurring credit with a subscription attached. applicable_product_ids: type: array items: type: string format: uuid applicable_product_tags: type: array items: type: string specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' applicable_contract_ids: type: array items: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. ledger: type: array items: $ref: '#/components/schemas/CreditLedger' description: A list of ordered events that impact the balance of a credit. For example, an invoice deduction or an expiration. balance: $ref: '#/components/schemas/BalanceForCommitsAndCredits' custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' rate_type: type: string enum: - COMMIT_RATE - LIST_RATE uniqueness_key: $ref: '#/components/schemas/UniquenessKeyForCommitsAndCredits' hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control rolled_over_from: type: object required: - contract_id - credit_id properties: credit_id: type: string format: uuid contract_id: type: string format: uuid UniquenessKeyForCommitsAndCredits: type: string minLength: 1 maxLength: 128 description: Prevents the creation of duplicates. If a request to create a commit or credit is made with a uniqueness key that was previously used to create a commit or credit, a new record will not be created and the request will fail with a 409 error. BillingProviderConfigurationUpdateEffectiveAtType: type: string enum: - START_OF_CURRENT_PERIOD PrepaidCommitSegmentStartLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - PREPAID_COMMIT_SEGMENT_START timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid RecurringCommitSubscriptionConfigInputV2: type: object required: - apply_seat_increase_config - subscription_id properties: allocation: $ref: '#/components/schemas/SubscriptionConfigAllocationInputV2' apply_seat_increase_config: $ref: '#/components/schemas/ApplySeatIncreaseConfigForRecurringCommit' subscription_id: type: string description: ID of the subscription to configure on the recurring commit/credit. SubscriptionSeatsScheduleEntry: type: object required: - starting_at - ending_before - total_quantity - assigned_seat_ids properties: starting_at: type: string format: date-time description: The start time of this seat schedule period ending_before: type: string format: date-time nullable: true description: The end time of this seat schedule period (null if ongoing) total_quantity: type: integer minimum: 0 description: Total number of assigned and unassigned seats in this period assigned_seat_ids: type: array items: type: string description: Array of seat IDs that are assigned in this period HistoricalContractUsageInvoiceLineItemBreakdownSubtotal: type: object required: - inclusive_start_date - exclusive_end_date - quantity properties: inclusive_start_date: type: string format: date-time exclusive_end_date: type: string format: date-time quantity: type: number CommitInput: type: object required: - type - product_id properties: type: type: string enum: - PREPAID - prepaid - POSTPAID - postpaid rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/ScheduleDurationInput' description: 'Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.' invoice_schedule: $ref: '#/components/schemas/SchedulePointInTimeInput' description: 'Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.' amount: type: number description: (DEPRECATED) Use access_schedule and invoice_schedule instead. description: type: string description: Used only in UI/API. It is not exposed to end customers. rollover_fraction: type: number description: Fraction of unused segments that will be rolled over. Must be between 0 and 1. priority: type: number description: If multiple commits are applicable, the one with the lower priority will apply first. applicable_product_ids: type: array items: type: string format: uuid description: Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. custom_fields: x-cf-entity: commit $ref: '#/components/schemas/CustomField' temporary_id: type: string description: A temporary ID for the commit that can be used to reference the commit for commit specific overrides. payment_gate_config: $ref: '#/components/schemas/CommitPaymentGateConfig' description: optionally payment gate this commit hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control OverrideTierInput: type: object required: - multiplier properties: size: type: number multiplier: type: number OverrideInput: type: object required: - starting_at properties: starting_at: type: string format: date-time description: RFC 3339 timestamp indicating when the override will start applying (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when the override will stop applying (exclusive) entitled: type: boolean type: type: string enum: - OVERWRITE - overwrite - MULTIPLIER - multiplier - TIERED - tiered description: Overwrites are prioritized over multipliers and tiered overrides. multiplier: type: number description: Required for MULTIPLIER type. Must be >=0. priority: type: number description: Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides. Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered and multiplier overrides are prioritized by their priority value (lowest first). Must be > 0. overwrite_rate: $ref: '#/components/schemas/OverwriteRateInput' description: Required for OVERWRITE type. product_id: type: string format: uuid description: ID of the product whose rate is being overridden. Cannot be used in conjunction with override_specifiers. applicable_product_tags: type: array items: type: string description: tags identifying products whose rates are being overridden. Cannot be used in conjunction with override_specifiers. override_specifiers: type: array items: $ref: '#/components/schemas/OverrideSpecifierInput' description: Cannot be used in conjunction with product_id or applicable_product_tags. If provided, the override will apply to all products with the specified specifiers. tiers: type: array items: $ref: '#/components/schemas/OverrideTierInput' description: Required for TIERED type. Must have at least one tier. is_commit_specific: type: boolean description: Indicates whether the override should only apply to commits. Defaults to `false`. If `true`, you can specify relevant commits in `override_specifiers` by passing `commit_ids`. if you do not specify `commit_ids`, then the override will apply when consuming any prepaid or postpaid commit. target: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have `is_commit_specific` set to `true`. Defaults to `"LIST_RATE"`. EditContractPayload: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid description: ID of the customer whose contract is being edited contract_id: type: string format: uuid description: ID of the contract being edited uniqueness_key: $ref: '#/components/schemas/UniquenessKey' description: Optional uniqueness key to prevent duplicate contract edits. add_commits: type: array items: $ref: '#/components/schemas/CommitInputV2' add_credits: type: array items: $ref: '#/components/schemas/CreditInputV2' add_recurring_commits: type: array items: $ref: '#/components/schemas/RecurringCommitInputV2' add_recurring_credits: type: array items: $ref: '#/components/schemas/RecurringCreditInputV2' add_discounts: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/DiscountInputV2' add_overrides: type: array items: $ref: '#/components/schemas/OverrideInputV2' add_scheduled_charges: type: array items: $ref: '#/components/schemas/ScheduledChargeInputV2' add_professional_services: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array description: This field's availability is dependent on your client's configuration. items: $ref: '#/components/schemas/ProServiceInput' add_reseller_royalties: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: array items: $ref: '#/components/schemas/ResellerRoyaltyOrUpdateInput' add_subscriptions: $ref: '#/components/schemas/SubscriptionsInput' add_spend_threshold_configuration: $ref: '#/components/schemas/SpendThresholdConfigurationV2' add_prepaid_balance_threshold_configuration: type: object $ref: '#/components/schemas/PrepaidBalanceThresholdConfigurationV2' add_billing_provider_configuration_update: type: object $ref: '#/components/schemas/BillingProviderConfigurationUpdate' description: Update the billing provider configuration on the contract. Currently only supports adding a billing provider configuration to a contract that does not already have one. add_revenue_system_configuration_update: x-mint: groups: - ff:revenue-rec-configurations-enabled $ref: '#/components/schemas/RevenueSystemConfigurationUpdate' description: Update the revenue system configuration on the contract. Currently only supports adding a revenue system configuration to a contract that does not already have one. update_contract_name: type: string nullable: true description: Value to update the contract name to. If not provided, the contract name will remain unchanged. update_scheduled_charges: type: array items: $ref: '#/components/schemas/UpdateScheduledChargeInput' update_commits: type: array items: $ref: '#/components/schemas/UpdateCommitInput' update_credits: type: array items: $ref: '#/components/schemas/UpdateCreditInput' update_recurring_commits: type: array description: Edits to these recurring commits will only affect commits whose access schedules has not started. Expired commits, and commits with an active access schedule will remain unchanged. items: $ref: '#/components/schemas/UpdateRecurringCommitInput' update_recurring_credits: type: array description: Edits to these recurring credits will only affect credits whose access schedules has not started. Expired credits, and credits with an active access schedule will remain unchanged. items: $ref: '#/components/schemas/UpdateRecurringCreditInput' update_subscriptions: type: array description: Optional list of subscriptions to update. items: $ref: '#/components/schemas/UpdateSubscriptionInput' update_spend_threshold_configuration: $ref: '#/components/schemas/UpdateSpendThresholdConfiguration' update_prepaid_balance_threshold_configuration: $ref: '#/components/schemas/UpdatePrepaidBalanceThresholdConfiguration' update_contract_end_date: type: string format: date-time description: RFC 3339 timestamp indicating when the contract will end (exclusive). nullable: true update_net_payment_terms_days: type: number description: Number of days after issuance of invoice after which the invoice is due (e.g. Net 30). nullable: true allow_contract_ending_before_finalized_invoice: type: boolean description: If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true. archive_commits: type: array items: type: object required: - id properties: id: type: string format: uuid description: IDs of commits to archive archive_credits: type: array items: type: object required: - id properties: id: type: string format: uuid description: IDs of credits to archive archive_scheduled_charges: type: array items: type: object required: - id properties: id: type: string format: uuid description: IDs of scheduled charges to archive remove_overrides: type: array items: type: object required: - id properties: id: type: string format: uuid description: IDs of overrides to remove UpdateSpendThresholdCommit: type: object allOf: - $ref: '#/components/schemas/UpdateBaseThresholdCommit' SubscriptionInput: required: - subscription_rate - collection_schedule - proration type: object properties: subscription_rate: $ref: '#/components/schemas/SubscriptionRateInput' name: type: string description: type: string collection_schedule: type: string enum: - ADVANCE - ARREARS - advance - arrears proration: $ref: '#/components/schemas/SubscriptionProrationInput' initial_quantity: type: number description: The initial quantity for the subscription. It must be non-negative value. Required if quantity_management_mode is QUANTITY_ONLY. starting_at: type: string format: date-time description: Inclusive start time for the subscription. If not provided, defaults to contract start date ending_before: type: string format: date-time description: Exclusive end time for the subscription. If not provided, subscription inherits contract end date. custom_fields: x-cf-entity: subscription $ref: '#/components/schemas/CustomField' temporary_id: type: string description: A temporary ID used to reference the subscription in recurring commit/credit subscription configs created within the same payload. quantity_management_mode: type: string enum: - SEAT_BASED - seat_based - QUANTITY_ONLY - quantity_only description: 'Determines how the subscription''s quantity is controlled. Defaults to QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified directly on the subscription. `initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation. **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add user_123) to increment and decrement a subscription quantity, rather than directly providing the quantity. You must use a **SEAT_BASED** subscription to use a linked recurring credit with an allocation per seat. `seat_config` must be provided with this option.' seat_config: $ref: '#/components/schemas/SubscriptionSeatConfigInput' RateSelectorWithProductTags: type: object properties: billing_frequency: description: Subscription rates matching the billing frequency will be included in the response. type: string enum: - MONTHLY - Monthly - monthly - QUARTERLY - Quarterly - quarterly - ANNUAL - Annual - annual - WEEKLY - Weekly - weekly product_id: description: Rates matching the product id will be included in the response. type: string format: uuid product_tags: description: List of product tags, rates matching any of the tags will be included in the response. type: array items: type: string pricing_group_values: description: List of pricing group key value pairs, rates matching all of the key / value pairs will be included in the response. type: object additionalProperties: type: string partial_pricing_group_values: description: List of pricing group key value pairs, rates containing the matching key / value pairs will be included in the response. type: object additionalProperties: type: string OverrideTier: type: object required: - multiplier properties: size: type: number multiplier: type: number ScheduleDurationInput: type: object required: - schedule_items properties: credit_type_id: type: string format: uuid description: Defaults to USD (cents) if not passed schedule_items: type: array items: type: object required: - amount - starting_at - ending_before properties: amount: type: number starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive) RecurringCreditInput: type: object required: - product_id - access_amount - priority - commit_duration - starting_at properties: name: type: string minLength: 1 description: displayed on invoices. will be passed through to the individual commits product_id: type: string format: uuid access_amount: type: object required: - unit_price - credit_type_id properties: unit_price: type: number quantity: type: number description: This field is required unless a subscription is attached via `subscription_config`. credit_type_id: type: string format: uuid description: The amount of commit to grant. description: type: string description: Will be passed down to the individual commits rollover_fraction: type: number description: Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1. priority: type: number description: Will be passed down to the individual commits applicable_product_ids: type: array items: type: string format: uuid description: Will be passed down to the individual commits applicable_product_tags: type: array items: type: string description: Will be passed down to the individual commits specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: Will be passed down to the individual commits temporary_id: type: string description: A temporary ID that can be used to reference the recurring commit for commit specific overrides. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Whether the created commits will use the commit rate or list rate starting_at: type: string format: date-time description: determines the start time for the first commit ending_before: type: string format: date-time description: Determines when the contract will stop creating recurring commits. optional commit_duration: type: object required: - value properties: value: type: number unit: type: string enum: - periods - PERIODS description: Defines the length of the access schedule for each created commit/credit. The value represents the number of units. Unit defaults to "PERIODS", where the length of a period is determined by the recurrence_frequency. recurrence_frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly description: 'The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit''s starting_at rather than the usage invoice dates.' proration: type: string enum: - NONE - none - FIRST - first - LAST - last - FIRST_AND_LAST - first_and_last description: Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits). subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfigInput' hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for recurring commit/credit hierarchy access control CommitAddInvoiceSchedule: type: object properties: credit_type: $ref: '#/components/schemas/CreditType' schedule_items: type: array items: type: object required: - id - timestamp properties: id: type: string format: uuid invoice_id: type: string format: uuid nullable: true amount: type: number unit_price: type: number quantity: type: number timestamp: type: string format: date-time do_not_invoice: type: boolean description: If true, this schedule will not generate an invoice. SubscriptionConfigAllocationInputV2: type: string enum: - POOLED - INDIVIDUAL description: If set to POOLED, allocation added per seat is pooled across the account. If set to INDIVIDUAL, each seat in the subscription will have its own allocation. CreditAutomatedInvoiceDeductionLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - CREDIT_AUTOMATED_INVOICE_DEDUCTION timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid SubscriptionQuantitySchedule: type: object required: - quantity - starting_at properties: quantity: type: number starting_at: type: string format: date-time ending_before: type: string format: date-time ResellerRoyaltyOrUpdate: type: object required: - reseller_type properties: reseller_type: $ref: '#/components/schemas/ResellerType' fraction: type: number netsuite_reseller_id: type: string starting_at: type: string format: date-time ending_before: type: string format: date-time nullable: true reseller_contract_value: type: number aws_account_number: type: string aws_payer_reference_id: type: string aws_offer_id: type: string gcp_account_id: type: string gcp_offer_id: type: string UpdateCommitInput: type: object required: - commit_id properties: commit_id: type: string format: uuid name: type: string description: type: string access_schedule: $ref: '#/components/schemas/UpdateAccessScheduleInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true rollover_fraction: type: number nullable: true invoice_schedule: $ref: '#/components/schemas/UpdateInvoiceScheduleInput' applicable_product_ids: type: array nullable: true items: type: string format: uuid description: Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array nullable: true items: type: string description: Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. product_id: type: string format: uuid hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control priority: type: number nullable: true rate_type: type: string enum: - LIST_RATE - list_rate - COMMIT_RATE - commit_rate description: If provided, updates the commit to use the specified rate type for current and future invoices. Previously finalized invoices will need to be voided and regenerated to reflect the rate type change. RecurringCommitSubscriptionConfig: type: object required: - allocation - apply_seat_increase_config - subscription_id properties: allocation: $ref: '#/components/schemas/SubscriptionConfigAllocation' apply_seat_increase_config: $ref: '#/components/schemas/ApplySeatIncreaseConfigForRecurringCommit' subscription_id: type: string format: uuid CommitPaymentGateConfigV2: type: object required: - payment_gate_type properties: payment_gate_type: type: string enum: - NONE - STRIPE - EXTERNAL description: Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance. tax_type: type: string enum: - NONE - STRIPE - ANROK - PRECALCULATED description: Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE. stripe_config: description: Only applicable if using STRIPE as your payment gateway type. type: object required: - payment_type properties: payment_type: type: string enum: - INVOICE - PAYMENT_INTENT description: If left blank, will default to INVOICE invoice_metadata: type: object additionalProperties: type: string description: Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. on_session_payment: type: boolean description: "If true, the payment will be made assuming the customer is present (i.e. on session). \n\nIf false, the payment will be made assuming the customer is not present (i.e. off session). \nFor cardholders from a country with an e-mandate requirement (e.g. India), the payment may be declined.\n\nIf left blank, will default to false." precalculated_tax_config: description: Only applicable if using PRECALCULATED as your tax type. type: object required: - tax_amount properties: tax_amount: type: number description: Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule tax_name: type: string description: Name of the tax to be applied. This may be used in an invoice line item description. OverrideSpecifierInputV2: type: object properties: commit_ids: type: array items: type: string description: If provided, the override will only apply to the specified commits. Can only be used for commit specific overrides. If not provided, the override will apply to all commits. recurring_commit_ids: type: array items: type: string description: Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to commits created by the specified recurring commit ids. product_id: type: string format: uuid description: If provided, the override will only apply to the product with the specified ID. product_tags: type: array items: type: string description: If provided, the override will only apply to products with all the specified tags. pricing_group_values: type: object description: A map of pricing group names to values. The override will only apply to products with the specified pricing group values. additionalProperties: type: string presentation_group_values: type: object description: A map of group names to values. The override will only apply to line items with the specified presentation group values. Can only be used for multiplier overrides. additionalProperties: type: string billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY - monthly - quarterly - annual - weekly exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' Commit: type: object required: - id - type - product - created_at properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid type: type: string enum: - PREPAID - POSTPAID rate_type: type: string enum: - COMMIT_RATE - LIST_RATE name: type: string priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_schedule: $ref: '#/components/schemas/ScheduleDuration' description: The schedule that the customer will gain access to the credits purposed with this commit. invoice_schedule: $ref: '#/components/schemas/SchedulePointInTime' description: The schedule that the customer will be invoiced for this commit. invoice_contract: type: object required: - id properties: id: type: string format: uuid description: The contract that this commit will be billed on. recurring_commit_id: type: string format: uuid description: The ID of the recurring commit that this commit was generated from, if applicable. subscription_config: type: object properties: subscription_id: type: string format: uuid allocation: $ref: '#/components/schemas/SubscriptionConfigAllocation' apply_seat_increase_config: $ref: '#/components/schemas/ApplySeatIncreaseConfigForRecurringCommit' description: The subscription configuration for this commit, if it was generated from a recurring commit with a subscription attached. rolled_over_from: type: object required: - contract_id - commit_id properties: commit_id: type: string format: uuid contract_id: type: string format: uuid description: type: string rollover_fraction: type: number applicable_product_ids: type: array items: type: string format: uuid applicable_product_tags: type: array items: type: string specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' applicable_contract_ids: type: array items: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. amount: type: number description: (DEPRECATED) Use access_schedule + invoice_schedule instead. salesforce_opportunity_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. ledger: type: array items: $ref: '#/components/schemas/CommitLedger' description: A list of ordered events that impact the balance of a commit. For example, an invoice deduction or a rollover. balance: $ref: '#/components/schemas/BalanceForCommitsAndCredits' custom_fields: x-cf-entity: commit $ref: '#/components/schemas/CustomField' uniqueness_key: $ref: '#/components/schemas/UniquenessKeyForCommitsAndCredits' archived_at: type: string format: date-time description: RFC 3339 timestamp indicating when the commit was archived. If not provided, the commit is not archived. hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control created_at: type: string format: date-time description: 'Timestamp of when the commit was created. - Recurring commits: latter of commit service period date and parent commit start date - Rollover commits: when the new contract started ' PackageAlias: type: object required: - name properties: name: type: string starting_at: type: string format: date-time ending_before: type: string format: date-time PostpaidCommitTrueupLedgerEntry: type: object required: - type - timestamp - amount - invoice_id properties: type: type: string enum: - POSTPAID_COMMIT_TRUEUP timestamp: type: string format: date-time amount: type: number invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid OverrideV2: type: object required: - id - created_at - starting_at properties: id: type: string format: uuid created_at: type: string format: date-time product: type: object required: - id - name properties: id: type: string format: uuid name: type: string applicable_product_tags: type: array items: type: string override_specifiers: type: array items: $ref: '#/components/schemas/OverrideSpecifierV2' starting_at: type: string format: date-time ending_before: type: string format: date-time entitled: type: boolean type: type: string enum: - OVERWRITE - MULTIPLIER - TIERED priority: type: number multiplier: type: number overwrite_rate: $ref: '#/components/schemas/OverwriteRateV2' override_tiers: type: array items: $ref: '#/components/schemas/OverrideTier' is_commit_specific: type: boolean target: type: string enum: - COMMIT_RATE - LIST_RATE ArchiveContractPayload: type: object required: - customer_id - contract_id - void_invoices properties: customer_id: type: string format: uuid description: ID of the customer whose contract is to be archived contract_id: type: string format: uuid description: ID of the contract to archive void_invoices: type: boolean description: If false, the existing finalized invoices will remain after the contract is archived. SubscriptionSeatUpdateUnassignedSeat: type: object required: - quantity - starting_at properties: quantity: type: number minimum: 1 description: The number of unassigned seats on the subscription will increase/decrease by this delta. Must be greater than 0. starting_at: type: string format: date-time description: Unassigned seats will be updated starting at this date. SchedulePointInTime: type: object properties: credit_type: $ref: '#/components/schemas/CreditType' schedule_items: type: array items: type: object required: - id - amount - unit_price - quantity - timestamp properties: id: type: string format: uuid invoice_id: type: string format: uuid nullable: true amount: type: number unit_price: type: number quantity: type: number timestamp: type: string format: date-time do_not_invoice: type: boolean description: This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice. default: false ChildHierarchyConfigurationV2: type: object required: - parent properties: parent: $ref: '#/components/schemas/HierarchyLink' description: The single parent contract/customer for this child. payer: type: string enum: - SELF - PARENT description: 'Indicates which customer should pay for the child''s invoice charges **SELF**: The child pays for its own invoice charges **PARENT**: The parent pays for the child''s invoice charges' usage_statement_behavior: type: string enum: - CONSOLIDATE - SEPARATE description: 'Indicates the behavior of the child''s invoice statements on the parent''s invoices. **CONSOLIDATE**: Child''s invoice statements will be added to parent''s consolidated invoices **SEPARATE**: Child''s invoice statements will appear not appear on parent''s consolidated invoices' CreateCustomerPayload: required: - name type: object properties: ingest_aliases: type: array description: Aliases that can be used to refer to this customer in usage events items: type: string minLength: 1 maxLength: 128 maxItems: 2000 name: type: string description: This will be truncated to 160 characters if the provided name is longer. customer_billing_provider_configurations: type: array items: $ref: '#/components/schemas/CustomerBillingProviderConfigurationCreateCustomerInput' customer_revenue_system_configurations: x-mint: groups: - ff:revenue-rec-configurations-enabled type: array items: $ref: '#/components/schemas/CustomerRevenueSystemConfigurationCreateCustomerInput' custom_fields: x-cf-entity: customer $ref: '#/components/schemas/CustomField' MinimumConfig: type: object description: Only set for TIERED_PERCENTAGE or PERCENTAGE rate_type. required: - minimum properties: minimum: type: number BalanceForCommitsAndCredits: type: number description: The current balance of the credit or commit. This balance reflects the amount of credit or commit that the customer has access to use at this moment - thus, expired and upcoming credit or commit segments contribute 0 to the balance. The balance will match the sum of all ledger entries with the exception of the case where the sum of negative manual ledger entries exceeds the positive amount remaining on the credit or commit - in that case, the balance will be 0. All manual ledger entries associated with active credit or commit segments are included in the balance, including future-dated manual ledger entries. RecurringCommitInputV2: allOf: - $ref: '#/components/schemas/RecurringCreditInputV2' - type: object properties: invoice_amount: type: object required: - unit_price - quantity - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount the customer should be billed for the commit. Not required. RecurringCommitTemplateInput: allOf: - $ref: '#/components/schemas/RecurringCreditTemplateInput' - type: object properties: invoice_amount: type: object required: - unit_price - quantity - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount the customer should be billed for the commit. Not required. SubscriptionsInput: type: array description: Optional list of [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/) to add to the contract. items: $ref: '#/components/schemas/SubscriptionInput' CreditExpirationLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - CREDIT_EXPIRATION timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid CommitTemplateInput: type: object required: - type - product_id - access_schedule properties: type: type: string enum: - PREPAID - prepaid - POSTPAID - postpaid rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/RelativeScheduleDurationInput' description: 'Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.' invoice_schedule: allOf: - $ref: '#/components/schemas/RelativeSchedulePointInTimeInput' - type: object properties: do_not_invoice: type: boolean description: If true, this schedule will not generate an invoice. default: false description: 'Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.' description: type: string description: Used only in UI/API. It is not exposed to end customers. rollover_fraction: type: number description: Fraction of unused segments that will be rolled over. Must be between 0 and 1. priority: type: number description: If multiple commits are applicable, the one with the lower priority will apply first. applicable_product_ids: type: array items: type: string format: uuid description: Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. items: $ref: '#/components/schemas/CommitSpecifierInput' temporary_id: type: string description: A temporary ID for the commit that can be used to reference the commit for commit specific overrides. custom_fields: x-cf-entity: package_commit $ref: '#/components/schemas/CustomField' UpdatePrepaidBalanceThresholdCommit: type: object allOf: - $ref: '#/components/schemas/UpdateBaseThresholdCommit' - $ref: '#/components/schemas/OptionalThresholdCommitFieldsUpdate' CommitHierarchyChildAccessContractIds: type: object required: - type - contract_ids properties: type: type: string enum: - CONTRACT_IDS - contract_ids contract_ids: type: array minItems: 1 items: type: string format: uuid UpdateContractEndDatePayload: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid description: ID of the customer whose contract is to be updated contract_id: type: string format: uuid description: ID of the contract to update ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when the contract will end (exclusive). If not provided, the contract will be updated to be open-ended. allow_ending_before_finalized_invoice: type: boolean description: If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true. SubscriptionRate: type: object required: - billing_frequency - product properties: billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY - monthly - quarterly - annual - weekly product: type: object required: - id - name properties: id: type: string format: uuid name: type: string PrepaidCommitCanceledLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - PREPAID_COMMIT_CANCELED timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid SubscriptionQuantityHistory: type: object properties: subscription_id: type: string format: uuid fiat_credit_type_id: type: string format: uuid history: type: array items: type: object required: - starting_at - data properties: starting_at: type: string format: date-time data: type: array items: type: object required: - quantity - unit_price - total properties: quantity: type: number total: type: number unit_price: type: number PrepaidCommitAutomatedInvoiceDeductionLedgerEntry: type: object required: - type - timestamp - amount - invoice_id - segment_id properties: type: type: string enum: - PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid invoice_id: type: string format: uuid contract_id: x-mint: groups: - client_id:11db091c-975b-4908-9f67-b1ceb126acdf type: string format: uuid Tier: type: object required: - price properties: size: type: number price: type: number UpdateAccessScheduleInput: type: object properties: add_schedule_items: type: array items: type: object required: - amount - starting_at - ending_before properties: amount: type: number starting_at: type: string format: date-time ending_before: type: string format: date-time update_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid amount: type: number starting_at: type: string format: date-time ending_before: type: string format: date-time remove_schedule_items: type: array items: type: object required: - id properties: id: type: string format: uuid OverwriteRateV2: type: object required: - rate_type properties: rate_type: type: string enum: - FLAT - flat - PERCENTAGE - percentage - SUBSCRIPTION - subscription - TIERED - tiered - TIERED_PERCENTAGE - tiered_percentage - CUSTOM - custom x-mint-enum: CUSTOM: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 custom: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 TIERED_PERCENTAGE: - ff:support-charge-ga tiered_percentage: - ff:support-charge-ga price: type: number description: Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1. quantity: type: number description: Default quantity. For SUBSCRIPTION rate_type, this must be >=0. is_prorated: type: boolean description: Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. tiers: type: array items: $ref: '#/components/schemas/Tier' description: Only set for TIERED rate_type. minimum_config: x-stainless-skip: true x-mint: groups: - ff:support-charge-ga $ref: '#/components/schemas/MinimumConfig' custom_rate: x-mint: groups: - client_id:5b9e3072-415b-4842-94f0-0b6700c8b6be - client_id:179e395f-5349-4fe2-bf12-64ab4e5bc560 - client_id:f157d376-0781-4ef3-9db9-775a9052148e - client_id:7dd2f652-7629-4925-9069-77f5c5d3db37 - client_id:c0ce3dc0-6d3e-4f6b-aadf-dfb90f2bf9f5 - client_id:cf874b25-ca3b-460b-b6fe-5f33b3c2ea33 - client_id:97c07a0c-70db-448a-a1d4-adcd2b8bd1c7 type: object additionalProperties: true description: Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. credit_type: $ref: '#/components/schemas/CreditType' CreditInputV2: type: object required: - product_id - access_schedule properties: name: type: string minLength: 1 description: displayed on invoices product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/ScheduleDurationInputV2' description: Schedule for distributing the credit to the customer. description: type: string description: Used only in UI/API. It is not exposed to end customers. applicable_product_ids: type: array items: type: string format: uuid description: Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. applicable_product_tags: type: array items: type: string description: Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products. specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. priority: type: number description: If multiple credits are applicable, the one with the lower priority will apply first. custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' rollover_fraction: type: number description: Fraction of unused segments that will be rolled over. Must be between 0 and 1. rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control OverrideSpecifierV2: type: object properties: commit_ids: type: array items: type: string recurring_commit_ids: type: array items: type: string product_id: type: string format: uuid product_tags: type: array items: type: string pricing_group_values: type: object additionalProperties: type: string presentation_group_values: type: object additionalProperties: type: string nullable: true billing_frequency: type: string enum: - MONTHLY - QUARTERLY - ANNUAL - WEEKLY exclude: x-stainless-skip: true x-mint: groups: - ff:exclude-specifiers-ga type: array description: If provided, the specifier will not apply to product usage that matches the inclusion criteria and any of the excluding values. items: $ref: '#/components/schemas/ExcludeSpecifier' ApplySeatIncreaseConfigForRecurringCommit: type: object required: - is_prorated properties: is_prorated: type: boolean description: Indicates whether a mid-period seat increase should be prorated. PaymentGateConfig: type: object required: - payment_gate_type properties: payment_gate_type: type: string enum: - NONE - STRIPE - EXTERNAL description: Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance. tax_type: type: string enum: - NONE - STRIPE - ANROK - PRECALCULATED description: Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE. stripe_config: description: Only applicable if using STRIPE as your payment gate type. type: object required: - payment_type properties: payment_type: type: string enum: - INVOICE - PAYMENT_INTENT description: If left blank, will default to INVOICE invoice_metadata: type: object additionalProperties: type: string description: Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. precalculated_tax_config: description: Only applicable if using PRECALCULATED as your tax type. type: object required: - tax_amount properties: tax_amount: type: number description: Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule tax_name: type: string description: Name of the tax to be applied. This may be used in an invoice line item description. DiscountUpdate: type: object required: - id properties: id: type: string format: uuid name: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string schedule: $ref: '#/components/schemas/SchedulePointInTimeInputV2' custom_fields: x-cf-entity: discount $ref: '#/components/schemas/CustomField' PostpaidCommitInitialBalanceLedgerEntry: type: object required: - type - timestamp - amount properties: type: type: string enum: - POSTPAID_COMMIT_INITIAL_BALANCE timestamp: type: string format: date-time amount: type: number ParentHierarchyConfiguration: type: object required: - children properties: children: type: array items: $ref: '#/components/schemas/HierarchyLink' description: List of contracts that belong to this parent. parent_behavior: type: object properties: invoice_consolidation_type: type: string enum: - CONCATENATE - NONE description: 'Indicates the desired behavior of consolidated invoices generated by the parent in a customer hierarchy **CONCATENATE**: Statements on the invoices of child customers will be appended to the consolidated invoice **NONE**: Do not generate consolidated invoices' CreditType: required: - name - id type: object properties: name: type: string id: type: string format: uuid ProServiceInput: type: object required: - product_id - unit_price - quantity - max_amount properties: description: type: string product_id: type: string format: uuid netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: This field's availability is dependent on your client's configuration. unit_price: type: number description: Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified. quantity: type: number description: Quantity for the charge. Will be multiplied by unit_price to determine the amount. max_amount: type: number description: Maximum amount for the term. custom_fields: x-cf-entity: professional_service $ref: '#/components/schemas/CustomField' PrepaidCommitExpirationLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - PREPAID_COMMIT_EXPIRATION timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid Tags: type: array items: type: string Subscriptions: type: array description: List of subscriptions on the contract. items: $ref: '#/components/schemas/Subscription' CreditUpdate: type: object required: - id properties: id: type: string format: uuid name: type: string description: type: string access_schedule: $ref: '#/components/schemas/AccessScheduleUpdate' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true rollover_fraction: type: number nullable: true applicable_product_ids: type: array nullable: true items: type: string format: uuid description: Which products the credit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the credit applies to all products. specifiers: nullable: true type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with `applicable_product_ids` or `applicable_product_tags`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`. items: $ref: '#/components/schemas/CommitSpecifierInput' applicable_product_tags: type: array nullable: true items: type: string description: Which tags the credit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the credit applies to all products. product_id: type: string format: uuid hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control priority: type: number nullable: true description: If multiple credits are applicable, the one with the lower priority will apply first. rate_type: type: string enum: - LIST_RATE - COMMIT_RATE description: If set, the credit's rate type was updated to the specified value. ExternalInvoice: required: - billing_provider_type type: object properties: billing_provider_type: $ref: '#/components/schemas/BillingProviderType' invoice_id: type: string issued_at_timestamp: type: string format: date-time external_status: $ref: '#/components/schemas/ExternalInvoiceStatus' pdf_url: x-mint: metadata: tag: Beta type: string format: uri description: A URL to the PDF of the invoice, if available from the billing provider. tax: x-mint: metadata: tag: Beta type: object description: Tax details for the invoice, if available from the billing provider. properties: total_tax_amount: type: number description: The total tax amount applied to the invoice. total_taxable_amount: type: number description: The total taxable amount of the invoice. transaction_id: type: string description: The transaction ID associated with the tax calculation. invoiced_total: x-mint: metadata: tag: Beta type: number description: The total amount invoiced, if available from the billing provider. invoiced_sub_total: x-mint: metadata: tag: Beta type: number description: The subtotal amount invoiced, if available from the billing provider. billing_provider_error: type: string description: Error message from the billing provider, if available. external_payment_id: type: string description: The ID of the payment in the external system, if available. ScheduledChargeUpdate: type: object required: - id properties: id: type: string format: uuid name: type: string netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string nullable: true invoice_schedule: $ref: '#/components/schemas/InvoiceScheduleUpdate' ScheduleDurationInputV2: type: object required: - schedule_items properties: credit_type_id: type: string format: uuid schedule_items: type: array items: type: object required: - amount - starting_at - ending_before properties: amount: type: number starting_at: type: string format: date-time description: RFC 3339 timestamp (inclusive) ending_before: type: string format: date-time description: RFC 3339 timestamp (exclusive) RecurringCreditV2: type: object required: - id - product - access_amount - priority - commit_duration - starting_at - rate_type properties: id: type: string format: uuid contract: type: object required: - id properties: id: type: string format: uuid name: type: string description: Displayed on invoices. Will be passed through to the individual commits product: type: object required: - id - name properties: id: type: string format: uuid name: type: string access_amount: type: object required: - unit_price - credit_type_id properties: unit_price: type: number quantity: type: number credit_type_id: type: string format: uuid description: The amount of commit to grant. description: type: string description: Will be passed down to the individual commits rollover_fraction: type: number description: Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1. priority: type: number description: Will be passed down to the individual commits applicable_product_ids: type: array items: type: string format: uuid description: Will be passed down to the individual commits applicable_product_tags: type: array items: type: string description: Will be passed down to the individual commits specifiers: type: array description: List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. items: $ref: '#/components/schemas/CommitSpecifier' netsuite_sales_order_id: x-mint: groups: - client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2 type: string description: Will be passed down to the individual commits rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate description: Whether the created commits will use the commit rate or list rate starting_at: type: string format: date-time description: Determines the start time for the first commit ending_before: type: string format: date-time description: Determines when the contract will stop creating recurring commits. Optional commit_duration: type: object required: - value properties: value: type: number unit: type: string enum: - periods - PERIODS description: The amount of time the created commits will be valid for recurrence_frequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - ANNUAL - annual - WEEKLY - weekly description: 'The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit''s starting_at rather than the usage invoice dates.' proration: type: string enum: - NONE - none - FIRST - first - LAST - last - FIRST_AND_LAST - first_and_last description: Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits). hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for recurring credit hierarchy access control subscription_config: description: Attach a subscription to the recurring commit/credit. $ref: '#/components/schemas/RecurringCommitSubscriptionConfig' CreditSegmentStartLedgerEntry: type: object required: - type - timestamp - amount - segment_id properties: type: type: string enum: - CREDIT_SEGMENT_START timestamp: type: string format: date-time amount: type: number segment_id: type: string format: uuid CreditLedgerV2: oneOf: - $ref: '#/components/schemas/CreditSegmentStartLedgerEntry' - $ref: '#/components/schemas/CreditAutomatedInvoiceDeductionLedgerEntry' - $ref: '#/components/schemas/CreditExpirationLedgerEntry' - $ref: '#/components/schemas/CreditCanceledLedgerEntry' - $ref: '#/components/schemas/CreditCreditedLedgerEntry' - $ref: '#/components/schemas/CreditManualLedgerEntry' - $ref: '#/components/schemas/CreditSeatBasedAdjustmentLedgerEntry' - $ref: '#/components/schemas/CreditRolloverLedgerEntry' parameters: PageLimit: name: limit in: query description: Max number of results that should be returned required: false schema: type: integer minimum: 1 maximum: 100 NextPage: name: next_page in: query description: Cursor that indicates where the next page of results should start. required: false schema: type: string responses: NotFound: description: The specified resource was not found content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer