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

V1

V1

V1

V1Alerts

Archive an alert
client.v1.alerts.archive(AlertArchiveParamsbody, RequestOptionsoptions?): dataIDAlertArchiveResponse
post/v1/alerts/archive
Create an alert
client.v1.alerts.create(AlertCreateParamsbody, RequestOptionsoptions?): dataIDAlertCreateResponse
post/v1/alerts/create

V1Audit Logs

Get audit logs
client.v1.auditLogs.list(AuditLogListParamsquery?, RequestOptionsoptions?): CursorPage<idstringrequestRequesttimestampstringactionstringactorActordescriptionstringresource_idstringresource_typestringstatusunionAuditLogListResponse>
get/v1/auditLogs

V1Billable Metrics

Archive a billable metric
client.v1.billableMetrics.archive(BillableMetricArchiveParamsbody, RequestOptionsoptions?): dataIDBillableMetricArchiveResponse
post/v1/billable-metrics/archive
Create a billable metric
client.v1.billableMetrics.create(BillableMetricCreateParamsbody, RequestOptionsoptions?): dataIDBillableMetricCreateResponse
post/v1/billable-metrics/create
List all billable metrics
client.v1.billableMetrics.list(BillableMetricListParamsquery?, RequestOptionsoptions?): CursorPage<idstringnamestringaggregation_keystringaggregation_typeunionarchived_atstringcustom_fieldsRecord<string, string>event_type_filterEventTypeFiltergroup_keysarrayproperty_filtersarraysqlstringBillableMetricListResponse>
get/v1/billable-metrics
Get a billable metric
client.v1.billableMetrics.retrieve(BillableMetricRetrieveParamsparams, RequestOptionsoptions?): dataDataBillableMetricRetrieveResponse
get/v1/billable-metrics/{billable_metric_id}

V1Contracts

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

V1ContractsNamed 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

V1ContractsProducts

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"

V1ContractsRate 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

V1ContractsRate 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

V1ContractsRate 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

V1ContractsRate 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

V1Credit Grants

Create a credit grant
client.v1.creditGrants.create(CreditGrantCreateParamsbody, RequestOptionsoptions?): dataIDCreditGrantCreateResponse
post/v1/credits/createGrant
Update a credit grant
client.v1.creditGrants.edit(CreditGrantEditParamsbody, RequestOptionsoptions?): dataIDCreditGrantEditResponse
post/v1/credits/editGrant
List credit grants
client.v1.creditGrants.list(CreditGrantListParamsparams?, RequestOptionsoptions?): CursorPage<idstringbalanceBalancecustom_fieldsRecord<string, string>customer_idstringdeductionsarrayeffective_atstringexpires_atstringgrant_amountGrantAmountnamestringpaid_amountPaidAmountpending_deductionsarrayprioritynumbercredit_grant_typeunioninvoice_idunionproductsarrayreasonunionuniqueness_keyunionCreditGrantListResponse>
post/v1/credits/listGrants
List credit ledger entries
client.v1.creditGrants.listEntries(CreditGrantListEntriesParamsparams?, RequestOptionsoptions?): dataarraynext_pageunionCreditGrantListEntriesResponse
post/v1/credits/listEntries
Void a credit grant
client.v1.creditGrants.void(CreditGrantVoidParamsbody, RequestOptionsoptions?): dataIDCreditGrantVoidResponse
post/v1/credits/voidGrant
Credit Ledger Entry
CreditLedgerEntry
ShowShow
amountnumber

an amount representing the change to the customer's credit balance

created_bystring
credit_grant_idstring

the credit grant this entry is related to

formatuuid
effective_atstring
formatdate-time
reasonstring
running_balancenumber

the running balance for this credit type at the time of the ledger entry, including all preceding charges

invoice_idunion
optional
string | null

if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged

formatuuid
Rollover Amount Max Amount
RolloverAmountMaxAmount
ShowShow
type"MAX_AMOUNT"

Rollover up to a fixed amount of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_AMOUNT"
valuenumber

The maximum amount to rollover.

Rollover Amount Max Percentage
RolloverAmountMaxPercentage
ShowShow
type"MAX_PERCENTAGE"

Rollover up to a percentage of the original credit grant amount.

Hide ParametersShow Parameters
"MAX_PERCENTAGE"
valuenumber

The maximum percentage (0-1) of the original credit grant to rollover.

minimum0
maximum1

V1Custom Fields

Create a custom field key
client.v1.customFields.addKey(CustomFieldAddKeyParamsbody, RequestOptionsoptions?): void
post/v1/customFields/addKey
Delete custom fields
client.v1.customFields.deleteValues(CustomFieldDeleteValuesParamsbody, RequestOptionsoptions?): void
post/v1/customFields/deleteValues
List custom field keys
client.v1.customFields.listKeys(CustomFieldListKeysParamsparams?, RequestOptionsoptions?): dataarraynext_pageunionCustomFieldListKeysResponse
post/v1/customFields/listKeys
Delete a custom field key
client.v1.customFields.removeKey(CustomFieldRemoveKeyParamsbody, RequestOptionsoptions?): void
post/v1/customFields/removeKey
Set custom field values
client.v1.customFields.setValues(CustomFieldSetValuesParamsbody, RequestOptionsoptions?): void
post/v1/customFields/setValues

V1Customers

Archive a customer
client.v1.customers.archive(CustomerArchiveParamsbody, RequestOptionsoptions?): dataIDCustomerArchiveResponse
post/v1/customers/archive
Create a customer
client.v1.customers.create(CustomerCreateParamsbody, RequestOptionsoptions?): dataCustomerCustomerCreateResponse
post/v1/customers
List customers
client.v1.customers.list(CustomerListParamsquery?, RequestOptionsoptions?): CursorPage<idstringcreated_atstringcustom_fieldsRecord<string, string>customer_configCustomerConfigexternal_idstringingest_aliasesarraynamestringarchived_atunioncurrent_billable_statusCurrentBillableStatusCustomerDetail>
get/v1/customers
Get billable metrics for a customer
client.v1.customers.listBillableMetrics(CustomerListBillableMetricsParamsparams, RequestOptionsoptions?): CursorPage<idstringnamestringaggregatestringaggregate_keysarrayaggregation_keystringaggregation_typeunionarchived_atstringcustom_fieldsRecord<string, string>event_type_filterEventTypeFilterfilterRecord<string, unknown>group_byarraygroup_keysarrayproperty_filtersarraysqlstringCustomerListBillableMetricsResponse>
get/v1/customers/{customer_id}/billable-metrics
Get customer costs
client.v1.customers.listCosts(CustomerListCostsParamsparams, RequestOptionsoptions?): CursorPage<credit_typesRecord<string, CreditTypes>end_timestampstringstart_timestampstringCustomerListCostsResponse>
get/v1/customers/{customer_id}/costs
Preview events
client.v1.customers.previewEvents(CustomerPreviewEventsParamsparams, RequestOptionsoptions?): dataInvoiceCustomerPreviewEventsResponse
post/v1/customers/{customer_id}/previewEvents
Get a customer
client.v1.customers.retrieve(CustomerRetrieveParamsparams, RequestOptionsoptions?): dataCustomerDetailCustomerRetrieveResponse
get/v1/customers/{customer_id}
Create or update customer ingest aliases
client.v1.customers.setIngestAliases(CustomerSetIngestAliasesParamsparams, RequestOptionsoptions?): void
post/v1/customers/{customer_id}/setIngestAliases
Update a customer name
client.v1.customers.setName(CustomerSetNameParamsparams, RequestOptionsoptions?): dataCustomerCustomerSetNameResponse
post/v1/customers/{customer_id}/setName
Update a customer configuration
client.v1.customers.updateConfig(CustomerUpdateConfigParamsparams, RequestOptionsoptions?): void
post/v1/customers/{customer_id}/updateConfig
Customer
Customer
ShowShow
idstring

the Metronome ID of the customer

formatuuid
external_idstring

(deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events

ingest_aliasesarray
Array<string>

aliases for this customer that can be used instead of the Metronome customer ID in usage events

namestring
custom_fieldsRecord<string, string>
optional
Customer Detail
CustomerDetail
ShowShow
idstring

the Metronome ID of the customer

formatuuid
created_atstring

RFC 3339 timestamp indicating when the customer was created.

formatdate-time
custom_fieldsRecord<string, string>
customer_configsalesforce_account_idunionCustomerConfig
Hide ParametersShow Parameters
salesforce_account_idunion
string | null

The Salesforce account ID for the customer

external_idstring

(deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events

ingest_aliasesarray
Array<string>

aliases for this customer that can be used instead of the Metronome customer ID in usage events

namestring
archived_atunion
optional
string | null

RFC 3339 timestamp indicating when the customer was archived. Null if the customer is active.

formatdate-time
current_billable_statusvalueunioneffective_atunionCurrentBillableStatus
optional

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

Hide ParametersShow Parameters
valueunion
"billable" | "unbillable"
Hide ParametersShow Parameters
"billable"
"unbillable"
effective_atunion
optional
string | null
formatdate-time

V1CustomersAlerts

List customer alerts
client.v1.customers.alerts.list(AlertListParamsparams, RequestOptionsoptions?): dataarraynext_pageunionAlertListResponse
post/v1/customer-alerts/list
Reset an alert for a customer
client.v1.customers.alerts.reset(AlertResetParamsbody, RequestOptionsoptions?): void
post/v1/customer-alerts/reset
Get an alert
client.v1.customers.alerts.retrieve(AlertRetrieveParamsbody, RequestOptionsoptions?): dataCustomerAlertAlertRetrieveResponse
post/v1/customer-alerts/get
Customer Alert
CustomerAlert
ShowShow
alertidstringnamestringstatusunionthresholdnumbertypeunionupdated_atstringcredit_grant_type_filtersarraycredit_typeunioncustom_field_filtersarraygroup_key_filterGroupKeyFiltergroup_valuesarrayinvoice_types_filterarrayuniqueness_keystringAlert
Hide ParametersShow Parameters
idstring

the Metronome ID of the alert

namestring

Name of the alert

statusunion
"enabled" | "archived" | "disabled"

Status of the alert

Hide ParametersShow Parameters
"enabled"
"archived"
"disabled"
thresholdnumber

Threshold value of the alert policy

typeunion
"low_credit_balance_reached" | "spend_threshold_reached" | "monthly_invoice_total_spend_threshold_reached" | 11 more

Type of the alert

Hide ParametersShow Parameters
"low_credit_balance_reached"
"spend_threshold_reached"
"monthly_invoice_total_spend_threshold_reached"
"low_remaining_days_in_plan_reached"
"low_remaining_credit_percentage_reached"
"usage_threshold_reached"
"low_remaining_days_for_commit_segment_reached"
"low_remaining_commit_balance_reached"
"low_remaining_commit_percentage_reached"
"low_remaining_days_for_contract_credit_segment_reached"
"low_remaining_contract_credit_balance_reached"
"low_remaining_contract_credit_percentage_reached"
"low_remaining_contract_credit_and_commit_balance_reached"
"invoice_total_reached"
updated_atstring

Timestamp for when the alert was last updated

formatdate-time
credit_grant_type_filtersarray
optional
Array<string>

An array of strings, representing a way to filter the credit grant this alert applies to, by looking at the credit_grant_type field on the credit grant. This field is only defined for CreditPercentage and CreditBalance alerts

credit_typeunion
optional
idstringnamestringCreditTypeData | null
custom_field_filtersarray
optional

A list of custom field filters for alert types that support advanced filtering

Hide ParametersShow Parameters
entityunion
"Contract" | "Commit" | "ContractCredit"
Hide ParametersShow Parameters
"Contract"
"Commit"
"ContractCredit"
keystring
valuestring
group_key_filterkeystringvaluestringGroupKeyFilter
optional

Scopes alert evaluation to a specific presentation group key on individual line items. Only present for spend alerts.

Hide ParametersShow Parameters
keystring
valuestring
group_valuesarray
optional
Array<GroupValue>

Only present for spend_threshold_reached alerts. Scope alert to a specific group key on individual line items.

Hide ParametersShow Parameters
keystring
valuestring
invoice_types_filterarray
optional
Array<string>

Only supported for invoice_total_reached alerts. A list of invoice types to evaluate.

uniqueness_keystring
optional

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.

minLength1
maxLength128
customer_statusunion
"ok" | "in_alarm" | "evaluating" | null

The status of the customer alert. If the alert is archived, null will be returned.

Hide ParametersShow Parameters
"ok"
"in_alarm"
"evaluating"
triggered_byunion
optional
string | null

If present, indicates the reason the alert was triggered.

V1CustomersBilling Config

Set a customer billing configuration
client.v1.customers.billingConfig.create(BillingConfigCreateParamsparams, RequestOptionsoptions?): void
post/v1/customers/{customer_id}/billing-config/{billing_provider_type}
Delete a customer billing configuration
client.v1.customers.billingConfig.delete(BillingConfigDeleteParamsparams, RequestOptionsoptions?): void
delete/v1/customers/{customer_id}/billing-config/{billing_provider_type}
Get a customer billing configuration
client.v1.customers.billingConfig.retrieve(BillingConfigRetrieveParamsparams, RequestOptionsoptions?): dataDataBillingConfigRetrieveResponse
get/v1/customers/{customer_id}/billing-config/{billing_provider_type}

V1CustomersCommits

Create a commit
client.v1.customers.commits.create(CommitCreateParamsbody, RequestOptionsoptions?): dataIDCommitCreateResponse
post/v1/contracts/customerCommits/create
List commits
client.v1.customers.commits.list(CommitListParamsbody, RequestOptionsoptions?): dataarraynext_pageunionCommitListResponse
post/v1/contracts/customerCommits/list
Update the commit end date
client.v1.customers.commits.updateEndDate(CommitUpdateEndDateParamsbody, RequestOptionsoptions?): dataIDCommitUpdateEndDateResponse
post/v1/contracts/customerCommits/updateEndDate

V1CustomersCredits

Create a credit
client.v1.customers.credits.create(CreditCreateParamsbody, RequestOptionsoptions?): dataIDCreditCreateResponse
post/v1/contracts/customerCredits/create
List credits
client.v1.customers.credits.list(CreditListParamsbody, RequestOptionsoptions?): dataarraynext_pageunionCreditListResponse
post/v1/contracts/customerCredits/list
Update the credit end date
client.v1.customers.credits.updateEndDate(CreditUpdateEndDateParamsbody, RequestOptionsoptions?): dataIDCreditUpdateEndDateResponse
post/v1/contracts/customerCredits/updateEndDate

V1CustomersInvoices

Add a one time charge
client.v1.customers.invoices.addCharge(InvoiceAddChargeParamsparams, RequestOptionsoptions?): InvoiceAddChargeResponse
post/v1/customers/{customer_id}/addCharge
List invoices
client.v1.customers.invoices.list(InvoiceListParamsparams, RequestOptionsoptions?): CursorPage<idstringcredit_typeCreditTypeDatacustomer_idstringline_itemsarraystatusstringtotalnumbertypestringamendment_idstringbillable_statusunioncontract_custom_fieldsRecord<string, string>contract_idstringcorrection_recordCorrectionRecordcreated_atstringcustom_fieldsRecord<string, unknown>customer_custom_fieldsRecord<string, string>end_timestampstringexternal_invoiceunioninvoice_adjustmentsarrayissued_atstringnet_payment_terms_daysnumbernetsuite_sales_order_idstringplan_custom_fieldsRecord<string, string>plan_idstringplan_namestringreseller_royaltyResellerRoyaltysalesforce_opportunity_idstringstart_timestampstringsubtotalnumberInvoice>
get/v1/customers/{customer_id}/invoices
List invoice breakdowns
client.v1.customers.invoices.listBreakdowns(InvoiceListBreakdownsParamsparams, RequestOptionsoptions?): CursorPage<breakdown_end_timestampstringbreakdown_start_timestampstringInvoiceListBreakdownsResponse>
get/v1/customers/{customer_id}/invoices/breakdowns
Get an invoice
client.v1.customers.invoices.retrieve(InvoiceRetrieveParamsparams, RequestOptionsoptions?): dataInvoiceInvoiceRetrieveResponse
get/v1/customers/{customer_id}/invoices/{invoice_id}
Invoice
Invoice
ShowShow
idstring
formatuuid
credit_typeidstringnamestringCreditTypeData
customer_idstring
formatuuid
line_itemsarray
Array<LineItem>
Hide ParametersShow Parameters
credit_typeidstringnamestringCreditTypeData
namestring
totalnumber
applied_commit_or_creditidstringtypeunionAppliedCommitOrCredit
optional

Details about the credit or commit that was applied to this line item. Only present on line items with product of USAGE, SUBSCRIPTION or COMPOSITE types.

Hide ParametersShow Parameters
idstring
formatuuid
typeunion
"PREPAID" | "POSTPAID" | "CREDIT"
Hide ParametersShow Parameters
"PREPAID"
"POSTPAID"
"CREDIT"
commit_custom_fieldsRecord<string, string>
optional
commit_idstring
optional

For line items with product of USAGE, SUBSCRIPTION, or COMPOSITE types, the ID of the credit or commit that was applied to this line item. For line items with product type of FIXED, the ID of the prepaid or postpaid commit that is being paid for.

formatuuid
commit_netsuite_item_idstring
optional
commit_netsuite_sales_order_idstring
optional
commit_segment_idstring
optional
formatuuid
commit_typestring
optional

PrepaidCommit (for commit types PREPAID and CREDIT) or PostpaidCommit (for commit type POSTPAID).

custom_fieldsRecord<string, string>
optional
discount_custom_fieldsRecord<string, string>
optional
discount_idstring
optional

ID of the discount applied to this line item.

formatuuid
ending_beforestring
optional

The line item's end date (exclusive).

formatdate-time
group_keystring
optional
group_valueunion
optional
string | null
is_proratedboolean
optional

Indicates whether the line item is prorated for SUBSCRIPTION type product.

list_pricerate_typeunioncredit_typeCreditTypeDatacustom_rateRecord<string, unknown>is_proratedbooleanpricenumberpricing_group_valuesRecord<string, string>quantitynumbertiersarrayuse_list_pricesbooleanRate
optional

Only present for contract invoices and when the include_list_prices query parameter is set to true. This will include the list rate for the charge if applicable. Only present for usage and subscription line items.

metadatastring
optional
netsuite_invoice_billing_endstring
optional

The end date for the billing period on the invoice.

formatdate-time
netsuite_invoice_billing_startstring
optional

The start date for the billing period on the invoice.

formatdate-time
netsuite_item_idstring
optional
postpaid_commitidstringPostpaidCommit
optional

Only present for line items paying for a postpaid commit true-up.

Hide ParametersShow Parameters
idstring
formatuuid
presentation_group_valuesRecord<string, string | null>
optional

Includes the presentation group values associated with this line item if presentation group keys are used.

pricing_group_valuesRecord<string, string>
optional

Includes the pricing group values associated with this line item if dimensional pricing is used.

product_custom_fieldsRecord<string, string>
optional
product_idstring
optional

ID of the product associated with the line item.

formatuuid
product_tagsarray
optional
Array<string>

The current product tags associated with the line item's product_id.

product_typestring
optional

The type of the line item's product. Possible values are FixedProductListItem (for FIXED type products), UsageProductListItem (for USAGE type products), SubscriptionProductListItem (for SUBSCRIPTION type products) or CompositeProductListItem (for COMPOSITE type products). For scheduled charges, commit and credit payments, the value is FixedProductListItem.

professional_service_custom_fieldsRecord<string, string>
optional
professional_service_idstring
optional
formatuuid
quantitynumber
optional

The quantity associated with the line item.

reseller_typeunion
optional
"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
scheduled_charge_custom_fieldsRecord<string, string>
optional
scheduled_charge_idstring
optional

ID of scheduled charge.

formatuuid
starting_atstring
optional

The line item's start date (inclusive).

formatdate-time
sub_line_itemsarray
optional
Hide ParametersShow Parameters
custom_fieldsRecord<string, string>
namestring
quantitynumber
subtotalnumber
charge_idstring
optional
formatuuid
credit_grant_idstring
optional
formatuuid
end_datestring
optional

The end date for the charge (for seats charges only).

formatdate-time
pricenumber
optional

the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero

start_datestring
optional

The start date for the charge (for seats charges only).

formatdate-time
tier_periodstarting_atstringending_beforestringTierPeriod
optional

when the current tier started and ends (for tiered charges only)

Hide ParametersShow Parameters
starting_atstring
formatdate-time
ending_beforestring
optional
formatdate-time
tiersarray
optional
Array<Tier>
Hide ParametersShow Parameters
pricenumber
quantitynumber
starting_atnumber

at what metric amount this tier begins

subtotalnumber
subscription_custom_fieldsRecord<string, string>
optional
tierlevelnumberstarting_atstringsizeunionTier
optional

Populated if the line item has a tiered price.

Hide ParametersShow Parameters
levelnumber
starting_atstring
sizeunion
optional
string | null
unit_pricenumber
optional

The unit price associated with the line item.

statusstring
totalnumber
typestring
amendment_idstring
optional
formatuuid
billable_statusunion
optional
"billable" | "unbillable"

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

Hide ParametersShow Parameters
"billable"
"unbillable"
contract_custom_fieldsRecord<string, string>
optional
contract_idstring
optional
formatuuid
correction_recordcorrected_invoice_idstringmemostringreasonstringcorrected_external_invoiceCorrectedExternalInvoiceCorrectionRecord
optional
Hide ParametersShow Parameters
corrected_invoice_idstring
formatuuid
memostring
reasonstring
corrected_external_invoicebilling_provider_typeunionexternal_statusunioninvoice_idstringissued_at_timestampstringCorrectedExternalInvoice
optional
Hide ParametersShow Parameters
billing_provider_typeunion
"aws_marketplace" | "stripe" | "netsuite" | 5 more
Hide ParametersShow Parameters
"aws_marketplace"
"stripe"
"netsuite"
"custom"
"azure_marketplace"
"quickbooks_online"
"workday"
"gcp_marketplace"
external_statusunion
optional
"DRAFT" | "FINALIZED" | "PAID" | 8 more
Hide ParametersShow Parameters
"DRAFT"
"FINALIZED"
"PAID"
"UNCOLLECTIBLE"
"VOID"
"DELETED"
"PAYMENT_FAILED"
"INVALID_REQUEST_ERROR"
"SKIPPED"
"SENT"
"QUEUED"
invoice_idstring
optional
issued_at_timestampstring
optional
formatdate-time
created_atstring
optional

When the invoice was created (UTC). This field is present for correction invoices only.

formatdate-time
custom_fieldsRecord<string, unknown>
optional
customer_custom_fieldsRecord<string, string>
optional
end_timestampstring
optional

End of the usage period this invoice covers (UTC)

formatdate-time
external_invoiceunion
optional
billing_provider_typeunionexternal_statusunioninvoice_idstringissued_at_timestampstringExternalInvoice | null
Hide ParametersShow Parameters
billing_provider_typeunion
"aws_marketplace" | "stripe" | "netsuite" | 5 more
Hide ParametersShow Parameters
"aws_marketplace"
"stripe"
"netsuite"
"custom"
"azure_marketplace"
"quickbooks_online"
"workday"
"gcp_marketplace"
external_statusunion
optional
"DRAFT" | "FINALIZED" | "PAID" | 8 more
Hide ParametersShow Parameters
"DRAFT"
"FINALIZED"
"PAID"
"UNCOLLECTIBLE"
"VOID"
"DELETED"
"PAYMENT_FAILED"
"INVALID_REQUEST_ERROR"
"SKIPPED"
"SENT"
"QUEUED"
invoice_idstring
optional
issued_at_timestampstring
optional
formatdate-time
invoice_adjustmentsarray
optional
Hide ParametersShow Parameters
credit_typeidstringnamestringCreditTypeData
namestring
totalnumber
credit_grant_custom_fieldsRecord<string, string>
optional
credit_grant_idstring
optional
issued_atstring
optional

When the invoice was issued (UTC)

formatdate-time
net_payment_terms_daysnumber
optional
netsuite_sales_order_idstring
optional

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

plan_custom_fieldsRecord<string, string>
optional
plan_idstring
optional
formatuuid
plan_namestring
optional
reseller_royaltyfractionstringnetsuite_reseller_idstringreseller_typeunionaws_optionsAwsOptionsgcp_optionsGcpOptionsResellerRoyalty
optional

Only present for contract invoices with reseller royalties.

Hide ParametersShow Parameters
fractionstring
netsuite_reseller_idstring
reseller_typeunion
"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
aws_optionsaws_account_numberstringaws_offer_idstringaws_payer_reference_idstringAwsOptions
optional
Hide ParametersShow Parameters
aws_account_numberstring
optional
aws_offer_idstring
optional
aws_payer_reference_idstring
optional
gcp_optionsgcp_account_idstringgcp_offer_idstringGcpOptions
optional
Hide ParametersShow Parameters
gcp_account_idstring
optional
gcp_offer_idstring
optional
salesforce_opportunity_idstring
optional

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

start_timestampstring
optional

Beginning of the usage period this invoice covers (UTC)

formatdate-time
subtotalnumber
optional

V1CustomersNamed Schedules

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

V1CustomersPlans

Add a plan to a customer
client.v1.customers.plans.add(PlanAddParamsparams, RequestOptionsoptions?): dataIDPlanAddResponse
post/v1/customers/{customer_id}/plans/add
End a customer plan
client.v1.customers.plans.end(PlanEndParamsparams, RequestOptionsoptions?): PlanEndResponse
post/v1/customers/{customer_id}/plans/{customer_plan_id}/end
List customer plans
client.v1.customers.plans.list(PlanListParamsparams, RequestOptionsoptions?): CursorPage<idstringcustom_fieldsRecord<string, string>plan_descriptionstringplan_idstringplan_namestringstarting_onstringending_beforestringnet_payment_terms_daysnumbertrial_infoTrialInfoPlanListResponse>
get/v1/customers/{customer_id}/plans
Get the plan adjustments for a customer
client.v1.customers.plans.listPriceAdjustments(PlanListPriceAdjustmentsParamsparams, RequestOptionsoptions?): CursorPage<charge_idstringcharge_typeunionpricesarraystart_periodnumberquantitynumberPlanListPriceAdjustmentsResponse>
get/v1/customers/{customer_id}/plans/{customer_plan_id}/priceAdjustments

V1Dashboards

Get an embeddable customer dashboard
client.v1.dashboards.getEmbeddableURL(DashboardGetEmbeddableURLParamsbody, RequestOptionsoptions?): dataDataDashboardGetEmbeddableURLResponse
post/v1/dashboards/getEmbeddableUrl

V1Invoices

Regenerate an invoice
client.v1.invoices.regenerate(InvoiceRegenerateParamsbody, RequestOptionsoptions?): dataDataInvoiceRegenerateResponse
post/v1/invoices/regenerate
Void an invoice
client.v1.invoices.void(InvoiceVoidParamsbody, RequestOptionsoptions?): dataDataInvoiceVoidResponse
post/v1/invoices/void

V1Plans

Get plan details
client.v1.plans.getDetails(PlanGetDetailsParamsparams, RequestOptionsoptions?): dataPlanDetailPlanGetDetailsResponse
get/v1/planDetails/{plan_id}
List plans
client.v1.plans.list(PlanListParamsquery?, RequestOptionsoptions?): CursorPage<idstringdescriptionstringnamestringcustom_fieldsRecord<string, string>PlanListResponse>
get/v1/plans
List plan charges
client.v1.plans.listCharges(PlanListChargesParamsparams, RequestOptionsoptions?): CursorPage<idstringcharge_typeunioncredit_typeCreditTypeDatacustom_fieldsRecord<string, string>namestringpricesarrayproduct_idstringproduct_namestringquantitynumberstart_periodnumbertier_reset_frequencynumberunit_conversionUnitConversionPlanListChargesResponse>
get/v1/planDetails/{plan_id}/charges
List customers on a plan
client.v1.plans.listCustomers(PlanListCustomersParamsparams, RequestOptionsoptions?): CursorPage<customer_detailsCustomerDetailplan_detailsPlanDetailsPlanListCustomersResponse>
get/v1/planDetails/{plan_id}/customers
Plan Detail
PlanDetail
ShowShow
idstring
formatuuid
custom_fieldsRecord<string, string>
namestring
credit_grantsarray
optional
Hide ParametersShow Parameters
amount_grantednumber
amount_granted_credit_typeidstringnamestringCreditTypeData
amount_paidnumber
amount_paid_credit_typeidstringnamestringCreditTypeData
effective_durationnumber
namestring
prioritystring
send_invoiceboolean
reasonstring
optional
recurrence_durationnumber
optional
recurrence_intervalnumber
optional
descriptionstring
optional
minimumsarray
optional
Array<Minimum>
Hide ParametersShow Parameters
credit_typeidstringnamestringCreditTypeData
namestring
start_periodnumber

Used in price ramps. Indicates how many billing periods pass before the charge applies.

valuenumber
overage_ratesarray
optional
Hide ParametersShow Parameters
credit_typeidstringnamestringCreditTypeData
fiat_credit_typeidstringnamestringCreditTypeData
start_periodnumber

Used in price ramps. Indicates how many billing periods pass before the charge applies.

to_fiat_conversion_factornumber

V1Pricing Units

List pricing units
client.v1.pricingUnits.list(PricingUnitListParamsquery?, RequestOptionsoptions?): CursorPage<idstringis_currencybooleannamestringPricingUnitListResponse>
get/v1/credit-types/list

V1Services

Get services
client.v1.services.list(RequestOptionsoptions?): servicesarrayServiceListResponse
get/v1/services

V1Usage

Ingest events
client.v1.usage.ingest(UsageIngestParamsbody?, RequestOptionsoptions?): void
post/v1/ingest
Get batched usage data
client.v1.usage.list(UsageListParamsparams, RequestOptionsoptions?): dataarraynext_pageunionUsageListResponse
post/v1/usage
Get usage data with paginated groupings
client.v1.usage.listWithGroups(UsageListWithGroupsParamsparams, RequestOptionsoptions?): CursorPage<ending_beforestringgroup_keyuniongroup_valueunionstarting_onstringvalueunionUsageListWithGroupsResponse>
post/v1/usage/groups
Search events
client.v1.usage.search(UsageSearchParamsbody, RequestOptionsoptions?): idstringcustomer_idstringevent_typestringtimestampstringtransaction_idstringis_duplicatebooleanmatched_billable_metricsarraymatched_customerMatchedCustomerprocessed_atstringpropertiesRecord<string, unknown>UsageSearchResponse
post/v1/events/search