Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Amend

Amend a contract
v1.contracts.amend(ContractAmendParams**kwargs) -> dataIDContractAmendResponse
post/v1/contracts/amend

Amendments will be replaced by Contract editing. New clients should implement using the editContract endpoint. Read more about the migration to contract editing here and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.

Parameters
contract_idstr

ID of the contract to amend

formatuuid
customer_idstr

ID of the customer whose contract is to be amended

formatuuid
starting_atunion
Union[str, datetime]

inclusive start time for the amendment

formatdate-time
commitsiterable
optional
product_idstrtypeliteralaccess_scheduleCommitAccessScheduleamountfloatapplicable_product_idslistapplicable_product_tagslistcustom_fieldsDict[str, str]descriptionstrhierarchy_configurationCommitHierarchyConfigurationinvoice_scheduleCommitInvoiceSchedulenamestrnetsuite_sales_order_idstrpayment_gate_configCommitPaymentGateConfigpriorityfloatrate_typeliteralrollover_fractionfloatspecifiersiterabletemporary_idstrIterable[Commit]
Hide ParametersShow Parameters
product_idstr
formatuuid
typeliteral
Literal["PREPAID", "POSTPAID"]
Hide ParametersShow Parameters
"PREPAID"
"POSTPAID"
access_scheduleschedule_itemsiterablecredit_type_idstrCommitAccessSchedule
optional

Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.

Hide ParametersShow Parameters
schedule_itemsiterable
amountfloatending_beforeunionstarting_atunionIterable[CommitAccessScheduleScheduleItem]
Hide ParametersShow Parameters
amountfloat
ending_beforeunion
Union[str, datetime]

RFC 3339 timestamp (exclusive)

formatdate-time
starting_atunion
Union[str, datetime]

RFC 3339 timestamp (inclusive)

formatdate-time
credit_type_idstr
optional

Defaults to USD (cents) if not passed

formatuuid
amountfloat
optional

(DEPRECATED) Use access_schedule and invoice_schedule instead.

applicable_product_idslist
optional
List[str]

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_tagslist
optional
List[str]

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

custom_fieldsDict[str, str]
optional
Dict[str, str]
descriptionstr
optional

Used only in UI/API. It is not exposed to end customers.

Optional configuration for commit hierarchy access control

Hide ParametersShow Parameters
Hide ParametersShow Parameters
CommitHierarchyConfigurationChildAccessCommitHierarchyChildAccessAllclass
Hide ParametersShow Parameters
typeliteral
Literal["ALL"]
Hide ParametersShow Parameters
"ALL"
CommitHierarchyConfigurationChildAccessCommitHierarchyChildAccessNoneclass
Hide ParametersShow Parameters
typeliteral
Literal["NONE"]
Hide ParametersShow Parameters
"NONE"
CommitHierarchyConfigurationChildAccessCommitHierarchyChildAccessContractIDsclass
Hide ParametersShow Parameters
contract_idslist
List[str]
typeliteral
Literal["CONTRACT_IDS"]
Hide ParametersShow Parameters
"CONTRACT_IDS"
invoice_schedulecredit_type_idstrdo_not_invoiceboolrecurring_scheduleCommitInvoiceScheduleRecurringScheduleschedule_itemsiterableCommitInvoiceSchedule
optional

Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.

Hide ParametersShow Parameters
credit_type_idstr
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoicebool
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionliteralending_beforeunionfrequencyliteralstarting_atunionamountfloatquantityfloatunit_pricefloatCommitInvoiceScheduleRecurringSchedule
optional

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.

Hide ParametersShow Parameters
amount_distributionliteral
Literal["DIVIDED", "DIVIDED_ROUNDED", "EACH"]
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforeunion
Union[str, datetime]

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyliteral
Literal["MONTHLY", "QUARTERLY", "SEMI_ANNUAL", "ANNUAL"]
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
starting_atunion
Union[str, datetime]

RFC 3339 timestamp (inclusive).

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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_itemsiterable
optional
timestampunionamountfloatquantityfloatunit_pricefloatIterable[CommitInvoiceScheduleScheduleItem]

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampunion
Union[str, datetime]

timestamp of the scheduled event

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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.

namestr
optional

displayed on invoices

minLength1
netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

payment_gate_configpayment_gate_typeliteralprecalculated_tax_configCommitPaymentGateConfigPrecalculatedTaxConfigstripe_configCommitPaymentGateConfigStripeConfigtax_typeliteralCommitPaymentGateConfig
optional

optionally payment gate this commit

Hide ParametersShow Parameters
payment_gate_typeliteral
Literal["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.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountfloattax_namestrCommitPaymentGateConfigPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountfloat

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestr
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeliteralinvoice_metadataDict[str, str]CommitPaymentGateConfigStripeConfig
optional

Only applicable if using STRIPE as your payment gate type.

Hide ParametersShow Parameters
payment_typeliteral
Literal["INVOICE", "PAYMENT_INTENT"]

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataDict[str, str]
optional
Dict[str, str]

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeliteral
optional
Literal["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.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
priorityfloat
optional

If multiple commits are applicable, the one with the lower priority will apply first.

rate_typeliteral
optional
Literal["COMMIT_RATE", "LIST_RATE"]
Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
rollover_fractionfloat
optional

Fraction of unused segments that will be rolled over. Must be between 0 and 1.

specifiersiterable
optional
presentation_group_valuesDict[str, str]pricing_group_valuesDict[str, str]product_idstrproduct_tagslistIterable[CommitSpecifier]

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.

Hide ParametersShow Parameters
presentation_group_valuesDict[str, str]
optional
Dict[str, str]
pricing_group_valuesDict[str, str]
optional
Dict[str, str]
product_idstr
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagslist
optional
List[str]

If provided, the specifier will only apply to products with all the specified tags.

temporary_idstr
optional

A temporary ID for the commit that can be used to reference the commit for commit specific overrides.

creditsiterable
optional
access_scheduleCreditAccessScheduleproduct_idstrapplicable_product_idslistapplicable_product_tagslistcustom_fieldsDict[str, str]descriptionstrhierarchy_configurationCreditHierarchyConfigurationnamestrnetsuite_sales_order_idstrpriorityfloatrate_typeliteralspecifiersiterableIterable[Credit]
Hide ParametersShow Parameters
access_scheduleschedule_itemsiterablecredit_type_idstrCreditAccessSchedule

Schedule for distributing the credit to the customer.

Hide ParametersShow Parameters
schedule_itemsiterable
amountfloatending_beforeunionstarting_atunionIterable[CreditAccessScheduleScheduleItem]
Hide ParametersShow Parameters
amountfloat
ending_beforeunion
Union[str, datetime]

RFC 3339 timestamp (exclusive)

formatdate-time
starting_atunion
Union[str, datetime]

RFC 3339 timestamp (inclusive)

formatdate-time
credit_type_idstr
optional

Defaults to USD (cents) if not passed

formatuuid
product_idstr
formatuuid
applicable_product_idslist
optional
List[str]

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_tagslist
optional
List[str]

Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

custom_fieldsDict[str, str]
optional
Dict[str, str]
descriptionstr
optional

Used only in UI/API. It is not exposed to end customers.

Optional configuration for credit hierarchy access control

Hide ParametersShow Parameters
Hide ParametersShow Parameters
CreditHierarchyConfigurationChildAccessCommitHierarchyChildAccessAllclass
Hide ParametersShow Parameters
typeliteral
Literal["ALL"]
Hide ParametersShow Parameters
"ALL"
CreditHierarchyConfigurationChildAccessCommitHierarchyChildAccessNoneclass
Hide ParametersShow Parameters
typeliteral
Literal["NONE"]
Hide ParametersShow Parameters
"NONE"
CreditHierarchyConfigurationChildAccessCommitHierarchyChildAccessContractIDsclass
Hide ParametersShow Parameters
contract_idslist
List[str]
typeliteral
Literal["CONTRACT_IDS"]
Hide ParametersShow Parameters
"CONTRACT_IDS"
namestr
optional

displayed on invoices

minLength1
netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

priorityfloat
optional

If multiple credits are applicable, the one with the lower priority will apply first.

rate_typeliteral
optional
Literal["COMMIT_RATE", "LIST_RATE"]
Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
specifiersiterable
optional
presentation_group_valuesDict[str, str]pricing_group_valuesDict[str, str]product_idstrproduct_tagslistIterable[CreditSpecifier]

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.

Hide ParametersShow Parameters
presentation_group_valuesDict[str, str]
optional
Dict[str, str]
pricing_group_valuesDict[str, str]
optional
Dict[str, str]
product_idstr
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagslist
optional
List[str]

If provided, the specifier will only apply to products with all the specified tags.

custom_fieldsDict[str, str]
optional
Dict[str, str]
discountsiterable
optional
product_idstrscheduleDiscountSchedulecustom_fieldsDict[str, str]namestrnetsuite_sales_order_idstrIterable[Discount]

This field's availability is dependent on your client's configuration.

Hide ParametersShow Parameters
product_idstr
formatuuid
schedulecredit_type_idstrdo_not_invoiceboolrecurring_scheduleDiscountScheduleRecurringScheduleschedule_itemsiterableDiscountSchedule

Must provide either schedule_items or recurring_schedule.

Hide ParametersShow Parameters
credit_type_idstr
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoicebool
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionliteralending_beforeunionfrequencyliteralstarting_atunionamountfloatquantityfloatunit_pricefloatDiscountScheduleRecurringSchedule
optional

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.

Hide ParametersShow Parameters
amount_distributionliteral
Literal["DIVIDED", "DIVIDED_ROUNDED", "EACH"]
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforeunion
Union[str, datetime]

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyliteral
Literal["MONTHLY", "QUARTERLY", "SEMI_ANNUAL", "ANNUAL"]
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
starting_atunion
Union[str, datetime]

RFC 3339 timestamp (inclusive).

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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_itemsiterable
optional
timestampunionamountfloatquantityfloatunit_pricefloatIterable[DiscountScheduleScheduleItem]

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampunion
Union[str, datetime]

timestamp of the scheduled event

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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.

custom_fieldsDict[str, str]
optional
Dict[str, str]
namestr
optional

displayed on invoices

minLength1
netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

overridesiterable
optional
starting_atunionapplicable_product_tagslistending_beforeunionentitledboolis_commit_specificboolmultiplierfloatoverride_specifiersiterableoverwrite_rateOverrideOverwriteRatepriorityfloatproduct_idstrtargetliteraltiersiterabletypeliteralIterable[Override]
Hide ParametersShow Parameters
starting_atunion
Union[str, datetime]

RFC 3339 timestamp indicating when the override will start applying (inclusive)

formatdate-time
applicable_product_tagslist
optional
List[str]

tags identifying products whose rates are being overridden. Cannot be used in conjunction with override_specifiers.

ending_beforeunion
optional
Union[str, datetime]

RFC 3339 timestamp indicating when the override will stop applying (exclusive)

formatdate-time
entitledbool
optional
is_commit_specificbool
optional

Indicates whether the override should only apply to commits. Defaults to false. If true, you can specify relevant commits in override_specifiers by passing commit_ids. if you do not specify commit_ids, then the override will apply when consuming any prepaid or postpaid commit.

multiplierfloat
optional

Required for MULTIPLIER type. Must be >=0.

override_specifiersiterable
optional
billing_frequencyliteralcommit_idslistpresentation_group_valuesDict[str, str]pricing_group_valuesDict[str, str]product_idstrproduct_tagslistrecurring_commit_idslistrecurring_credit_idslistIterable[OverrideOverrideSpecifier]

Cannot be used in conjunction with product_id or applicable_product_tags. If provided, the override will apply to all products with the specified specifiers.

Hide ParametersShow Parameters
billing_frequencyliteral
optional
Literal["MONTHLY", "QUARTERLY", "ANNUAL", "WEEKLY"]
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"ANNUAL"
"WEEKLY"
commit_idslist
optional
List[str]

Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to the specified commits. If not provided, the override will apply to all commits.

presentation_group_valuesDict[str, str]
optional
Dict[str, str]

A map of group names to values. The override will only apply to line items with the specified presentation group values.

pricing_group_valuesDict[str, str]
optional
Dict[str, str]

A map of pricing group names to values. The override will only apply to products with the specified pricing group values.

product_idstr
optional

If provided, the override will only apply to the product with the specified ID.

formatuuid
product_tagslist
optional
List[str]

If provided, the override will only apply to products with all the specified tags.

recurring_commit_idslist
optional
List[str]

Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to commits created by the specified recurring commit ids.

recurring_credit_idslist
optional
List[str]

Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to credits created by the specified recurring credit ids.

overwrite_raterate_typeliteralcredit_type_idstrcustom_rateDict[str, object]is_proratedboolpricefloatquantityfloattiersiterableOverrideOverwriteRate
optional

Required for OVERWRITE type.

Hide ParametersShow Parameters
rate_typeliteral
Literal["FLAT", "PERCENTAGE", "SUBSCRIPTION", 2 more]
Hide ParametersShow Parameters
"FLAT"
"PERCENTAGE"
"SUBSCRIPTION"
"TIERED"
"CUSTOM"
credit_type_idstr
optional
formatuuid
custom_rateDict[str, object]
optional
Dict[str, object]

Only set for CUSTOM rate_type. This field is interpreted by custom rate processors.

is_proratedbool
optional

Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true.

pricefloat
optional

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.

quantityfloat
optional

Default quantity. For SUBSCRIPTION rate_type, this must be >=0.

tiersiterable
optional
pricefloatsizefloatIterable[pricefloatsizefloatTier]

Only set for TIERED rate_type.

Hide ParametersShow Parameters
pricefloat
sizefloat
optional
priorityfloat
optional

Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides. Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered and multiplier overrides are prioritized by their priority value (lowest first). Must be > 0.

product_idstr
optional

ID of the product whose rate is being overridden. Cannot be used in conjunction with override_specifiers.

formatuuid
targetliteral
optional
Literal["COMMIT_RATE", "LIST_RATE"]

Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have is_commit_specific set to true. Defaults to "LIST_RATE".

Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
tiersiterable
optional
multiplierfloatsizefloatIterable[OverrideTier]

Required for TIERED type. Must have at least one tier.

Hide ParametersShow Parameters
multiplierfloat
sizefloat
optional
typeliteral
optional
Literal["OVERWRITE", "MULTIPLIER", "TIERED"]

Overwrites are prioritized over multipliers and tiered overrides.

Hide ParametersShow Parameters
"OVERWRITE"
"MULTIPLIER"
"TIERED"
professional_servicesiterable
optional
max_amountfloatproduct_idstrquantityfloatunit_pricefloatcustom_fieldsDict[str, str]descriptionstrnetsuite_sales_order_idstrIterable[ProfessionalService]

This field's availability is dependent on your client's configuration.

Hide ParametersShow Parameters
max_amountfloat

Maximum amount for the term.

product_idstr
formatuuid
quantityfloat

Quantity for the charge. Will be multiplied by unit_price to determine the amount.

unit_pricefloat

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified.

custom_fieldsDict[str, str]
optional
Dict[str, str]
descriptionstr
optional
netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

reseller_royaltiesiterable
optional
reseller_typeliteralapplicable_product_idslistapplicable_product_tagslistaws_optionsResellerRoyaltyAwsOptionsending_beforeunionfractionfloatgcp_optionsResellerRoyaltyGcpOptionsnetsuite_reseller_idstrreseller_contract_valuefloatstarting_atunionIterable[ResellerRoyalty]

This field's availability is dependent on your client's configuration.

Hide ParametersShow Parameters
reseller_typeliteral
Literal["AWS", "AWS_PRO_SERVICE", "GCP", "GCP_PRO_SERVICE"]
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
applicable_product_idslist
optional
List[str]

Must provide at least one of applicable_product_ids or applicable_product_tags.

applicable_product_tagslist
optional
List[str]

Must provide at least one of applicable_product_ids or applicable_product_tags.

aws_optionsaws_account_numberstraws_offer_idstraws_payer_reference_idstrResellerRoyaltyAwsOptions
optional
Hide ParametersShow Parameters
aws_account_numberstr
optional
aws_offer_idstr
optional
aws_payer_reference_idstr
optional
ending_beforeunion
optional
Union[str, datetime, null]

Use null to indicate that the existing end timestamp should be removed.

formatdate-time
fractionfloat
optional
gcp_optionsgcp_account_idstrgcp_offer_idstrResellerRoyaltyGcpOptions
optional
Hide ParametersShow Parameters
gcp_account_idstr
optional
gcp_offer_idstr
optional
netsuite_reseller_idstr
optional
reseller_contract_valuefloat
optional
starting_atunion
optional
Union[str, datetime]
formatdate-time
salesforce_opportunity_idstr
optional

This field's availability is dependent on your client's configuration.

scheduled_chargesiterable
optional
product_idstrscheduleScheduledChargeSchedulenamestrnetsuite_sales_order_idstrIterable[ScheduledCharge]
Hide ParametersShow Parameters
product_idstr
formatuuid
schedulecredit_type_idstrdo_not_invoiceboolrecurring_scheduleScheduledChargeScheduleRecurringScheduleschedule_itemsiterableScheduledChargeSchedule

Must provide either schedule_items or recurring_schedule.

Hide ParametersShow Parameters
credit_type_idstr
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoicebool
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionliteralending_beforeunionfrequencyliteralstarting_atunionamountfloatquantityfloatunit_pricefloatScheduledChargeScheduleRecurringSchedule
optional

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.

Hide ParametersShow Parameters
amount_distributionliteral
Literal["DIVIDED", "DIVIDED_ROUNDED", "EACH"]
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforeunion
Union[str, datetime]

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyliteral
Literal["MONTHLY", "QUARTERLY", "SEMI_ANNUAL", "ANNUAL"]
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
starting_atunion
Union[str, datetime]

RFC 3339 timestamp (inclusive).

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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_itemsiterable
optional
timestampunionamountfloatquantityfloatunit_pricefloatIterable[ScheduledChargeScheduleScheduleItem]

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampunion
Union[str, datetime]

timestamp of the scheduled event

formatdate-time
amountfloat
optional

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.

quantityfloat
optional

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_pricefloat
optional

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.

namestr
optional

displayed on invoices

minLength1
netsuite_sales_order_idstr
optional

This field's availability is dependent on your client's configuration.

total_contract_valuefloat
optional

This field's availability is dependent on your client's configuration.

Returns
ContractAmendResponseclass
Hide ParametersShow Parameters
dataidstrID
from datetime import datetime
from metronome import Metronome

client = Metronome(
    bearer_token="My Bearer Token",
)
response = client.v1.contracts.amend(
    contract_id="d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
    customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d",
    starting_at=datetime.fromisoformat("2020-01-01T00:00:00.000"),
)
print(response.data)
200 Example
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}