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

Contracts

Contracts

Contracts

Add a manual balance entry
client.V1.Contracts.AddManualBalanceEntry(ctx, body) error
post/v1/contracts/addManualBalanceLedgerEntry
Amend a contract
client.V1.Contracts.Amend(ctx, body) (*DataIDV1ContractAmendResponse, error)
post/v1/contracts/amend
Archive a contract
client.V1.Contracts.Archive(ctx, body) (*DataIDV1ContractArchiveResponse, error)
post/v1/contracts/archive
Create a contract
client.V1.Contracts.New(ctx, body) (*DataIDV1ContractNewResponse, error)
post/v1/contracts/create
Create historical invoices
client.V1.Contracts.NewHistoricalInvoices(ctx, body) (*DataarrayV1ContractNewHistoricalInvoicesResponse, error)
post/v1/contracts/createHistoricalInvoices
List customer contracts (v1)
client.V1.Contracts.List(ctx, body) (*DataarrayV1ContractListResponse, error)
post/v1/contracts/list
List balances
client.V1.Contracts.ListBalances(ctx, body) (*DataarrayNextPagestringV1ContractListBalancesResponse, error)
post/v1/contracts/customerBalances/list
Get a contract (v1)
client.V1.Contracts.Get(ctx, body) (*DataV1ContractGetResponseDataV1ContractGetResponse, error)
post/v1/contracts/get
Get the rate schedule for a contract
client.V1.Contracts.GetRateSchedule(ctx, params) (*DataarrayNextPagestringV1ContractGetRateScheduleResponse, error)
post/v1/contracts/getContractRateSchedule
Get subscription quantity history
client.V1.Contracts.GetSubscriptionQuantityHistory(ctx, body) (*DataV1ContractGetSubscriptionQuantityHistoryResponseDataV1ContractGetSubscriptionQuantityHistoryResponse, error)
post/v1/contracts/getSubscriptionQuantityHistory
Schedule ProService invoice
client.V1.Contracts.ScheduleProServicesInvoice(ctx, body) (*DataarrayV1ContractScheduleProServicesInvoiceResponse, error)
post/v1/contracts/scheduleProServicesInvoice
Set a contract usage filter
client.V1.Contracts.SetUsageFilter(ctx, body) error
post/v1/contracts/setUsageFilter
Update the contract end date
client.V1.Contracts.UpdateEndDate(ctx, body) (*DataIDV1ContractUpdateEndDateResponse, error)
post/v1/contracts/updateEndDate

ContractsNamed Schedules

Get a rate card's named schedule
client.V1.Contracts.NamedSchedules.Get(ctx, body) (*DataarrayV1ContractNamedScheduleGetResponse, error)
post/v1/contract-pricing/rate-cards/getNamedSchedule
Update a rate card's named schedule
client.V1.Contracts.NamedSchedules.Update(ctx, body) error
post/v1/contract-pricing/rate-cards/updateNamedSchedule

ContractsProducts

Archive a product
client.V1.Contracts.Products.Archive(ctx, body) (*DataIDV1ContractProductArchiveResponse, error)
post/v1/contract-pricing/products/archive
Create a product
client.V1.Contracts.Products.New(ctx, body) (*DataIDV1ContractProductNewResponse, error)
post/v1/contract-pricing/products/create
List products
client.V1.Contracts.Products.List(ctx, params) (*CursorPage[IDstringCurrentProductListItemStateInitialProductListItemStateTypeV1ContractProductListResponseTypeUpdatesarrayArchivedAtTimeCustomFieldsmapV1ContractProductListResponse], error)
post/v1/contract-pricing/products/list
Get a product
client.V1.Contracts.Products.Get(ctx, body) (*DataV1ContractProductGetResponseDataV1ContractProductGetResponse, error)
post/v1/contract-pricing/products/get
Update a product
client.V1.Contracts.Products.Update(ctx, body) (*DataIDV1ContractProductUpdateResponse, error)
post/v1/contract-pricing/products/update
Product List Item State
ProductListItemStatestruct
ShowShow
CreatedAtTime
formatdate-time
CreatedBystring
Namestring
BillableMetricIDstring
optional
CompositeProductIDsarray
optional
[]string
CompositeTagsarray
optional
[]string
ExcludeFreeUsagebool
optional
IsRefundablebool
optional

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

NetsuiteInternalItemIDstring
optional

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

NetsuiteOverageItemIDstring
optional

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

PresentationGroupKeyarray
optional
[]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.

PricingGroupKeyarray
optional
[]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.

QuantityConversionConversionFactorfloat64OperationQuantityConversionOperationNamestringQuantityConversion
optional

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".

QuantityRoundingDecimalPlacesfloat64RoundingMethodQuantityRoundingRoundingMethodQuantityRounding
optional

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.

StartingAtTime
optional
formatdate-time
Tagsarray
optional
[]string
Quantity Conversion
QuantityConversionstruct

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
ConversionFactorfloat64

The factor to multiply or divide the quantity by.

OperationQuantityConversionOperationMultiplyQuantityConversionOperationQuantityConversionOperationDivideQuantityConversionOperationQuantityConversionOperation

The operation to perform on the quantity

Hide ParametersShow Parameters
QuantityConversionOperationMultiplyconst
QuantityConversionOperationMultiplyQuantityConversionOperationQuantityConversionOperationDivideQuantityConversionOperationQuantityConversionOperation
"MULTIPLY"
QuantityConversionOperationDivideconst
QuantityConversionOperationMultiplyQuantityConversionOperationQuantityConversionOperationDivideQuantityConversionOperationQuantityConversionOperation
"DIVIDE"
Namestring
optional

Optional name for this conversion.

Quantity Rounding
QuantityRoundingstruct

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
DecimalPlacesfloat64
minimum0
RoundingMethodQuantityRoundingRoundingMethodRoundUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundDownQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundHalfUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethod
Hide ParametersShow Parameters
QuantityRoundingRoundingMethodRoundUpconst
QuantityRoundingRoundingMethodRoundUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundDownQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundHalfUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethod
"ROUND_UP"
QuantityRoundingRoundingMethodRoundDownconst
QuantityRoundingRoundingMethodRoundUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundDownQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundHalfUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethod
"ROUND_DOWN"
QuantityRoundingRoundingMethodRoundHalfUpconst
QuantityRoundingRoundingMethodRoundUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundDownQuantityRoundingRoundingMethodQuantityRoundingRoundingMethodRoundHalfUpQuantityRoundingRoundingMethodQuantityRoundingRoundingMethod
"ROUND_HALF_UP"

ContractsRate Cards

Archive a rate card
client.V1.Contracts.RateCards.Archive(ctx, body) (*DataIDV1ContractRateCardArchiveResponse, error)
post/v1/contract-pricing/rate-cards/archive
Create a rate card
client.V1.Contracts.RateCards.New(ctx, body) (*DataIDV1ContractRateCardNewResponse, error)
post/v1/contract-pricing/rate-cards/create
List rate cards
client.V1.Contracts.RateCards.List(ctx, params) (*CursorPage[IDstringCreatedAtTimeCreatedBystringNamestringAliasesarrayCreditTypeConversionsarrayCustomFieldsmapDescriptionstringFiatCreditTypeCreditTypeDataV1ContractRateCardListResponse], error)
post/v1/contract-pricing/rate-cards/list
Get a rate card
client.V1.Contracts.RateCards.Get(ctx, body) (*DataV1ContractRateCardGetResponseDataV1ContractRateCardGetResponse, error)
post/v1/contract-pricing/rate-cards/get
Get a rate schedule
client.V1.Contracts.RateCards.GetRateSchedule(ctx, params) (*DataarrayNextPagestringV1ContractRateCardGetRateScheduleResponse, error)
post/v1/contract-pricing/rate-cards/getRateSchedule
Update a rate card
client.V1.Contracts.RateCards.Update(ctx, body) (*DataIDV1ContractRateCardUpdateResponse, error)
post/v1/contract-pricing/rate-cards/update

ContractsRate CardsNamed Schedules

Get a contract's named schedule
client.V1.Contracts.RateCards.NamedSchedules.Get(ctx, body) (*DataarrayV1ContractRateCardNamedScheduleGetResponse, error)
post/v1/contracts/getNamedSchedule
Update a contract's named schedule
client.V1.Contracts.RateCards.NamedSchedules.Update(ctx, body) error
post/v1/contracts/updateNamedSchedule

ContractsRate CardsProduct Orders

Set the rate card products order
client.V1.Contracts.RateCards.ProductOrders.Set(ctx, body) (*DataIDV1ContractRateCardProductOrderSetResponse, error)
post/v1/contract-pricing/rate-cards/setRateCardProductsOrder
Update the rate card products order
client.V1.Contracts.RateCards.ProductOrders.Update(ctx, body) (*DataIDV1ContractRateCardProductOrderUpdateResponse, error)
post/v1/contract-pricing/rate-cards/moveRateCardProducts

ContractsRate CardsRates

Add a rate
client.V1.Contracts.RateCards.Rates.Add(ctx, body) (*DataV1ContractRateCardRateAddResponseDataV1ContractRateCardRateAddResponse, error)
post/v1/contract-pricing/rate-cards/addRate
Add rates
client.V1.Contracts.RateCards.Rates.AddMany(ctx, body) (*DataIDV1ContractRateCardRateAddManyResponse, error)
post/v1/contract-pricing/rate-cards/addRates
Get rates
client.V1.Contracts.RateCards.Rates.List(ctx, params) (*CursorPage[EntitledboolProductCustomFieldsmapProductIDstringProductNamestringProductTagsarrayRateRateStartingAtTimeBillingFrequencyV1ContractRateCardRateListResponseBillingFrequencyCommitRateV1ContractRateCardRateListResponseCommitRateEndingBeforeTimePricingGroupValuesmapV1ContractRateCardRateListResponse], error)
post/v1/contract-pricing/rate-cards/getRates