openapi: 3.0.1 info: title: Metronome Alerts Credits and commits 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: Credits and commits description: Credits and commits are used to manage customer balances. paths: /v1/contracts/addManualBalanceLedgerEntry: post: description: 'Manually adjust the available balance on a commit or credit. This entry is appended to the commit ledger as a new event. Optionally include a description that provides the reasoning for the entry. ### Use this endpoint to: - Address incorrect usage burn-down caused by malformed usage or invalid config - Decrease available balance to account for outages where usage may have not been tracked or sent to Metronome - Issue credits to customers in the form of increased balance on existing commit or credit ### Usage guidelines: Manual ledger entries can be extremely useful for resolving discrepancies in Metronome. However, most corrections to inaccurate billings can be modified upstream of the commit, whether that is via contract editing, rate editing, or other actions that cause an invoice to be recalculated. ' operationId: addManualBalanceLedgerEntry-v1 summary: Add a manual balance entry tags: - Credits and commits requestBody: description: Add a manual ledger entry to a balance content: application/json: schema: $ref: '#/components/schemas/AddManualBalanceLedgerEntryPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 segment_id: 66368e29-3f97-4d15-a6e9-120897f0070a amount: -1000 reason: Reason for entry responses: '200': description: Success '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/customerCommits/list: post: description: "Retrieve all commit agreements for a customer, including both prepaid and postpaid commitments. This endpoint provides comprehensive visibility into contractual spending obligations, enabling you to track commitment utilization and manage customer contracts effectively.\n\n### Use this endpoint to:\n- Display commitment balances and utilization in customer dashboards\n- Track prepaid commitment drawdown and remaining balances\n- Monitor postpaid commitment progress toward minimum thresholds\n- Build commitment tracking and forecasting tools\n- Show commitment history with optional ledger details\n- Manage rollover balances between contract periods\n\n### Key response fields:\nAn array of Commit objects containing:\n- Commit type: PREPAID (pay upfront) or POSTPAID (pay at true-up)\n- Rate type: COMMIT_RATE (discounted) or LIST_RATE (standard pricing)\n- Access schedule: When commitment funds become available\n- Invoice schedule: When the customer is billed\n- Product targeting: Which product(s) usage is eligible to draw from this commit\n- Optional ledger entries: Transaction history (if `include_ledgers=true`)\n- Balance information: Current available amount (if `include_balance=true`)\n- Rollover settings: Fraction of unused amount that carries forward\n\n### Usage guidelines:\n- Pagination: Results limited to 25 commits per page; use 'next_page' for more\n- Date filtering options:\n - `covering_date`: Commits active on a specific date\n - `starting_at`: Commits with access on/after a date\n - `effective_before`: Commits with access before a date (exclusive)\n- Scope options:\n - `include_contract_commits`: Include contract-level commits (not just customer-level)\n - `include_archived`: Include archived commits and commits from archived contracts\n- Performance considerations:\n - include_ledgers: Adds detailed transaction history (slower)\n - include_balance: Adds current balance calculation (slower)\n- Optional filtering: Use commit_id to retrieve a specific commit\n" operationId: listCustomerCommits-v1 summary: List commits tags: - Credits and commits requestBody: description: List all commits for a customer content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid commit_id: type: string format: uuid covering_date: description: Include only commits that have access schedules that "cover" the provided date type: string format: date-time starting_at: description: Include only commits that have any access on or after the provided date type: string format: date-time effective_before: description: Include only commits that have any access before the provided date (exclusive) type: string format: date-time include_contract_commits: type: boolean description: Include commits on the contract level. include_archived: type: boolean description: Include archived commits and commits from archived contracts. 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 in the response. Setting this flag may cause the query to be slower. next_page: type: string description: The next page token from a previous response. limit: type: integer minimum: 1 maximum: 25 default: 25 description: The maximum number of commits to return. Defaults to 25. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d commit_id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 include_ledgers: true responses: '200': description: Success content: application/json: schema: type: object required: - data - next_page properties: data: type: array items: $ref: '#/components/schemas/Commit' next_page: type: string nullable: true example: data: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID rate_type: LIST_RATE name: My test commit description: My test commit description priority: 100 product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 applicable_contract_ids: - d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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 invoice_contract: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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 uniqueness_key: 946g9bepi1-uniqueness-key created_at: '2020-01-01T00:00:00.000Z' next_page: null /v1/contracts/customerCommits/create: post: description: "Creates customer-level commits that establish spending commitments for customers across their Metronome usage. Commits represent contracted spending obligations that can be either prepaid (paid upfront) or postpaid (billed later). \n\nNote: In most cases, you should add commitments directly to customer contracts using the contract/create or contract/edit APIs.\n\n### Use this endpoint to:\nUse this endpoint when you need to establish customer-level spending commitments that can be applied across multiple contracts or scoped to specific contracts. Customer-level commits are ideal for:\n- Enterprise-wide minimum spending agreements that span multiple contracts\n- Multi-contract volume commitments with shared spending pools\n- Cross-contract discount tiers based on aggregate usage\n\n#### Commit type Requirements: \n- You must specify either \"prepaid\" or \"postpaid\" as the commit type:\n- Prepaid commits: Customer pays upfront; invoice_schedule is optional (if omitted, creates a commit without an invoice)\n- Postpaid commits: Customer pays when the commitment expires (the end of the access_schedule); invoice_schedule is required and must match access_schedule totals. \n\n#### Billing configuration:\n- invoice_contract_id is required for postpaid commits and for prepaid commits with billing (only optional for free prepaid commits) unless do_not_invoice is set to true\n- For postpaid commits: access_schedule and invoice_schedule must have matching amounts\n- For postpaid commits: only one schedule item is allowed in both schedules.\n\n#### Scoping flexibility:\nCustomer-level commits can be configured in a few ways:\n- Contract-specific: Use the `applicable_contract_ids` field to limit the commit to specific contracts\n- Cross-contract: Leave `applicable_contract_ids` empty to allow the commit to be used across all of the customer's contracts\n\n#### Product targeting:\nCommits can be scoped to specific products using applicable_product_ids, applicable_product_tags, or specifiers, or left unrestricted to apply to all products.\n\n#### Priority considerations:\nWhen multiple commits are applicable, the one with the lower priority value will be consumed first. If there is a tie, contract level commits and credits will be applied before customer level commits and credits. Plan your priority scheme carefully to ensure commits are applied in the desired order.\n\n### Usage guidelines:\n⚠️ Preferred Alternative: In most cases, you should add commits directly to contracts using the create contract or edit contract APIs instead of creating customer-level commits. Contract-level commits provide better organization and are the recommended approach for standard use cases.\n" operationId: createCustomerCommit-v1 summary: Create a commit tags: - Credits and commits requestBody: description: Create a commit content: application/json: schema: $ref: '#/components/schemas/CreateCustomerCommitPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d type: prepaid name: My Commit priority: 100 product_id: f14d6729-6a44-4b13-9908-9387f1918790 invoice_contract_id: e57d6929-c2f1-4796-a9a8-63cedefe848d access_schedule: credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 schedule_items: - amount: 1000 starting_at: '2020-01-01T00:00:00.000Z' ending_before: '2020-02-01T00:00:00.000Z' invoice_schedule: credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 schedule_items: - unit_price: 10000000 quantity: 1 timestamp: '2020-03-01T00:00:00.000Z' do_not_invoice: false responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/customerCommits/updateEndDate: post: description: "Shortens the end date of a prepaid commit to terminate it earlier than originally scheduled. Use this endpoint when you need to cancel or reduce the duration of an existing prepaid commit. Only works with prepaid commit types and can only move the end date forward (earlier), not extend it. \n\n### Usage guidelines:\nTo extend commit end dates or make other comprehensive edits, use the 'edit commit' endpoint instead.\n" operationId: updateCommitEndDate-v1 summary: Update the commit end date tags: - Credits and commits requestBody: description: Update the access or invoice end date of a commit content: application/json: schema: $ref: '#/components/schemas/UpdateCommitEndDatePayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d commit_id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 access_ending_before: '2020-01-01T00:00:00.000Z' invoices_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: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/commits/threshold-billing/release: post: description: 'If using threshold billing with an external payment gateway, Metronome does not facilitate the payment gating process on behalf of the client. As a result, clients must facilitate the transaction themselves. This end-point is used to either release or cancel the commit pending on the outcome of the external payment attempt. To release the commit, you must pass the `workflow_id` provided in the `payment_gate.external_initiate` webhook. ### Use this endpoint to: Facilitate payment gating workflows for threshold billing if using a payment gateway Metronome does not support today. ### Usage guidelines: Ensure that you are set up to consume the `payment_gate.external_initiate` webhook and save the `workflow_id`. ' operationId: releaseExternalPaymentGateThresholdCommit-v1 summary: Release external payment gate threshold commit tags: - Credits and commits requestBody: description: Information to identify the workflow that is in progress to release the commit, and what action we should take to complete the workflow. content: application/json: schema: $ref: '#/components/schemas/ExternalPaymentGateThresholdCommitPayload' example: workflow_id: 5576ba1f-4a33-b473-3f05-6162d87b4a33 outcome: paid responses: '200': description: Success /v1/contracts/commits/disableTrueup: post: description: 'Disable the true-up invoice for a postpaid commit. If used, the true-up invoice will not be generated. For postpaid commits, usage during the access period is paid for in arrears. If the total amount paid during the access period is less than the committed amount, there''s a final true-up invoice on the invoice_date. ' operationId: disableCommitTrueup-v1 summary: Disable trueup for commit tags: - Credits and commits requestBody: description: Information to identify the commit content: application/json: schema: $ref: '#/components/schemas/DisableCommitTrueupPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d commit_id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 contract_id: 7526bacf-f08a-47af-b473-bc57b88890e1 responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: $ref: '#/components/schemas/Id' example: data: id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/customerCredits/list: post: description: "Retrieve a detailed list of all credits available to a customer, including promotional credits and contract-specific credits. This endpoint provides comprehensive visibility into credit balances, access schedules, and usage rules, enabling you to build credit management interfaces and track available funding.\n\n### Use this endpoint to:\n- Display all available credits in customer billing dashboards\n- Show credit balances and expiration dates\n- Track credit usage history with optional ledger details\n- Build credit management and reporting tools\n- Monitor promotional credit utilization\n• Support customer inquiries about available credits\n\n### Key response fields:\nAn array of Credit objects containing:\n- Credit details: Name, priority, and which applicable products/tags it applies to\n- Product ID: The `product_id` of the credit. This is for external mapping into your quote-to-cash stack, not the product it applies to. \n- Access schedule: When credits become available and expire\n- Optional ledger entries: Transaction history (if `include_ledgers=true`)\n- Balance information: Current available amount (if `include_balance=true`)\n- Metadata: Custom fields and usage specifiers\n\n### Usage guidelines:\n- Pagination: Results limited to 25 commits per page; use next_page for more\n- Date filtering options:\n - `covering_date`: Credits active on a specific date\n - `starting_at`: Credits with access on/after a date\n - `effective_before`: Credits with access before a date (exclusive)\n- Scope options:\n - `include_contract_credits`: Include contract-level credits (not just customer-level)\n - `include_archived`: Include archived credits and credits from archived contracts\n- Performance considerations:\n - `include_ledgers`: Adds detailed transaction history (slower)\n - `include_balance`: Adds current balance calculation (slower)\n- Optional filtering: Use credit_id to retrieve a specific commit\n" operationId: listCustomerCredits-v1 summary: List credits tags: - Credits and commits requestBody: description: List all credits for a customer content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid credit_id: type: string format: uuid covering_date: description: Return only credits that have access schedules that "cover" the provided date type: string format: date-time starting_at: description: Include only credits that have any access on or after the provided date type: string format: date-time effective_before: description: Include only credits that have any access before the provided date (exclusive) type: string format: date-time include_contract_credits: type: boolean description: Include credits on the contract level. include_archived: type: boolean description: Include archived credits and credits from archived contracts. include_ledgers: type: boolean description: Include credit ledgers in the response. Setting this flag may cause the query to be slower. include_balance: type: boolean description: Include the balance in the response. Setting this flag may cause the query to be slower. next_page: type: string description: The next page token from a previous response. limit: type: integer minimum: 1 maximum: 25 default: 25 description: The maximum number of commits to return. Defaults to 25. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d credit_id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 include_ledgers: true responses: '200': description: Success content: application/json: schema: type: object required: - data - next_page properties: data: type: array items: $ref: '#/components/schemas/Credit' next_page: type: string nullable: true example: data: - id: fa411f5b-fb85-4755-9d4d-530717be083c type: CREDIT rate_type: LIST_RATE name: My test credit description: My test credit description priority: 100 product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 applicable_contract_ids: - d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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' ledger: - invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 timestamp: '2020-03-01T00:00:00.000Z' type: CREDIT_AUTOMATED_INVOICE_DEDUCTION segment_id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a uniqueness_key: 372p7cvwr3-uniqueness-key next_page: null /v1/contracts/customerCredits/create: post: description: "Creates customer-level credits that provide spending allowances or free credit balances for customers across their Metronome usage. Note: In most cases, you should add credits directly to customer contracts using the contract/create or contract/edit APIs.\n\n### Use this endpoint to:\nUse this endpoint when you need to provision credits directly at the customer level that can be applied across multiple contracts or scoped to specific contracts. Customer-level credits are ideal for:\n- Customer onboarding incentives that apply globally\n- Flexible spending allowances that aren't tied to a single contract\n- Migration scenarios where you need to preserve existing customer balances\n\n#### Scoping flexibility: \nCustomer-level credits can be configured in two ways:\n- Contract-specific: Use the applicable_contract_ids field to limit the credit to specific contracts\n- Cross-contract: Leave applicable_contract_ids empty to allow the credit to be used across all of the customer's contracts\n\n#### Product Targeting: \nCredits can be scoped to specific products using `applicable_product_ids` or `applicable_product_tags`, or left unrestricted to apply to all products.\n\n#### Priority considerations: \nWhen multiple credits are applicable, the one with the lower priority value will be consumed first. If there is a tie, contract level commits and credits will be applied before customer level commits and credits. Plan your priority scheme carefully to ensure credits are applied in the desired order.\n\n#### Access Schedule Required: \nYou must provide an `access_schedule` that defines when and how much credit becomes available to the customer over time. This usually is aligned to the contract schedule or starts immediately and is set to expire in the future.\n\n### Usage Guidelines:\n⚠️ Preferred Alternative: In most cases, you should add credits directly to contracts using the contract/create or contract/edit APIs instead of creating customer-level credits. Contract-level credits provide better organization, and are easier for finance teams to recognize revenue, and are the recommended approach for most use cases.\n" operationId: createCustomerCredit-v1 summary: Create a credit tags: - Credits and commits requestBody: description: Create a credit content: application/json: schema: $ref: '#/components/schemas/CreateCustomerCreditPayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d name: My Credit priority: 100 product_id: f14d6729-6a44-4b13-9908-9387f1918790 access_schedule: credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 schedule_items: - amount: 1000 starting_at: '2020-01-01T00:00:00.000Z' ending_before: '2020-02-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: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/customerCredits/updateEndDate: post: description: "Shortens the end date of an existing customer credit to terminate it earlier than originally scheduled. Only allows moving end dates forward (earlier), not extending them. \n\nNote: To extend credit end dates or make comprehensive edits, use the 'edit credit' endpoint instead.\n" operationId: updateCreditEndDate-v1 summary: Update the credit end date tags: - Credits and commits requestBody: description: Update the access end date of a credit content: application/json: schema: $ref: '#/components/schemas/UpdateCreditEndDatePayload' example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d credit_id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 access_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: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '404': $ref: '#/components/responses/NotFound' /v1/contracts/customerBalances/list: post: description: 'Retrieve a comprehensive view of all available balances (commits and credits) for a customer. This endpoint provides real-time visibility into prepaid funds, postpaid commitments, promotional credits, and other balance types that can offset usage charges, helping you build transparent billing experiences. ### Use this endpoint to: - Display current available balances in customer dashboards - Verify available funds before approving high-usage operations - Generate balance reports for finance teams - Filter balances by contract or date ranges ### Key response fields: An array of balance objects (all credits and commits) containing: - Balance details: Current available amount for each commit or credit - Metadata: Product associations, priorities, applicable date ranges - Optional ledger entries: Detailed transaction history (if `include_ledgers=true`) - Balance calculations: Including pending transactions and future-dated entries - Custom fields: Any additional metadata attached to balances ### Usage guidelines: - Use the [getNetBalance](https://docs.metronome.com/api-reference/credits-and-commits/get-the-net-balance-of-a-customer) endpoint to retrieve a single combined current balance - Date filtering: Use `effective_before` to include only balances with access before a specific date (exclusive) - Set `include_balance=true` for calculated balance amounts on each commit or credit - Set `include_ledgers=true` for full transaction history - Set `include_contract_balances = true` to see contract level balances - Balance logic: Reflects currently accessible amounts, excluding expired/future segments - Manual adjustments: Includes all manual ledger entries, even future-dated ones ' operationId: listCustomerBalances-v1 summary: List balances tags: - Credits and commits requestBody: description: List all balances (commits and credits) for a customer content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid id: type: string format: uuid covering_date: description: Return only balances that have access schedules that "cover" the provided date type: string format: date-time starting_at: description: Include only balances that have any access on or after the provided date type: string format: date-time effective_before: description: Include only balances that have any access before the provided date (exclusive) type: string format: date-time include_contract_balances: type: boolean description: Include balances on the contract level. include_archived: type: boolean description: Include archived credits and credits from archived contracts. include_ledgers: type: boolean description: Include 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. next_page: type: string description: The next page token from a previous response. limit: type: integer minimum: 1 maximum: 25 default: 25 description: The maximum number of commits to return. Defaults to 25. exclude_zero_balances: x-mint: groups: - ff:allow-exclude-zero-balances type: boolean description: Exclude balances with zero amounts from the response. example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d id: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85 include_ledgers: true responses: '200': description: Success content: application/json: schema: type: object required: - data - next_page properties: data: type: array items: oneOf: - $ref: '#/components/schemas/Commit' - $ref: '#/components/schemas/Credit' next_page: type: string nullable: true example: data: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 type: PREPAID rate_type: LIST_RATE name: My test commit description: My test commit description priority: 100 product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A rollover_fraction: 0.1 applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 applicable_contract_ids: - d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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 invoice_contract: id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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 uniqueness_key: 946g9bepi1-uniqueness-key created_at: '2020-01-01T00:00:00.000Z' - id: fa411f5b-fb85-4755-9d4d-530717be083c type: CREDIT rate_type: LIST_RATE name: My test credit description: My test credit description priority: 100 product: id: 2e30f074-d04c-412e-a134-851ebfa5ceb2 name: My product A applicable_product_ids: - 13a2179b-f0cb-460b-85a1-cd42964ca533 applicable_contract_ids: - d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc 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' ledger: - invoice_id: 525b9759-7bbd-4a05-aab1-d7c43c976b57 amount: 10000000 timestamp: '2020-03-01T00:00:00.000Z' type: CREDIT_AUTOMATED_INVOICE_DEDUCTION segment_id: 2d45952c-5a6e-43a9-8aab-f61ee21be81a uniqueness_key: 372p7cvwr3-uniqueness-key next_page: null /v1/contracts/customerBalances/getNetBalance: post: description: 'Retrieve the combined current balance across any grouping of credits and commits for a customer in a single API call. - Display real-time available balance to customers in billing dashboards - Build finance dashboards showing credit utilization across customer segments - Validate expected vs. actual balance during billing reconciliation ### Key response fields: - `balance`: The combined net balance available to use at this moment across all matching commits and credits - `credit_type_id`: The credit type (fiat or custom pricing unit) the balance is denominated in ### Filtering options: Balance filters allow you to scope the calculation to specific subsets of commits and credits. When using multiple filter objects, they are OR''d together — if a commit or credit matches any filter, it''s included in the net balance. Within a single filter object, all specified conditions are AND''d together. - **Balance types**: Include any combination of `PREPAID_COMMIT`, `POSTPAID_COMMIT`, and `CREDIT` (e.g., `["PREPAID_COMMIT", "CREDIT"]` to exclude postpaid commits). If not specified, all balance types are included. - **Specific IDs**: Target exact commit or credit IDs for precise balance queries - **Custom fields**: Filter by custom field key-value pairs; when multiple pairs are provided, commits must match all of them **Example**: To get the balance of all free-trial credits OR all signup-promotion commits, you''d pass two filter objects — one filtering for CREDIT with custom field campaign: free-trial, and another filtering for PREPAID_COMMIT with custom field campaign: signup-promotion. ### Usage guidelines: - **Balance ledger details**: Use the [listBalances](https://docs.metronome.com/api-reference/credits-and-commits/list-balances) endpoint instead to understand detailed ledger drawdowns for each individual balance - **Draft invoice handling**: Use `invoice_inclusion_mode` to control whether pending draft invoice deductions are included (`FINALIZED_AND_DRAFT`, the default) or excluded (`FINALIZED`) from the balance calculation - **Account hierarchies**: When querying a child customer, shared commits from parent contracts are not included — query the parent customer directly to see shared commit balances - **Negative balances**: Manual ledger entries can cause negative segment balances; these are treated as zero when calculating the net balance - **Credit types**: If `credit_type_id` is not specified, the balance defaults to USD (cents) ' operationId: getNetBalance-v1 summary: Get the net balance of a customer tags: - Credits and commits requestBody: description: Get the combined net balance for any grouping of credits and commits. content: application/json: schema: type: object required: - customer_id properties: customer_id: type: string format: uuid description: The ID of the customer. credit_type_id: type: string format: uuid description: The ID of the credit type (can be fiat or a custom pricing unit) to get the balance for. Defaults to USD (cents) if not specified. filters: type: array description: Balance filters are OR'd together, so if a given commit or credit matches any of the filters, it will be included in the net balance. items: $ref: '#/components/schemas/BalanceFilter' invoice_inclusion_mode: type: string description: Controls which invoices are considered when calculating the remaining balance. `FINALIZED` considers only deductions from finalized invoices. `FINALIZED_AND_DRAFT` also includes deductions from pending draft invoices. enum: - FINALIZED - FINALIZED_AND_DRAFT default: FINALIZED_AND_DRAFT example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 filters: - balance_types: - CREDIT custom_fields: campaign: free-trial - balance_types: - PREPAID_COMMIT - POSTPAID_COMMIT custom_fields: campaign: signup-promotion responses: '200': description: Success content: application/json: schema: type: object required: - data properties: data: type: object required: - balance - credit_type_id properties: balance: type: number description: The combined net balance that the customer has access to use at this moment across all pertinent commits and credits. credit_type_id: type: string format: uuid description: The ID of the credit type (can be fiat or a custom pricing unit) that the balance is for. example: data: balance: 123.45 credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' /v1/contracts/seatBalances/list: post: description: 'Retrieve detailed balance for seat-based credits and commits from the contract''s subscriptions, broken down by individual seats. ### Use this endpoint to: - Display per-seat balance information in customer dashboards - Filter balance data by subscription or specific seats ### Key response fields: An array of seat balance objects containing: - Seat id - Balance: current total balance across all commits and credits ### Usage guidelines: - Date filtering: use `covering_date` OR `starting_at`/`ending_before` to filter balance data by time range - Set `include_credits_and_commits=true` for detailed commits and credits breakdown per seat - Set `include_ledgers=true` for detailed transaction history per commit/credit per seat ' summary: List seat balances operationId: listSeatBalances-v1 tags: - Credits and commits requestBody: description: List seat-level balances for commits and credits. content: application/json: schema: type: object required: - customer_id - contract_id properties: customer_id: type: string format: uuid description: The customer ID to retrieve seat balances for contract_id: type: string format: uuid description: The contract ID to retrieve seat balances for subscription_ids: type: array items: type: string format: uuid description: Optional filter to only include seats from specific subscriptions. If subscriptions ids are not mapped to SEAT_BASED subscriptions, error will be returned. seat_ids: type: array items: type: string description: Optional filter to only include specific seats include_credits_and_commits: type: boolean default: false description: Include credits and commits in the response include_ledgers: type: boolean default: false description: Include ledger entries for each commit and commit. `include_credits_and_commits` must be set to `true` for `include_ledgers=true` to apply. starting_at: type: string format: date-time description: Include only commits or credits with access effective on or after this date (cannot be used with covering_date). effective_before: type: string format: date-time description: Include only commits or credits with access effective on or before this date (cannot be used with covering_date). covering_date: type: string format: date-time description: Include only commits or credits with access that cover this specific date (cannot be used with starting_at or ending_before). limit: type: integer description: 'Maximum number of seats to return. Range: 1-100. Default: 25. When `include_credits_and_commits = true`, if the total commits/credits across all seats exceeds 100, a limit of 100 applies to the total credits and commits. Seats are included greedily to maximize the number of seats returned. Example: if seat 1 has 98 commits and seat 2 has 10 commits, both seats will be returned (total: 108 commits). Each returned seat includes all of its associated credits and commits. ' cursor: type: string description: Page token from a previous response to retrieve the next page example: customer_id: 13117714-3f05-48e5-a6e9-a66093f13b4d contract_id: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc subscription_ids: - 8deed800-1b7a-495d-a207-6c52bac54dc9 include_credits_and_commits: true include_ledgers: true covering_date: '2024-03-01T00:00:00.000Z' limit: 25 responses: '200': description: Success content: application/json: schema: type: object required: - data - pagination properties: data: type: array items: $ref: '#/components/schemas/SeatBalance' pagination: type: object required: - seats_included - seats_available_for_next_page properties: seats_included: type: number description: Number of seats included in this response seats_available_for_next_page: type: number description: Number of seats available to fetch in the next page next_page: type: string nullable: true description: Token to retrieve the next page of results. Null if no more pages available example: data: - seat_id: seat_1 balances: - credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 balance: 30000 starting_balance: 50000 commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 balance: 30000 start_date: '2024-01-01T00:00:00.000Z' end_date: '2024-02-01T00:00:00.000Z' ledger_entries: - type: PREPAID_COMMIT_SEGMENT_START amount: 50000 timestamp: '2024-01-01T00:00:00.000Z' - type: PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION amount: -20000 timestamp: '2024-01-31T00:00:00.000Z' credits: - id: fa411f5b-fb85-4755-9d4d-530717be083c balance: 20000 start_date: '2024-01-01T00:00:00.000Z' end_date: '2024-02-01T00:00:00.000Z' ledger_entries: - type: CREDIT_SEGMENT_START amount: 25000 timestamp: '2024-01-01T00:00:00.000Z' - type: CREDIT_AUTOMATED_INVOICE_DEDUCTION amount: -5000 timestamp: '2024-01-31T00:00:00.000Z' - seat_id: seat_2 balances: - credit_type_id: 2714e483-4ff1-48e4-9e25-ac732e8f24f2 balance: 45000 starting_balance: 45000 commits: - id: 62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35 balance: 45000 start_date: '2024-01-01T00:00:00.000Z' end_date: '2024-02-01T00:00:00.000Z' ledger_entries: - type: PREPAID_COMMIT_SEGMENT_START amount: 45000 timestamp: '2024-01-01T00:00:00.000Z' credits: [] pagination: next_page: eyJsYXN0X3NlYXRfaWQiai seats_included: 2 seats_available_for_next_page: 8 '404': $ref: '#/components/responses/NotFound' /v2/contracts/commits/edit: post: description: "Edit specific details for a contract-level or customer-level commit. Use this endpoint to modify individual commit access schedules, invoice schedules, applicable products, invoicing contracts, or other fields. \n\n### Usage guidelines:\n- As with all edits in Metronome, draft invoices will reflect the edit immediately, while finalized invoices are untouched unless voided and regenerated.\n- If a commit's invoice schedule item is associated with a finalized invoice, you cannot remove or update the invoice schedule item.\n- If a commit's invoice schedule item is associated with a voided invoice, you cannot remove the invoice schedule item.\n- You cannot remove an commit access schedule segment that was applied to a finalized invoice. You can void the invoice beforehand and then remove the access schedule segment.\n" summary: Edit a commit operationId: editCommit-v2 tags: - Credits and commits requestBody: description: Commit and customer IDs and fields to update content: application/json: schema: $ref: '#/components/schemas/EditCommitPayload' example: customer_id: 4c91c473-fc12-445a-9c38-40421d47023f commit_id: 5e7e82cf-ccb7-428c-a96f-a8e4f67af822 access_schedule: update_schedule_items: - id: d5edbd32-c744-48cb-9475-a9bca0e6fa39 ending_before: '2025-03-12T00:00:00Z' 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 message: type: string /v2/contracts/credits/edit: post: description: "Edit details for a contract-level or customer-level credit. \n\n### Use this endpoint to: \n- Extend the duration or the amount of an existing free credit like a trial \n- Modify individual credit access schedules, applicable products, priority, or other fields. \n\n### Usage guidelines:\n- As with all edits in Metronome, draft invoices will reflect the edit immediately, while finalized invoices are untouched unless voided and regenerated. \n- You cannot remove an access schedule segment that was applied to a finalized invoice. You can void the invoice beforehand and then remove the access schedule segment.\n" summary: Edit a credit operationId: editCredit-v2 tags: - Credits and commits requestBody: description: Credit and customer IDs and fields to update content: application/json: schema: $ref: '#/components/schemas/EditCreditPayload' example: customer_id: 4c91c473-fc12-445a-9c38-40421d47023f credit_id: 5e7e82cf-ccb7-428c-a96f-a8e4f67af822 access_schedule: update_schedule_items: - id: d5edbd32-c744-48cb-9475-a9bca0e6fa39 ending_before: '2025-03-12T00:00:00Z' 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 message: type: string /v2/contracts/commits/archive: post: description: "Archive a contract-level or customer-level commit. Use this endpoint to deactivate a commit while preserving historical records. You will not be able to archive a commit until all of the finalized usage invoices the commit has been applied to are voided, and all of the finalized invoices for commit payment have been voided. \n\nExample workflow: \nThe customer was provisioned a prepaid commit erroneously. It was applied to their most recent finalized usage invoice.\n- First, void the finalized invoice that the commit was applied to. Also, void the finalized invoice associated with the commit payment. \n- Then, use the archiveCommit endpoint to deactivate the commit.\n- Finally, regenerate the voided invoice. The invoice will be regenerated without the application of the commit, which has now been archived. \n\n### Usage guidelines:\n- Once a commit has been archived, it will no longer appear by default on the endpoints `listCustomerCommits` or `listCustomerBalances`. Use the `include_archived` parameter to choose to fetch the details. \n- Once a commit has been archived, it has a null ledger and 0 remaining balance. \n- Archiving a commit fully deactivates the entire access schedule. If you want to reduce the amount granted in a commit, consider editing the access schedule using the `editCommit` endpoint, or adding a manual ledger entry using the `addManualBalanceLedgerEntry` endpoint.\n" summary: Archive a commit operationId: archiveCommit-v2 tags: - Credits and commits requestBody: description: Customer ID and Commit ID to archive content: application/json: schema: $ref: '#/components/schemas/ArchiveCommitPayload' example: customer_id: 4c91c473-fc12-445a-9c38-40421d47023f commit_id: 5e7e82cf-ccb7-428c-a96f-a8e4f67af822 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 message: type: string /v2/contracts/credits/archive: post: description: "Archive a contract-level or customer-level credit. Use this endpoint to deactivate a credit while preserving historical records. You will not be able to archive a credit until all of the finalized invoices the credit has been applied to are voided. \n\nExample workflow: \nThe customer was granted a free credit erroneously. It was applied to their most recent finalized invoice.\n- First, void the finalized invoice that the credit was applied to. \n- Then, use the archiveCredit endpoint to deactivate the credit. \n- Finally, regenerate the voided invoice. The invoice will be regenerated without the application of the credit, which has now been archived. \n\n### Usage guidelines:\n- Once a credit has been archived, it will no longer appear by default on the endpoints `listCustomerCredits` or `listCustomerBalances`. Use the `include_archived` parameter to choose to fetch the details. \n- Once a credit has been archived, it has a null ledger and 0 remaining balance. \n- Archiving a credit fully deactivates the entire access schedule. If you want to reduce the amount granted in a credit, consider editing the access schedule using the `editCredit` endpoint, or adding a manual ledger entry using the `addManualBalanceLedgerEntry` endpoint.\n" summary: Archive a credit operationId: archiveCredit-v2 tags: - Credits and commits requestBody: description: Customer ID and Credit ID to archive content: application/json: schema: $ref: '#/components/schemas/ArchiveCreditPayload' example: customer_id: 4c91c473-fc12-445a-9c38-40421d47023f credit_id: 5e7e82cf-ccb7-428c-a96f-a8e4f67af822 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 message: type: string components: schemas: SeatBalance: type: object required: - seat_id - balances properties: seat_id: type: string description: The unique identifier for the seat balances: type: array items: $ref: '#/components/schemas/SeatBalanceByCreditType' commits: type: array nullable: true description: Array of commits applicable to this seat with their balances items: $ref: '#/components/schemas/SeatCommitBalance' credits: type: array description: Array of credits applicable to this seat with their balances items: $ref: '#/components/schemas/SeatCreditBalance' 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 CommitHierarchyChildAccessAll: type: object required: - type properties: type: type: string enum: - ALL - all 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 SubscriptionConfigAllocation: type: string enum: - INDIVIDUAL - POOLED ArchiveCreditPayload: type: object required: - customer_id - credit_id properties: customer_id: type: string format: uuid description: ID of the customer whose credit is being archived credit_id: type: string format: uuid description: ID of the credit to archive 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 EditCommitPayload: type: object required: - customer_id - commit_id properties: customer_id: type: string format: uuid description: ID of the customer whose commit is being edited commit_id: type: string format: uuid description: ID of the commit to edit name: type: string description: Updated name for the commit description: type: string description: Updated description for the commit access_schedule: $ref: '#/components/schemas/UpdateAccessScheduleInput' invoice_schedule: $ref: '#/components/schemas/UpdateInvoiceScheduleInput' invoice_contract_id: type: string format: uuid description: ID of contract to use for invoicing 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. 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' product_id: type: string format: uuid 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: - 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. hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for commit hierarchy access control 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 ' 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 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. RecurringScheduleFrequency: type: string enum: - MONTHLY - monthly - QUARTERLY - quarterly - SEMI_ANNUAL - semi_annual - ANNUAL - annual 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 SeatBalanceCreditLedger: type: object required: - type - amount - timestamp properties: type: $ref: '#/components/schemas/SeatBalanceCreditLedgerEntryType' description: Credit ledger type amount: type: number description: Amount of the ledger entry timestamp: type: string format: date-time description: The datetime when the ledger is created 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 SeatBalanceCommitLedgerEntryType: type: string enum: - PREPAID_COMMIT_SEGMENT_START - PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION - PREPAID_COMMIT_ROLLOVER - PREPAID_COMMIT_EXPIRATION - PREPAID_COMMIT_CANCELED - PREPAID_COMMIT_CREDITED - PREPAID_COMMIT_MANUAL - PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT 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 AddManualBalanceLedgerEntryPayload: type: object required: - customer_id - id - segment_id - amount - reason properties: customer_id: type: string format: uuid description: ID of the customer whose balance is to be updated. contract_id: type: string format: uuid description: ID of the contract to update. Leave blank to update a customer level balance. id: type: string format: uuid description: ID of the balance (commit or credit) to update. segment_id: type: string format: uuid description: ID of the segment to update. amount: type: number description: Amount to add to the segment. A negative number will draw down from the balance. per_group_amounts: type: object additionalProperties: type: number description: If using individually configured commits/credits attached to seat managed subscriptions, the amount to add for each seat. Must sum to total amount. reason: type: string description: Reason for the manual adjustment. This will be displayed in the ledger. timestamp: type: string format: date-time description: RFC 3339 timestamp indicating when the manual adjustment takes place. If not provided, it will default to the start of the segment. CommitHierarchyConfiguration: type: object required: - child_access properties: child_access: oneOf: - $ref: '#/components/schemas/CommitHierarchyChildAccessAll' - $ref: '#/components/schemas/CommitHierarchyChildAccessNone' - $ref: '#/components/schemas/CommitHierarchyChildAccessContractIds' 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 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 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 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 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. 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 SeatCommitBalance: type: object required: - id - balance - start_date properties: id: type: string format: uuid description: The commit or credit ID balance: type: number description: The current balance for this commit for this specific seat start_date: type: string format: date-time description: The datetime when the commit becomes active end_date: type: string format: date-time nullable: true description: The datetime when the commit expires ledger_entries: type: array items: $ref: '#/components/schemas/SeatBalanceCommitLedger' description: Transaction history for this commit for this seat (only included if include_ledgers=true) ArchiveCommitPayload: type: object required: - customer_id - commit_id properties: customer_id: type: string format: uuid description: ID of the customer whose commit is being archived commit_id: type: string format: uuid description: ID of the commit to archive 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 ExternalPaymentGateThresholdCommitPayload: type: object required: - workflow_id - outcome properties: workflow_id: type: string format: uuid description: ID of the workflow to continue outcome: type: string enum: - paid - PAID - failed - FAILED description: The outcome of the external payment gate 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 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 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 CustomField: type: object description: 'Custom fields to be added eg. { "key1": "value1", "key2": "value2" }' additionalProperties: type: string SeatBalanceByCreditType: type: object required: - credit_type_id - balance - starting_balance properties: credit_type_id: type: string format: uuid balance: type: number description: The total balance across all commits and credits for this seat, of this credit type. starting_balance: type: number description: The total initial balances of all commits and credits for this seat, of this credit type. SeatBalanceCommitLedger: type: object required: - type - amount - timestamp properties: type: $ref: '#/components/schemas/SeatBalanceCommitLedgerEntryType' description: Commit ledger type amount: type: number description: Amount of the ledger entry timestamp: type: string format: date-time description: The datetime when the ledger is created UpdateCommitEndDatePayload: type: object required: - customer_id - commit_id properties: customer_id: type: string format: uuid description: ID of the customer whose commit is to be updated commit_id: type: string format: uuid description: ID of the commit to update. Only supports "PREPAID" commits. access_ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when access to the commit will end and it will no longer be possible to draw it down (exclusive). If not provided, the access will not be updated. invoices_ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when the commit will stop being invoiced (exclusive). If not provided, the invoice schedule will not be updated. 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 Error: required: - message type: object properties: message: type: string 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 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 Id: required: - id type: object properties: id: type: string format: uuid PostpaidCommitExpirationLedgerEntry: type: object required: - type - timestamp - amount properties: type: type: string enum: - POSTPAID_COMMIT_EXPIRATION timestamp: type: string format: date-time amount: type: number CommitHierarchyChildAccessNone: type: object required: - type properties: type: type: string enum: - NONE - none BalanceFilter: type: object properties: balance_types: type: array description: The balance type to filter by. items: type: string enum: - PREPAID_COMMIT - POSTPAID_COMMIT - CREDIT ids: type: array items: type: string format: uuid description: Specific IDs to compute balance across. custom_fields: type: object description: Custom fields to compute balance across. Must match all custom fields additionalProperties: type: string CreateCustomerCreditPayload: type: object required: - customer_id - priority - product_id - access_schedule properties: customer_id: type: string format: uuid name: type: string minLength: 1 description: displayed on invoices description: type: string description: Used only in UI/API. It is not exposed to end customers. priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product_id: type: string format: uuid access_schedule: $ref: '#/components/schemas/ScheduleDurationInput' description: Schedule for distributing the credit to the customer. 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' applicable_contract_ids: type: array items: type: string description: Which contract the credit applies to. If not provided, the credit applies to all contracts. 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. custom_fields: x-cf-entity: contract_credit $ref: '#/components/schemas/CustomField' rate_type: type: string enum: - COMMIT_RATE - commit_rate - LIST_RATE - list_rate uniqueness_key: $ref: '#/components/schemas/UniquenessKeyForCommitsAndCredits' DisableCommitTrueupPayload: type: object required: - customer_id - commit_id - contract_id properties: customer_id: type: string format: uuid description: ID of the customer whose commit is to be updated commit_id: type: string format: uuid description: ID of the commit to update contract_id: type: string format: uuid description: ID of the contract that the commit is on amendment_id: type: string format: uuid description: If applicable, the amendment ID that the commit is on SeatCreditBalance: type: object required: - id - balance - start_date properties: id: type: string format: uuid description: The credit ID balance: type: number description: The current balance for this credit for this specific seat start_date: type: string format: date-time description: The datetime when the credit becomes active end_date: type: string format: date-time nullable: true description: The datetime when the credit expires ledger_entries: type: array items: $ref: '#/components/schemas/SeatBalanceCreditLedger' description: Transaction history for this credit for this seat (only included if include_ledgers=true) 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 ApplySeatIncreaseConfigForRecurringCommit: type: object required: - is_prorated properties: is_prorated: type: boolean description: Indicates whether a mid-period seat increase should be prorated. 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. SeatBalanceCreditLedgerEntryType: type: string enum: - CREDIT_SEGMENT_START - CREDIT_AUTOMATED_INVOICE_DEDUCTION - CREDIT_EXPIRATION - CREDIT_CANCELED - CREDIT_CREDITED - CREDIT_MANUAL - CREDIT_SEAT_BASED_ADJUSTMENT - CREDIT_ROLLOVER 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 EditCreditPayload: type: object required: - customer_id - credit_id properties: customer_id: type: string format: uuid description: ID of the customer whose credit is being edited credit_id: type: string format: uuid description: ID of the credit to edit name: type: string description: Updated name for the credit description: type: string description: Updated description for the credit access_schedule: $ref: '#/components/schemas/UpdateAccessScheduleInput' applicable_product_ids: type: array nullable: true 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 nullable: true 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: 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' product_id: type: string format: uuid 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: - 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. hierarchy_configuration: $ref: '#/components/schemas/CommitHierarchyConfiguration' description: Optional configuration for credit hierarchy access control CreateCustomerCommitPayload: type: object required: - customer_id - type - priority - product_id - access_schedule properties: customer_id: type: string format: uuid 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 description: type: string description: Used only in UI/API. It is not exposed to end customers. priority: type: number description: If multiple credits or commits are applicable, the one with the lower priority will apply first. product_id: type: string format: uuid description: ID of the fixed product associated with the commit. This is required because products are used to invoice the commit amount. access_schedule: $ref: '#/components/schemas/ScheduleDurationInput' description: 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 accesss_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.' invoice_contract_id: type: string format: uuid description: The contract that this commit will be billed on. This is required for "POSTPAID" commits and for "PREPAID" commits unless there is no invoice schedule above (i.e., the commit is 'free'), or if do_not_invoice is set to true. 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. applicable_contract_ids: type: array items: type: string description: Which contract the commit applies to. If not provided, the commit applies to all contracts. 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. 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. custom_fields: x-cf-entity: commit $ref: '#/components/schemas/CustomField' uniqueness_key: $ref: '#/components/schemas/UniquenessKeyForCommitsAndCredits' 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 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 CreditType: required: - name - id type: object properties: name: type: string id: type: string format: uuid 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 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 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' UpdateCreditEndDatePayload: type: object required: - customer_id - credit_id - access_ending_before properties: customer_id: type: string format: uuid description: ID of the customer whose credit is to be updated credit_id: type: string format: uuid description: ID of the commit to update access_ending_before: type: string format: date-time description: RFC 3339 timestamp indicating when access to the credit will end and it will no longer be possible to draw it down (exclusive). 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) 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' 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' 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 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' 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 responses: NotFound: description: The specified resource was not found content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer