## Get Edit History `client.v2.contracts.getEditHistory(ContractGetEditHistoryParamsbody, RequestOptionsoptions?): ContractGetEditHistoryResponse` **post** `/v2/contracts/getEditHistory` Get the edit history of a specific contract. Contract editing must be enabled to use this endpoint. ### Parameters - **body:** `ContractGetEditHistoryParams` - **contract\_id:** `string` - **customer\_id:** `string` ### Returns - `ContractGetEditHistoryResponse` - **data:** `Array` - **id:** `string` - **add\_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\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **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\_schedule:** `SchedulePointInTime` The schedule that the customer will be invoiced for this commit. - **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"` - **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. 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. - **add\_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\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **description:** `string` - **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` - **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. 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. - **add\_discounts:** `Array` - **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. - **add\_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"` - **add\_prepaid\_balance\_threshold\_configuration:** `AddPrepaidBalanceThresholdConfiguration` - **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. - **add\_pro\_services:** `Array` - **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. - **add\_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` - **add\_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` - **add\_reseller\_royalties:** `Array` - **reseller\_type:** `"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **applicable\_product\_ids:** `Array` - **applicable\_product\_tags:** `Array` - **aws\_account\_number:** `string` - **aws\_offer\_id:** `string` - **aws\_payer\_reference\_id:** `string` - **ending\_before:** `string | null` - **fraction:** `number` - **gcp\_account\_id:** `string` - **gcp\_offer\_id:** `string` - **netsuite\_reseller\_id:** `string` - **reseller\_contract\_value:** `number` - **starting\_at:** `string` - **add\_scheduled\_charges:** `Array` - **id:** `string` - **product:** `Product` - **id:** `string` - **name:** `string` - **schedule:** `SchedulePointInTime` - **name:** `string` displayed on invoices - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **add\_spend\_threshold\_configuration:** `AddSpendThresholdConfiguration` - **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. - **add\_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` - **add\_usage\_filters:** `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. - **archive\_commits:** `Array` - **id:** `string` - **archive\_credits:** `Array` - **id:** `string` - **archive\_scheduled\_charges:** `Array` - **id:** `string` - **remove\_overrides:** `Array` - **id:** `string` - **timestamp:** `string` - **update\_commits:** `Array` - **id:** `string` - **access\_schedule:** `AccessSchedule` - **add\_schedule\_items:** `Array` - **amount:** `number` - **ending\_before:** `string` RFC 3339 timestamp (exclusive) - **starting\_at:** `string` RFC 3339 timestamp (inclusive) - **remove\_schedule\_items:** `Array` - **id:** `string` - **update\_schedule\_items:** `Array` - **id:** `string` - **amount:** `number` - **ending\_before:** `string` RFC 3339 timestamp (exclusive) - **starting\_at:** `string` RFC 3339 timestamp (inclusive) - **applicable\_product\_ids:** `Array | null` 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:** `Array | null` Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products. - **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\_schedule:** `InvoiceSchedule` - **add\_schedule\_items:** `Array` - **timestamp:** `string` - **amount:** `number` - **quantity:** `number` - **unit\_price:** `number` - **remove\_schedule\_items:** `Array` - **id:** `string` - **update\_schedule\_items:** `Array` - **id:** `string` - **amount:** `number` - **quantity:** `number` - **timestamp:** `string` - **unit\_price:** `number` - **name:** `string` - **netsuite\_sales\_order\_id:** `string | null` - **priority:** `number | null` If multiple commits are applicable, the one with the lower priority will apply first. - **product\_id:** `string` - **rollover\_fraction:** `number | null` - **specifiers:** `Array | null` 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. - **update\_contract\_end\_date:** `string` - **update\_contract\_name:** `string | null` Value to update the contract name to. If not provided, the contract name will remain unchanged. - **update\_credits:** `Array` - **id:** `string` - **access\_schedule:** `AccessSchedule` - **add\_schedule\_items:** `Array` - **amount:** `number` - **ending\_before:** `string` RFC 3339 timestamp (exclusive) - **starting\_at:** `string` RFC 3339 timestamp (inclusive) - **remove\_schedule\_items:** `Array` - **id:** `string` - **update\_schedule\_items:** `Array` - **id:** `string` - **amount:** `number` - **ending\_before:** `string` RFC 3339 timestamp (exclusive) - **starting\_at:** `string` RFC 3339 timestamp (inclusive) - **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"` - **name:** `string` - **netsuite\_sales\_order\_id:** `string | null` - **priority:** `number | null` If multiple credits are applicable, the one with the lower priority will apply first. - **rollover\_fraction:** `number | null` - **update\_discounts:** `Array` - **id:** `string` - **custom\_fields:** `Record` - **name:** `string` - **netsuite\_sales\_order\_id:** `string` - **schedule:** `Schedule` Must provide either schedule_items or recurring_schedule. - **credit\_type\_id:** `string` Defaults to USD (cents) if not passed. - **do\_not\_invoice:** `boolean` This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice. - **recurring\_schedule:** `RecurringSchedule` 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. - **amount\_distribution:** `"DIVIDED" | "DIVIDED_ROUNDED" | "EACH"` - `"DIVIDED"` - `"DIVIDED_ROUNDED"` - `"EACH"` - **ending\_before:** `string` RFC 3339 timestamp (exclusive). - **frequency:** `"MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | 2 more` - `"MONTHLY"` - `"QUARTERLY"` - `"SEMI_ANNUAL"` - `"ANNUAL"` - `"WEEKLY"` - **starting\_at:** `string` RFC 3339 timestamp (inclusive). - **amount:** `number` 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. - **quantity:** `number` 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. - **unit\_price:** `number` 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. - **schedule\_items:** `Array` Either provide amount or provide both unit_price and quantity. - **timestamp:** `string` timestamp of the scheduled event - **amount:** `number` 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. - **quantity:** `number` 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. - **unit\_price:** `number` 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. - **update\_prepaid\_balance\_threshold\_configuration:** `UpdatePrepaidBalanceThresholdConfiguration` - **commit:** `Commit` - **applicable\_product\_ids:** `Array | null` Which products the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products. - **applicable\_product\_tags:** `Array | null` Which tags the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products. - **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. - **product\_id:** `string` The commit product that will be used to generate the line item for commit payment. - **specifiers:** `Array | null` 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. - **custom\_credit\_type\_id:** `string | null` 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. - **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. - **update\_recurring\_commits:** `Array` - **id:** `string` - **access\_amount:** `AccessAmount` - **quantity:** `number` - **unit\_price:** `number` - **ending\_before:** `string` - **invoice\_amount:** `InvoiceAmount` - **quantity:** `number` - **unit\_price:** `number` - **update\_recurring\_credits:** `Array` - **id:** `string` - **access\_amount:** `AccessAmount` - **quantity:** `number` - **unit\_price:** `number` - **ending\_before:** `string` - **update\_refund\_invoices:** `Array` - **date:** `string` - **invoice\_id:** `string` - **update\_scheduled\_charges:** `Array` - **id:** `string` - **invoice\_schedule:** `InvoiceSchedule` - **add\_schedule\_items:** `Array` - **timestamp:** `string` - **amount:** `number` - **quantity:** `number` - **unit\_price:** `number` - **remove\_schedule\_items:** `Array` - **id:** `string` - **update\_schedule\_items:** `Array` - **id:** `string` - **amount:** `number` - **quantity:** `number` - **timestamp:** `string` - **unit\_price:** `number` - **name:** `string` - **netsuite\_sales\_order\_id:** `string | null` - **update\_spend\_threshold\_configuration:** `UpdateSpendThresholdConfiguration` - **commit:** `Commit` - **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. - **product\_id:** `string` The commit product that will be used to generate the line item for commit payment. - **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. - **update\_subscriptions:** `Array` Optional list of subscriptions to update. - **id:** `string` - **ending\_before:** `string` - **quantity\_updates:** `Array` - **starting\_at:** `string` - **quantity:** `number` - **quantity\_delta:** `number` ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); const response = await client.v2.contracts.getEditHistory({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', }); console.log(response.data); ```