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

Contracts

Contracts

Contracts

Add a manual balance entry
client.v1.contracts.addManualBalanceEntry(ContractAddManualBalanceEntryParamsbody, RequestOptionsoptions?): void
post/v1/contracts/addManualBalanceLedgerEntry
Amend a contract
client.v1.contracts.amend(ContractAmendParamsbody, RequestOptionsoptions?): dataIDContractAmendResponse
post/v1/contracts/amend
Archive a contract
client.v1.contracts.archive(ContractArchiveParamsbody, RequestOptionsoptions?): dataIDContractArchiveResponse
post/v1/contracts/archive
Create a contract
client.v1.contracts.create(ContractCreateParamsbody, RequestOptionsoptions?): dataIDContractCreateResponse
post/v1/contracts/create
Create historical invoices
client.v1.contracts.createHistoricalInvoices(ContractCreateHistoricalInvoicesParamsbody, RequestOptionsoptions?): dataarrayContractCreateHistoricalInvoicesResponse
post/v1/contracts/createHistoricalInvoices
List customer contracts (v1)
client.v1.contracts.list(ContractListParamsbody, RequestOptionsoptions?): dataarrayContractListResponse
post/v1/contracts/list
List balances
client.v1.contracts.listBalances(ContractListBalancesParamsbody, RequestOptionsoptions?): dataarraynext_pageunionContractListBalancesResponse
post/v1/contracts/customerBalances/list
Get a contract (v1)
client.v1.contracts.retrieve(ContractRetrieveParamsbody, RequestOptionsoptions?): dataDataContractRetrieveResponse
post/v1/contracts/get
Get the rate schedule for a contract
client.v1.contracts.retrieveRateSchedule(ContractRetrieveRateScheduleParamsparams, RequestOptionsoptions?): dataarraynext_pageunionContractRetrieveRateScheduleResponse
post/v1/contracts/getContractRateSchedule
Get subscription quantity history
client.v1.contracts.retrieveSubscriptionQuantityHistory(ContractRetrieveSubscriptionQuantityHistoryParamsbody, RequestOptionsoptions?): dataDataContractRetrieveSubscriptionQuantityHistoryResponse
post/v1/contracts/getSubscriptionQuantityHistory
Schedule ProService invoice
client.v1.contracts.scheduleProServicesInvoice(ContractScheduleProServicesInvoiceParamsbody, RequestOptionsoptions?): dataarrayContractScheduleProServicesInvoiceResponse
post/v1/contracts/scheduleProServicesInvoice
Set a contract usage filter
client.v1.contracts.setUsageFilter(ContractSetUsageFilterParamsbody, RequestOptionsoptions?): void
post/v1/contracts/setUsageFilter
Update the contract end date
client.v1.contracts.updateEndDate(ContractUpdateEndDateParamsbody, RequestOptionsoptions?): dataIDContractUpdateEndDateResponse
post/v1/contracts/updateEndDate

ContractsNamed Schedules

Get a rate card's named schedule
client.v1.contracts.namedSchedules.retrieve(NamedScheduleRetrieveParamsbody, RequestOptionsoptions?): dataarrayNamedScheduleRetrieveResponse
post/v1/contract-pricing/rate-cards/getNamedSchedule
Update a rate card's named schedule
client.v1.contracts.namedSchedules.update(NamedScheduleUpdateParamsbody, RequestOptionsoptions?): void
post/v1/contract-pricing/rate-cards/updateNamedSchedule

ContractsProducts

Archive a product
client.v1.contracts.products.archive(ProductArchiveParamsbody, RequestOptionsoptions?): dataIDProductArchiveResponse
post/v1/contract-pricing/products/archive
Create a product
client.v1.contracts.products.create(ProductCreateParamsbody, RequestOptionsoptions?): dataIDProductCreateResponse
post/v1/contract-pricing/products/create
List products
client.v1.contracts.products.list(ProductListParamsparams?, RequestOptionsoptions?): CursorPage<idstringcurrentProductListItemStateinitialProductListItemStatetypeunionupdatesarrayarchived_atunioncustom_fieldsRecord<string, string>ProductListResponse>
post/v1/contract-pricing/products/list
Get a product
client.v1.contracts.products.retrieve(ProductRetrieveParamsbody, RequestOptionsoptions?): dataDataProductRetrieveResponse
post/v1/contract-pricing/products/get
Update a product
client.v1.contracts.products.update(ProductUpdateParamsbody, RequestOptionsoptions?): dataIDProductUpdateResponse
post/v1/contract-pricing/products/update
Product List Item State
ProductListItemState
ShowShow
created_atstring
formatdate-time
created_bystring
namestring
billable_metric_idstring
optional
composite_product_idsarray
optional
Array<string>
composite_tagsarray
optional
Array<string>
exclude_free_usageboolean
optional
is_refundableboolean
optional

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

netsuite_internal_item_idstring
optional

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

netsuite_overage_item_idstring
optional

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

presentation_group_keyarray
optional
Array<string>

For USAGE products only. Groups usage line items on invoices. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

pricing_group_keyarray
optional
Array<string>

For USAGE products only. If set, pricing for this product will be determined for each pricing_group_key value, as opposed to the product as a whole. The superset of values in the pricing group key and presentation group key must be set as one compound group key on the billable metric.

quantity_conversionunion
optional
conversion_factornumberoperationunionnamestringQuantityConversion | null

Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".

quantity_roundingunion
optional
decimal_placesnumberrounding_methodunionQuantityRounding | null

Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.

starting_atstring
optional
formatdate-time
tagsarray
optional
Array<string>
Quantity Conversion
QuantityConversion

Optional. Only valid for USAGE products. If provided, the quantity will be converted using the provided conversion factor and operation. For example, if the operation is "multiply" and the conversion factor is 100, then the quantity will be multiplied by 100. This can be used in cases where data is sent in one unit and priced in another. For example, data could be sent in MB and priced in GB. In this case, the conversion factor would be 1024 and the operation would be "divide".

ShowShow
conversion_factornumber

The factor to multiply or divide the quantity by.

operationunion
"MULTIPLY" | "DIVIDE"

The operation to perform on the quantity

Hide ParametersShow Parameters
"MULTIPLY"
"DIVIDE"
namestring
optional

Optional name for this conversion.

Quantity Rounding
QuantityRounding

Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is "round up" and the decimal places is 0, then the quantity will be rounded up to the nearest integer.

ShowShow
decimal_placesnumber
minimum0
rounding_methodunion
"ROUND_UP" | "ROUND_DOWN" | "ROUND_HALF_UP"
Hide ParametersShow Parameters
"ROUND_UP"
"ROUND_DOWN"
"ROUND_HALF_UP"

ContractsRate Cards

Archive a rate card
client.v1.contracts.rateCards.archive(RateCardArchiveParamsbody, RequestOptionsoptions?): dataIDRateCardArchiveResponse
post/v1/contract-pricing/rate-cards/archive
Create a rate card
client.v1.contracts.rateCards.create(RateCardCreateParamsbody, RequestOptionsoptions?): dataIDRateCardCreateResponse
post/v1/contract-pricing/rate-cards/create
List rate cards
client.v1.contracts.rateCards.list(RateCardListParamsparams?, RequestOptionsoptions?): CursorPage<idstringcreated_atstringcreated_bystringnamestringaliasesarraycredit_type_conversionsarraycustom_fieldsRecord<string, string>descriptionstringfiat_credit_typeCreditTypeDataRateCardListResponse>
post/v1/contract-pricing/rate-cards/list
Get a rate card
client.v1.contracts.rateCards.retrieve(RateCardRetrieveParamsbody, RequestOptionsoptions?): dataDataRateCardRetrieveResponse
post/v1/contract-pricing/rate-cards/get
Get a rate schedule
client.v1.contracts.rateCards.retrieveRateSchedule(RateCardRetrieveRateScheduleParamsparams, RequestOptionsoptions?): dataarraynext_pageunionRateCardRetrieveRateScheduleResponse
post/v1/contract-pricing/rate-cards/getRateSchedule
Update a rate card
client.v1.contracts.rateCards.update(RateCardUpdateParamsbody, RequestOptionsoptions?): dataIDRateCardUpdateResponse
post/v1/contract-pricing/rate-cards/update

ContractsRate CardsNamed Schedules

Get a contract's named schedule
client.v1.contracts.rateCards.namedSchedules.retrieve(NamedScheduleRetrieveParamsbody, RequestOptionsoptions?): dataarrayNamedScheduleRetrieveResponse
post/v1/contracts/getNamedSchedule
Update a contract's named schedule
client.v1.contracts.rateCards.namedSchedules.update(NamedScheduleUpdateParamsbody, RequestOptionsoptions?): void
post/v1/contracts/updateNamedSchedule

ContractsRate CardsProduct Orders

Set the rate card products order
client.v1.contracts.rateCards.productOrders.set(ProductOrderSetParamsbody, RequestOptionsoptions?): dataIDProductOrderSetResponse
post/v1/contract-pricing/rate-cards/setRateCardProductsOrder
Update the rate card products order
client.v1.contracts.rateCards.productOrders.update(ProductOrderUpdateParamsbody, RequestOptionsoptions?): dataIDProductOrderUpdateResponse
post/v1/contract-pricing/rate-cards/moveRateCardProducts

ContractsRate CardsRates

Add a rate
client.v1.contracts.rateCards.rates.add(RateAddParamsbody, RequestOptionsoptions?): dataDataRateAddResponse
post/v1/contract-pricing/rate-cards/addRate
Add rates
client.v1.contracts.rateCards.rates.addMany(RateAddManyParamsbody, RequestOptionsoptions?): dataIDRateAddManyResponse
post/v1/contract-pricing/rate-cards/addRates
Get rates
client.v1.contracts.rateCards.rates.list(RateListParamsparams, RequestOptionsoptions?): CursorPage<entitledbooleanproduct_custom_fieldsRecord<string, string>product_idstringproduct_namestringproduct_tagsarrayrateRatestarting_atstringbilling_frequencyunioncommit_rateCommitRateending_beforestringpricing_group_valuesRecord<string, string>RateListResponse>
post/v1/contract-pricing/rate-cards/getRates