## Retrieve **post** `/v1/contracts/get` This is the v1 endpoint to get a contract. New clients should implement using the v2 endpoint. ### Returns - **data:** `object` - **id:** `string` - **amendments:** `array of object` - **id:** `string` - **commits:** `array of Commit` - **created\_at:** `string` - **created\_by:** `string` - **overrides:** `array of Override` - **scheduled\_charges:** `array of ScheduledCharge` - **starting\_at:** `string` - **credits:** `array of Credit` - **discounts:** `array of Discount` This field's availability is dependent on your client's configuration. - **netsuite\_sales\_order\_id:** `string` This field's availability is dependent on your client's configuration. - **professional\_services:** `array of ProService` This field's availability is dependent on your client's configuration. - **reseller\_royalties:** `array of object` This field's availability is dependent on your client's configuration. - **reseller\_type:** `"AWS" OR "AWS_PRO_SERVICE" OR "GCP" OR "GCP_PRO_SERVICE"` - `"AWS"` - `"AWS_PRO_SERVICE"` - `"GCP"` - `"GCP_PRO_SERVICE"` - **aws\_account\_number:** `string` - **aws\_offer\_id:** `string` - **aws\_payer\_reference\_id:** `string` - **ending\_before:** `string` - **fraction:** `number` - **gcp\_account\_id:** `string` - **gcp\_offer\_id:** `string` - **netsuite\_reseller\_id:** `string` - **reseller\_contract\_value:** `number` - **starting\_at:** `string` - **salesforce\_opportunity\_id:** `string` This field's availability is dependent on your client's configuration. - **current:** `ContractWithoutAmendments` - **customer\_id:** `string` - **initial:** `ContractWithoutAmendments` - **archived\_at:** `string` RFC 3339 timestamp indicating when the contract was archived. If not returned, the contract is not archived. - **custom\_fields:** `map[string]` - **customer\_billing\_provider\_configuration:** `object` The billing provider configuration associated with a contract. - **billing\_provider:** `"aws_marketplace" OR "stripe" OR "netsuite" OR 5 more` - `"aws_marketplace"` - `"stripe"` - `"netsuite"` - `"custom"` - `"azure_marketplace"` - `"quickbooks_online"` - `"workday"` - `"gcp_marketplace"` - **delivery\_method:** `"direct_to_billing_provider" OR "aws_sqs" OR "tackle" OR "aws_sns"` - `"direct_to_billing_provider"` - `"aws_sqs"` - `"tackle"` - `"aws_sns"` - **id:** `string` - **configuration:** `map[unknown]` Configuration for the billing provider. The structure of this object is specific to the billing provider. - **prepaid\_balance\_threshold\_configuration:** `object` - **commit:** `object` - **product\_id:** `string` The commit product that will be used to generate the line item for commit payment. - **applicable\_product\_ids:** `array of string` 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 of string` 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 of object` 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`. - **presentation\_group\_values:** `map[string]` - **pricing\_group\_values:** `map[string]` - **product\_id:** `string` If provided, the specifier will only apply to the product with the specified ID. - **product\_tags:** `array of string` 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:** `object` - **payment\_gate\_type:** `"NONE" OR "STRIPE" OR "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:** `object` 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:** `object` Only applicable if using STRIPE as your payment gate type. - **payment\_type:** `"INVOICE" OR "PAYMENT_INTENT"` If left blank, will default to INVOICE - `"INVOICE"` - `"PAYMENT_INTENT"` - **invoice\_metadata:** `map[string]` Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. - **tax\_type:** `"NONE" OR "STRIPE" OR "ANROK" OR "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 prepaid 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. - **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:** `object` - **commit:** `object` - **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:** `object` - **payment\_gate\_type:** `"NONE" OR "STRIPE" OR "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:** `object` 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:** `object` Only applicable if using STRIPE as your payment gate type. - **payment\_type:** `"INVOICE" OR "PAYMENT_INTENT"` If left blank, will default to INVOICE - `"INVOICE"` - `"PAYMENT_INTENT"` - **invoice\_metadata:** `map[string]` Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type. - **tax\_type:** `"NONE" OR "STRIPE" OR "ANROK" OR "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 of object` List of subscriptions on the contract. - **collection\_schedule:** `"ADVANCE" OR "ARREARS"` - `"ADVANCE"` - `"ARREARS"` - **proration:** `object` - **invoice\_behavior:** `"BILL_IMMEDIATELY" OR "BILL_ON_NEXT_COLLECTION_DATE"` - `"BILL_IMMEDIATELY"` - `"BILL_ON_NEXT_COLLECTION_DATE"` - **is\_prorated:** `boolean` - **quantity\_schedule:** `array of object` 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:** `object` - **billing\_frequency:** `"MONTHLY" OR "QUARTERLY" OR "ANNUAL" OR "WEEKLY"` - `"MONTHLY"` - `"QUARTERLY"` - `"ANNUAL"` - `"WEEKLY"` - **product:** `object` - **id:** `string` - **name:** `string` - **id:** `string` - **custom\_fields:** `map[string]` - **description:** `string` - **ending\_before:** `string` - **fiat\_credit\_type\_id:** `string` - **name:** `string` - **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.