## List `client.v2.contracts.list(ContractListParamsbody, RequestOptionsoptions?): ContractListResponse` **post** `/v2/contracts/list` List all contracts for a customer in chronological order. New clients should use this endpoint rather than the v1 endpoint. ### Parameters - **body:** `ContractListParams` - **customer\_id:** `string` - **covering\_date:** `string` Optional RFC 3339 timestamp. Only include contracts active on the provided date. This cannot be provided if starting_at filter is provided. - **include\_archived:** `boolean` Include archived contracts in the response. - **include\_balance:** `boolean` Include the balance of credits and commits in the response. Setting this flag may cause the response to be slower. - **include\_ledgers:** `boolean` Include commit/credit ledgers in the response. Setting this flag may cause the response to be slower. - **starting\_at:** `string` Optional RFC 3339 timestamp. Only include contracts that started on or after this date. This cannot be provided if covering_date filter is provided. ### Returns - `ContractListResponse` - **data:** `Array` - **id:** `string` - **commits:** `Array` - **id:** `string` - **product:** `Product` - **id:** `string` - **name:** `string` - **type:** `"PREPAID" | "POSTPAID"` - `"PREPAID"` - `"POSTPAID"` - **access\_schedule:** `ScheduleDuration` The schedule that the customer will gain access to the credits purposed with this commit. - **applicable\_contract\_ids:** `Array` - **applicable\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **archived\_at:** `string` - **balance:** `number` 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. - **contract:** `Contract` - **id:** `string` - **custom\_fields:** `Record` - **description:** `string` - **hierarchy\_configuration:** `HierarchyConfiguration` Optional configuration for commit hierarchy access control - **child\_access:** `CommitHierarchyChildAccessAll | CommitHierarchyChildAccessNone | CommitHierarchyChildAccessContractIDs` - `CommitHierarchyChildAccessAll` - **type:** `"ALL"` - `"ALL"` - `CommitHierarchyChildAccessNone` - **type:** `"NONE"` - `"NONE"` - `CommitHierarchyChildAccessContractIDs` - **contract\_ids:** `Array` - **type:** `"CONTRACT_IDS"` - `"CONTRACT_IDS"` - **invoice\_contract:** `InvoiceContract` The contract that this commit will be billed on. - **id:** `string` - **invoice\_schedule:** `SchedulePointInTime` The schedule that the customer will be invoiced for this commit. - **ledger:** `Array` A list of ordered events that impact the balance of a commit. For example, an invoice deduction or a rollover. - `PrepaidCommitSegmentStartLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_SEGMENT_START"` - `"PREPAID_COMMIT_SEGMENT_START"` - `PrepaidCommitAutomatedInvoiceDeductionLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"` - `"PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"` - **contract\_id:** `string` - `PrepaidCommitRolloverLedgerEntry` - **amount:** `number` - **new\_contract\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_ROLLOVER"` - `"PREPAID_COMMIT_ROLLOVER"` - `PrepaidCommitExpirationLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_EXPIRATION"` - `"PREPAID_COMMIT_EXPIRATION"` - `PrepaidCommitCanceledLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_CANCELED"` - `"PREPAID_COMMIT_CANCELED"` - **contract\_id:** `string` - `PrepaidCommitCreditedLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_CREDITED"` - `"PREPAID_COMMIT_CREDITED"` - **contract\_id:** `string` - `PrepaidCommitSeatBasedAdjustmentLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT"` - `"PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT"` - `PostpaidCommitInitialBalanceLedgerEntry` - **amount:** `number` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_INITIAL_BALANCE"` - `"POSTPAID_COMMIT_INITIAL_BALANCE"` - `PostpaidCommitAutomatedInvoiceDeductionLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"` - `"POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION"` - **contract\_id:** `string` - `PostpaidCommitRolloverLedgerEntry` - **amount:** `number` - **new\_contract\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_ROLLOVER"` - `"POSTPAID_COMMIT_ROLLOVER"` - `PostpaidCommitTrueupLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_TRUEUP"` - `"POSTPAID_COMMIT_TRUEUP"` - **contract\_id:** `string` - `PrepaidCommitManualLedgerEntry` - **amount:** `number` - **reason:** `string` - **timestamp:** `string` - **type:** `"PREPAID_COMMIT_MANUAL"` - `"PREPAID_COMMIT_MANUAL"` - `PostpaidCommitManualLedgerEntry` - **amount:** `number` - **reason:** `string` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_MANUAL"` - `"POSTPAID_COMMIT_MANUAL"` - `PostpaidCommitExpirationLedgerEntry` - **amount:** `number` - **timestamp:** `string` - **type:** `"POSTPAID_COMMIT_EXPIRATION"` - `"POSTPAID_COMMIT_EXPIRATION"` - **name:** `string` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **priority:** `number` If multiple credits or commits are applicable, the one with the lower priority will apply first. - **rate\_type:** `"COMMIT_RATE" | "LIST_RATE"` - `"COMMIT_RATE"` - `"LIST_RATE"` - **rolled\_over\_from:** `RolledOverFrom` - **commit\_id:** `string` - **contract\_id:** `string` - **rollover\_fraction:** `number` - **salesforce\_opportunity\_id:** `string` This field's availability is dependent on your client's configuration. - **specifiers:** `Array` 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. - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `Array` If provided, the specifier will only apply to products with all the specified tags. - **created\_at:** `string` - **created\_by:** `string` - **customer\_id:** `string` - **overrides:** `Array` - **id:** `string` - **starting\_at:** `string` - **applicable\_product\_tags:** `Array` - **ending\_before:** `string` - **entitled:** `boolean` - **is\_commit\_specific:** `boolean` - **multiplier:** `number` - **override\_specifiers:** `Array` - **billing\_frequency:** `"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"` - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **commit\_ids:** `Array` - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` - **product\_tags:** `Array` - **recurring\_commit\_ids:** `Array` - **recurring\_credit\_ids:** `Array` - **override\_tiers:** `Array` - **multiplier:** `number` - **size:** `number` - **overwrite\_rate:** `OverwriteRate` - **rate\_type:** `"FLAT" | "PERCENTAGE" | "SUBSCRIPTION" | 2 more` - `"FLAT"` - `"PERCENTAGE"` - `"SUBSCRIPTION"` - `"TIERED"` - `"CUSTOM"` - **credit\_type:** `CreditTypeData` - **custom\_rate:** `Record` Only set for CUSTOM rate_type. This field is interpreted by custom rate processors. - **is\_prorated:** `boolean` Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true. - **price:** `number` 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:** `number` Default quantity. For SUBSCRIPTION rate_type, this must be >=0. - **tiers:** `Array` Only set for TIERED rate_type. - **price:** `number` - **size:** `number` - **priority:** `number` - **product:** `Product` - **id:** `string` - **name:** `string` - **target:** `"COMMIT_RATE" | "LIST_RATE"` - `"COMMIT_RATE"` - `"LIST_RATE"` - **type:** `"OVERWRITE" | "MULTIPLIER" | "TIERED"` - `"OVERWRITE"` - `"MULTIPLIER"` - `"TIERED"` - **scheduled\_charges:** `Array` - **id:** `string` - **product:** `Product` - **id:** `string` - **name:** `string` - **schedule:** `SchedulePointInTime` - **archived\_at:** `string` - **custom\_fields:** `Record` - **name:** `string` displayed on invoices - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **starting\_at:** `string` - **transitions:** `Array` - **from\_contract\_id:** `string` - **to\_contract\_id:** `string` - **type:** `"SUPERSEDE" | "RENEWAL"` - `"SUPERSEDE"` - `"RENEWAL"` - **usage\_filter:** `Array` - **group\_key:** `string` - **group\_values:** `Array` - **starting\_at:** `string` This will match contract starting_at value if usage filter is active from the beginning of the contract. - **ending\_before:** `string` 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. - **usage\_statement\_schedule:** `UsageStatementSchedule` - **billing\_anchor\_date:** `string` Contract usage statements follow a selected cadence based on this date. - **frequency:** `"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"` - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **archived\_at:** `string` - **credits:** `Array` - **id:** `string` - **product:** `Product` - **id:** `string` - **name:** `string` - **type:** `"CREDIT"` - `"CREDIT"` - **access\_schedule:** `ScheduleDuration` The schedule that the customer will gain access to the credits. - **applicable\_contract\_ids:** `Array` - **applicable\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **balance:** `number` 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. - **contract:** `Contract` - **id:** `string` - **custom\_fields:** `Record` - **description:** `string` - **hierarchy\_configuration:** `HierarchyConfiguration` Optional configuration for credit hierarchy access control - **child\_access:** `CommitHierarchyChildAccessAll | CommitHierarchyChildAccessNone | CommitHierarchyChildAccessContractIDs` - `CommitHierarchyChildAccessAll` - **type:** `"ALL"` - `"ALL"` - `CommitHierarchyChildAccessNone` - **type:** `"NONE"` - `"NONE"` - `CommitHierarchyChildAccessContractIDs` - **contract\_ids:** `Array` - **type:** `"CONTRACT_IDS"` - `"CONTRACT_IDS"` - **ledger:** `Array` A list of ordered events that impact the balance of a credit. For example, an invoice deduction or an expiration. - `CreditSegmentStartLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_SEGMENT_START"` - `"CREDIT_SEGMENT_START"` - `CreditAutomatedInvoiceDeductionLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_AUTOMATED_INVOICE_DEDUCTION"` - `"CREDIT_AUTOMATED_INVOICE_DEDUCTION"` - **contract\_id:** `string` - `CreditExpirationLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_EXPIRATION"` - `"CREDIT_EXPIRATION"` - `CreditCanceledLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_CANCELED"` - `"CREDIT_CANCELED"` - **contract\_id:** `string` - `CreditCreditedLedgerEntry` - **amount:** `number` - **invoice\_id:** `string` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_CREDITED"` - `"CREDIT_CREDITED"` - **contract\_id:** `string` - `CreditManualLedgerEntry` - **amount:** `number` - **reason:** `string` - **timestamp:** `string` - **type:** `"CREDIT_MANUAL"` - `"CREDIT_MANUAL"` - `CreditSeatBasedAdjustmentLedgerEntry` - **amount:** `number` - **segment\_id:** `string` - **timestamp:** `string` - **type:** `"CREDIT_SEAT_BASED_ADJUSTMENT"` - `"CREDIT_SEAT_BASED_ADJUSTMENT"` - **name:** `string` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **priority:** `number` If multiple credits or commits are applicable, the one with the lower priority will apply first. - **salesforce\_opportunity\_id:** `string` This field's availability is dependent on your client's configuration. - **specifiers:** `Array` 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. - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `Array` If provided, the specifier will only apply to products with all the specified tags. - **custom\_fields:** `Record` - **customer\_billing\_provider\_configuration:** `CustomerBillingProviderConfiguration` This field's availability is dependent on your client's configuration. - **id:** `string` ID of Customer's billing provider configuration. - **billing\_provider:** `"aws_marketplace" | "stripe" | "netsuite" | 5 more` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **delivery\_method:** `"direct_to_billing_provider" | "aws_sqs" | "tackle" | "aws_sns"` - `"direct_to_billing_provider"` - `"aws_sqs"` - `"tackle"` - `"aws_sns"` - **discounts:** `Array` This field's availability is dependent on your client's configuration. - **id:** `string` - **product:** `Product` - **id:** `string` - **name:** `string` - **schedule:** `SchedulePointInTime` - **custom\_fields:** `Record` - **name:** `string` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **ending\_before:** `string` - **has\_more:** `HasMore` Indicates whether there are more items than the limit for this endpoint. Use the respective list endpoints to get the full lists. - **commits:** `boolean` 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:** `boolean` 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. - **hierarchy\_configuration:** `ParentHierarchyConfiguration | ChildHierarchyConfiguration` Either a **parent** configuration with a list of children or a **child** configuration with a single parent. - `ParentHierarchyConfiguration` - **children:** `Array` List of contracts that belong to this parent. - **contract\_id:** `string` - **customer\_id:** `string` - `ChildHierarchyConfiguration` - **parent:** `Parent` The single parent contract/customer for this child. - **contract\_id:** `string` - **customer\_id:** `string` - **multiplier\_override\_prioritization:** `"LOWEST_MULTIPLIER" | "EXPLICIT"` 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. - `"LOWEST_MULTIPLIER"` - `"EXPLICIT"` - **name:** `string` - **net\_payment\_terms\_days:** `number` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **prepaid\_balance\_threshold\_configuration:** `PrepaidBalanceThresholdConfiguration` - **commit:** `Commit` - **product\_id:** `string` The commit product that will be used to generate the line item for commit payment. - **applicable\_product\_ids:** `Array` 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:** `Array` 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. - **description:** `string` - **name:** `string` Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name. - **specifiers:** `Array` 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`. - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `Array` If provided, the specifier will only apply to products with all the specified tags. - **is\_enabled:** `boolean` 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. - **payment\_gate\_config:** `PaymentGateConfig` - **payment\_gate\_type:** `"NONE" | "STRIPE" | "EXTERNAL"` 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. - `"NONE"` - `"STRIPE"` - `"EXTERNAL"` - **precalculated\_tax\_config:** `PrecalculatedTaxConfig` Only applicable if using PRECALCULATED as your tax type. - **tax\_amount:** `number` Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule - **tax\_name:** `string` Name of the tax to be applied. This may be used in an invoice line item description. - **stripe\_config:** `StripeConfig` Only applicable if using STRIPE as your payment gateway type. - **payment\_type:** `"INVOICE" | "PAYMENT_INTENT"` If left blank, will default to INVOICE - `"INVOICE"` - `"PAYMENT_INTENT"` - **invoice\_metadata:** `Record` Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. - **tax\_type:** `"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"` 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. - `"NONE"` - `"STRIPE"` - `"ANROK"` - `"PRECALCULATED"` - **recharge\_to\_amount:** `number` Specify the amount the balance should be recharged to. - **threshold\_amount:** `number` Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated. - **custom\_credit\_type\_id:** `string` 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. - **priority:** `number` Priority of the contract. - **professional\_services:** `Array` This field's availability is dependent on your client's configuration. - **id:** `string` - **max\_amount:** `number` Maximum amount for the term. - **product\_id:** `string` - **quantity:** `number` Quantity for the charge. Will be multiplied by unit_price to determine the amount. - **unit\_price:** `number` Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified. - **custom\_fields:** `Record` - **description:** `string` - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **rate\_card\_id:** `string` - **recurring\_commits:** `Array` - **id:** `string` - **access\_amount:** `AccessAmount` The amount of commit to grant. - **credit\_type\_id:** `string` - **unit\_price:** `number` - **quantity:** `number` - **commit\_duration:** `CommitDuration` The amount of time the created commits will be valid for - **value:** `number` - **unit:** `"PERIODS"` - `"PERIODS"` - **priority:** `number` Will be passed down to the individual commits - **product:** `Product` - **id:** `string` - **name:** `string` - **rate\_type:** `"COMMIT_RATE" | "LIST_RATE"` Whether the created commits will use the commit rate or list rate - `"COMMIT_RATE"` - `"LIST_RATE"` - **starting\_at:** `string` Determines the start time for the first commit - **applicable\_product\_ids:** `Array` Will be passed down to the individual commits - **applicable\_product\_tags:** `Array` Will be passed down to the individual commits - **contract:** `Contract` - **id:** `string` - **description:** `string` Will be passed down to the individual commits - **ending\_before:** `string` Determines when the contract will stop creating recurring commits. Optional - **hierarchy\_configuration:** `HierarchyConfiguration` Optional configuration for recurring credit hierarchy access control - **child\_access:** `CommitHierarchyChildAccessAll | CommitHierarchyChildAccessNone | CommitHierarchyChildAccessContractIDs` - `CommitHierarchyChildAccessAll` - **type:** `"ALL"` - `"ALL"` - `CommitHierarchyChildAccessNone` - **type:** `"NONE"` - `"NONE"` - `CommitHierarchyChildAccessContractIDs` - **contract\_ids:** `Array` - **type:** `"CONTRACT_IDS"` - `"CONTRACT_IDS"` - **invoice\_amount:** `InvoiceAmount` The amount the customer should be billed for the commit. Not required. - **credit\_type\_id:** `string` - **quantity:** `number` - **unit\_price:** `number` - **name:** `string` Displayed on invoices. Will be passed through to the individual commits - **netsuite\_sales\_order\_id:** `string` Will be passed down to the individual commits - **proration:** `"NONE" | "FIRST" | "LAST" | "FIRST_AND_LAST"` 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). - `"NONE"` - `"FIRST"` - `"LAST"` - `"FIRST_AND_LAST"` - **recurrence\_frequency:** `"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"` 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. - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **rollover\_fraction:** `number` 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. - **specifiers:** `Array` 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. - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `Array` If provided, the specifier will only apply to products with all the specified tags. - **subscription\_config:** `SubscriptionConfig` Attach a subscription to the recurring commit/credit. - **allocation:** `"INDIVIDUAL" | "POOLED"` - `"INDIVIDUAL"` - `"POOLED"` - **apply\_seat\_increase\_config:** `ApplySeatIncreaseConfig` - **is\_prorated:** `boolean` Indicates whether a mid-period seat increase should be prorated. - **subscription\_id:** `string` - **recurring\_credits:** `Array` - **id:** `string` - **access\_amount:** `AccessAmount` The amount of commit to grant. - **credit\_type\_id:** `string` - **unit\_price:** `number` - **quantity:** `number` - **commit\_duration:** `CommitDuration` The amount of time the created commits will be valid for - **value:** `number` - **unit:** `"PERIODS"` - `"PERIODS"` - **priority:** `number` Will be passed down to the individual commits - **product:** `Product` - **id:** `string` - **name:** `string` - **rate\_type:** `"COMMIT_RATE" | "LIST_RATE"` Whether the created commits will use the commit rate or list rate - `"COMMIT_RATE"` - `"LIST_RATE"` - **starting\_at:** `string` Determines the start time for the first commit - **applicable\_product\_ids:** `Array` Will be passed down to the individual commits - **applicable\_product\_tags:** `Array` Will be passed down to the individual commits - **contract:** `Contract` - **id:** `string` - **description:** `string` Will be passed down to the individual commits - **ending\_before:** `string` Determines when the contract will stop creating recurring commits. Optional - **hierarchy\_configuration:** `HierarchyConfiguration` Optional configuration for recurring credit hierarchy access control - **child\_access:** `CommitHierarchyChildAccessAll | CommitHierarchyChildAccessNone | CommitHierarchyChildAccessContractIDs` - `CommitHierarchyChildAccessAll` - **type:** `"ALL"` - `"ALL"` - `CommitHierarchyChildAccessNone` - **type:** `"NONE"` - `"NONE"` - `CommitHierarchyChildAccessContractIDs` - **contract\_ids:** `Array` - **type:** `"CONTRACT_IDS"` - `"CONTRACT_IDS"` - **name:** `string` Displayed on invoices. Will be passed through to the individual commits - **netsuite\_sales\_order\_id:** `string` Will be passed down to the individual commits - **proration:** `"NONE" | "FIRST" | "LAST" | "FIRST_AND_LAST"` 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). - `"NONE"` - `"FIRST"` - `"LAST"` - `"FIRST_AND_LAST"` - **recurrence\_frequency:** `"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"` 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. - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **rollover\_fraction:** `number` 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. - **specifiers:** `Array` 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. - **presentation\_group\_values:** `Record` - **pricing\_group\_values:** `Record` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `Array` If provided, the specifier will only apply to products with all the specified tags. - **subscription\_config:** `SubscriptionConfig` Attach a subscription to the recurring commit/credit. - **allocation:** `"INDIVIDUAL" | "POOLED"` - `"INDIVIDUAL"` - `"POOLED"` - **apply\_seat\_increase\_config:** `ApplySeatIncreaseConfig` - **is\_prorated:** `boolean` Indicates whether a mid-period seat increase should be prorated. - **subscription\_id:** `string` - **reseller\_royalties:** `Array` This field's availability is dependent on your client's configuration. - **reseller\_type:** `"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **segments:** `Array` - **fraction:** `number` - **netsuite\_reseller\_id:** `string` - **reseller\_type:** `"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **starting\_at:** `string` - **applicable\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **aws\_account\_number:** `string` - **aws\_offer\_id:** `string` - **aws\_payer\_reference\_id:** `string` - **ending\_before:** `string` - **gcp\_account\_id:** `string` - **gcp\_offer\_id:** `string` - **reseller\_contract\_value:** `number` - **salesforce\_opportunity\_id:** `string` This field's availability is dependent on your client's configuration. - **scheduled\_charges\_on\_usage\_invoices:** `"ALL"` 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. - `"ALL"` - **spend\_threshold\_configuration:** `SpendThresholdConfiguration` - **commit:** `Commit` - **product\_id:** `string` The commit product that will be used to generate the line item for commit payment. - **description:** `string` - **name:** `string` Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name. - **is\_enabled:** `boolean` 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. - **payment\_gate\_config:** `PaymentGateConfig` - **payment\_gate\_type:** `"NONE" | "STRIPE" | "EXTERNAL"` 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. - `"NONE"` - `"STRIPE"` - `"EXTERNAL"` - **precalculated\_tax\_config:** `PrecalculatedTaxConfig` Only applicable if using PRECALCULATED as your tax type. - **tax\_amount:** `number` Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule - **tax\_name:** `string` Name of the tax to be applied. This may be used in an invoice line item description. - **stripe\_config:** `StripeConfig` Only applicable if using STRIPE as your payment gateway type. - **payment\_type:** `"INVOICE" | "PAYMENT_INTENT"` If left blank, will default to INVOICE - `"INVOICE"` - `"PAYMENT_INTENT"` - **invoice\_metadata:** `Record` Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. - **tax\_type:** `"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"` 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. - `"NONE"` - `"STRIPE"` - `"ANROK"` - `"PRECALCULATED"` - **threshold\_amount:** `number` Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated. - **subscriptions:** `Array` List of subscriptions on the contract. - **collection\_schedule:** `"ADVANCE" | "ARREARS"` - `"ADVANCE"` - `"ARREARS"` - **proration:** `Proration` - **invoice\_behavior:** `"BILL_IMMEDIATELY" | "BILL_ON_NEXT_COLLECTION_DATE"` - `"BILL_IMMEDIATELY"` - `"BILL_ON_NEXT_COLLECTION_DATE"` - **is\_prorated:** `boolean` - **quantity\_schedule:** `Array` List of quantity schedule items for the subscription. Only includes the current quantity and future quantity changes. - **quantity:** `number` - **starting\_at:** `string` - **ending\_before:** `string` - **starting\_at:** `string` - **subscription\_rate:** `SubscriptionRate` - **billing\_frequency:** `"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"` - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **product:** `Product` - **id:** `string` - **name:** `string` - **id:** `string` - **custom\_fields:** `Record` - **description:** `string` - **ending\_before:** `string` - **fiat\_credit\_type\_id:** `string` - **name:** `string` - **total\_contract\_value:** `number` - **uniqueness\_key:** `string` 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. ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); const contracts = await client.v2.contracts.list({ customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d' }); console.log(contracts.data); ```