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

V1

V1

V1

V1Alerts

Archive an alert
v1.alerts.archive(AlertArchiveParams**kwargs) -> dataIDAlertArchiveResponse
post/v1/alerts/archive
Create an alert
v1.alerts.create(AlertCreateParams**kwargs) -> dataIDAlertCreateResponse
post/v1/alerts/create

V1Audit Logs

Get audit logs
v1.audit_logs.list(AuditLogListParams**kwargs) -> SyncCursorPage[idstrrequestRequesttimestampdatetimeactionstractorActordescriptionstrresource_idstrresource_typestrstatusliteralAuditLogListResponse]
get/v1/auditLogs

V1Billable Metrics

Archive a billable metric
v1.billable_metrics.archive(BillableMetricArchiveParams**kwargs) -> dataIDBillableMetricArchiveResponse
post/v1/billable-metrics/archive
Create a billable metric
v1.billable_metrics.create(BillableMetricCreateParams**kwargs) -> dataIDBillableMetricCreateResponse
post/v1/billable-metrics/create
List all billable metrics
v1.billable_metrics.list(BillableMetricListParams**kwargs) -> SyncCursorPage[idstrnamestraggregation_keystraggregation_typeliteralarchived_atdatetimecustom_fieldsDict[str, str]event_type_filterEventTypeFiltergroup_keyslistproperty_filterslistsqlstrBillableMetricListResponse]
get/v1/billable-metrics
Get a billable metric
v1.billable_metrics.retrieve(BillableMetricRetrieveParams**kwargs) -> dataDataBillableMetricRetrieveResponse
get/v1/billable-metrics/{billable_metric_id}

V1Contracts

Add a manual balance entry
v1.contracts.add_manual_balance_entry(ContractAddManualBalanceEntryParams**kwargs)
post/v1/contracts/addManualBalanceLedgerEntry
Amend a contract
v1.contracts.amend(ContractAmendParams**kwargs) -> dataIDContractAmendResponse
post/v1/contracts/amend
Archive a contract
v1.contracts.archive(ContractArchiveParams**kwargs) -> dataIDContractArchiveResponse
post/v1/contracts/archive
Create a contract
v1.contracts.create(ContractCreateParams**kwargs) -> dataIDContractCreateResponse
post/v1/contracts/create
Create historical invoices
v1.contracts.create_historical_invoices(ContractCreateHistoricalInvoicesParams**kwargs) -> datalistContractCreateHistoricalInvoicesResponse
post/v1/contracts/createHistoricalInvoices
List customer contracts (v1)
v1.contracts.list(ContractListParams**kwargs) -> datalistContractListResponse
post/v1/contracts/list
List balances
v1.contracts.list_balances(ContractListBalancesParams**kwargs) -> datalistnext_pagestrContractListBalancesResponse
post/v1/contracts/customerBalances/list
Get a contract (v1)
v1.contracts.retrieve(ContractRetrieveParams**kwargs) -> dataDataContractRetrieveResponse
post/v1/contracts/get
Get the rate schedule for a contract
v1.contracts.retrieve_rate_schedule(ContractRetrieveRateScheduleParams**kwargs) -> datalistnext_pagestrContractRetrieveRateScheduleResponse
post/v1/contracts/getContractRateSchedule
Get subscription quantity history
post/v1/contracts/getSubscriptionQuantityHistory
Schedule ProService invoice
v1.contracts.schedule_pro_services_invoice(ContractScheduleProServicesInvoiceParams**kwargs) -> datalistContractScheduleProServicesInvoiceResponse
post/v1/contracts/scheduleProServicesInvoice
Set a contract usage filter
v1.contracts.set_usage_filter(ContractSetUsageFilterParams**kwargs)
post/v1/contracts/setUsageFilter
Update the contract end date
v1.contracts.update_end_date(ContractUpdateEndDateParams**kwargs) -> dataIDContractUpdateEndDateResponse
post/v1/contracts/updateEndDate

V1ContractsNamed Schedules

Get a rate card's named schedule
v1.contracts.named_schedules.retrieve(NamedScheduleRetrieveParams**kwargs) -> datalistNamedScheduleRetrieveResponse
post/v1/contract-pricing/rate-cards/getNamedSchedule
Update a rate card's named schedule
v1.contracts.named_schedules.update(NamedScheduleUpdateParams**kwargs)
post/v1/contract-pricing/rate-cards/updateNamedSchedule

V1ContractsProducts

Archive a product
v1.contracts.products.archive(ProductArchiveParams**kwargs) -> dataIDProductArchiveResponse
post/v1/contract-pricing/products/archive
Create a product
v1.contracts.products.create(ProductCreateParams**kwargs) -> dataIDProductCreateResponse
post/v1/contract-pricing/products/create
List products
v1.contracts.products.list(ProductListParams**kwargs) -> SyncCursorPage[idstrcurrentProductListItemStateinitialProductListItemStatetypeliteralupdateslistarchived_atdatetimecustom_fieldsDict[str, str]ProductListResponse]
post/v1/contract-pricing/products/list
Get a product
v1.contracts.products.retrieve(ProductRetrieveParams**kwargs) -> dataDataProductRetrieveResponse
post/v1/contract-pricing/products/get
Update a product
v1.contracts.products.update(ProductUpdateParams**kwargs) -> dataIDProductUpdateResponse
post/v1/contract-pricing/products/update
Product List Item State
ProductListItemStateclass
ShowShow
created_atdatetime
formatdate-time
created_bystr
namestr
billable_metric_idstr
optional
composite_product_idslist
optional
Optional[List[str]]
composite_tagslist
optional
Optional[List[str]]
exclude_free_usagebool
optional
is_refundablebool
optional

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

netsuite_internal_item_idstr
optional

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

netsuite_overage_item_idstr
optional

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

presentation_group_keylist
optional
Optional[List[str]]

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

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

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

starting_atdatetime
optional
formatdate-time
tagslist
optional
Optional[List[str]]
Quantity Conversion
QuantityConversionclass

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_factorfloat

The factor to multiply or divide the quantity by.

operationliteral
Literal["MULTIPLY", "DIVIDE"]

The operation to perform on the quantity

Hide ParametersShow Parameters
"MULTIPLY"
"DIVIDE"
namestr
optional

Optional name for this conversion.

Quantity Rounding
QuantityRoundingclass

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_placesfloat
minimum0
rounding_methodliteral
Literal["ROUND_UP", "ROUND_DOWN", "ROUND_HALF_UP"]
Hide ParametersShow Parameters
"ROUND_UP"
"ROUND_DOWN"
"ROUND_HALF_UP"

V1ContractsRate Cards

Archive a rate card
v1.contracts.rate_cards.archive(RateCardArchiveParams**kwargs) -> dataIDRateCardArchiveResponse
post/v1/contract-pricing/rate-cards/archive
Create a rate card
v1.contracts.rate_cards.create(RateCardCreateParams**kwargs) -> dataIDRateCardCreateResponse
post/v1/contract-pricing/rate-cards/create
List rate cards
v1.contracts.rate_cards.list(RateCardListParams**kwargs) -> SyncCursorPage[idstrcreated_atdatetimecreated_bystrnamestraliaseslistcredit_type_conversionslistcustom_fieldsDict[str, str]descriptionstrfiat_credit_typeCreditTypeDataRateCardListResponse]
post/v1/contract-pricing/rate-cards/list
Get a rate card
v1.contracts.rate_cards.retrieve(RateCardRetrieveParams**kwargs) -> dataDataRateCardRetrieveResponse
post/v1/contract-pricing/rate-cards/get
Get a rate schedule
v1.contracts.rate_cards.retrieve_rate_schedule(RateCardRetrieveRateScheduleParams**kwargs) -> datalistnext_pagestrRateCardRetrieveRateScheduleResponse
post/v1/contract-pricing/rate-cards/getRateSchedule
Update a rate card
v1.contracts.rate_cards.update(RateCardUpdateParams**kwargs) -> dataIDRateCardUpdateResponse
post/v1/contract-pricing/rate-cards/update

V1ContractsRate CardsNamed Schedules

Get a contract's named schedule
v1.contracts.rate_cards.named_schedules.retrieve(NamedScheduleRetrieveParams**kwargs) -> datalistNamedScheduleRetrieveResponse
post/v1/contracts/getNamedSchedule
Update a contract's named schedule
v1.contracts.rate_cards.named_schedules.update(NamedScheduleUpdateParams**kwargs)
post/v1/contracts/updateNamedSchedule

V1ContractsRate CardsProduct Orders

Set the rate card products order
v1.contracts.rate_cards.product_orders.set(ProductOrderSetParams**kwargs) -> dataIDProductOrderSetResponse
post/v1/contract-pricing/rate-cards/setRateCardProductsOrder
Update the rate card products order
v1.contracts.rate_cards.product_orders.update(ProductOrderUpdateParams**kwargs) -> dataIDProductOrderUpdateResponse
post/v1/contract-pricing/rate-cards/moveRateCardProducts

V1ContractsRate CardsRates

Add a rate
v1.contracts.rate_cards.rates.add(RateAddParams**kwargs) -> dataDataRateAddResponse
post/v1/contract-pricing/rate-cards/addRate
Add rates
v1.contracts.rate_cards.rates.add_many(RateAddManyParams**kwargs) -> dataIDRateAddManyResponse
post/v1/contract-pricing/rate-cards/addRates
Get rates
v1.contracts.rate_cards.rates.list(RateListParams**kwargs) -> SyncCursorPage[entitledboolproduct_custom_fieldsDict[str, str]product_idstrproduct_namestrproduct_tagslistrateRatestarting_atdatetimebilling_frequencyliteralcommit_rateCommitRateending_beforedatetimepricing_group_valuesDict[str, str]RateListResponse]
post/v1/contract-pricing/rate-cards/getRates

V1Credit Grants

Create a credit grant
v1.credit_grants.create(CreditGrantCreateParams**kwargs) -> dataIDCreditGrantCreateResponse
post/v1/credits/createGrant
Update a credit grant
v1.credit_grants.edit(CreditGrantEditParams**kwargs) -> dataIDCreditGrantEditResponse
post/v1/credits/editGrant
List credit grants
v1.credit_grants.list(CreditGrantListParams**kwargs) -> SyncCursorPage[idstrbalanceBalancecustom_fieldsDict[str, str]customer_idstrdeductionslisteffective_atdatetimeexpires_atdatetimegrant_amountGrantAmountnamestrpaid_amountPaidAmountpending_deductionslistpriorityfloatcredit_grant_typestrinvoice_idstrproductslistreasonstruniqueness_keystrCreditGrantListResponse]
post/v1/credits/listGrants
List credit ledger entries
v1.credit_grants.list_entries(CreditGrantListEntriesParams**kwargs) -> datalistnext_pagestrCreditGrantListEntriesResponse
post/v1/credits/listEntries
Void a credit grant
v1.credit_grants.void(CreditGrantVoidParams**kwargs) -> dataIDCreditGrantVoidResponse
post/v1/credits/voidGrant
Credit Ledger Entry
CreditLedgerEntryclass
ShowShow
amountfloat

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

created_bystr
credit_grant_idstr

the credit grant this entry is related to

formatuuid
effective_atdatetime
formatdate-time
reasonstr
running_balancefloat

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

invoice_idstr
optional

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
RolloverAmountMaxAmountclass
ShowShow
typeliteral
Literal["MAX_AMOUNT"]

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

Hide ParametersShow Parameters
"MAX_AMOUNT"
valuefloat

The maximum amount to rollover.

Rollover Amount Max Percentage
RolloverAmountMaxPercentageclass
ShowShow
typeliteral
Literal["MAX_PERCENTAGE"]

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

Hide ParametersShow Parameters
"MAX_PERCENTAGE"
valuefloat

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

minimum0
maximum1

V1Custom Fields

Create a custom field key
v1.custom_fields.add_key(CustomFieldAddKeyParams**kwargs)
post/v1/customFields/addKey
Delete custom fields
v1.custom_fields.delete_values(CustomFieldDeleteValuesParams**kwargs)
post/v1/customFields/deleteValues
List custom field keys
v1.custom_fields.list_keys(CustomFieldListKeysParams**kwargs) -> datalistnext_pagestrCustomFieldListKeysResponse
post/v1/customFields/listKeys
Delete a custom field key
v1.custom_fields.remove_key(CustomFieldRemoveKeyParams**kwargs)
post/v1/customFields/removeKey
Set custom field values
v1.custom_fields.set_values(CustomFieldSetValuesParams**kwargs)
post/v1/customFields/setValues

V1Customers

Archive a customer
v1.customers.archive(CustomerArchiveParams**kwargs) -> dataIDCustomerArchiveResponse
post/v1/customers/archive
Create a customer
v1.customers.create(CustomerCreateParams**kwargs) -> dataCustomerCustomerCreateResponse
post/v1/customers
List customers
v1.customers.list(CustomerListParams**kwargs) -> SyncCursorPage[idstrcreated_atdatetimecustom_fieldsDict[str, str]customer_configCustomerConfigexternal_idstringest_aliaseslistnamestrarchived_atdatetimecurrent_billable_statusCurrentBillableStatusCustomerDetail]
get/v1/customers
Get billable metrics for a customer
v1.customers.list_billable_metrics(CustomerListBillableMetricsParams**kwargs) -> SyncCursorPage[idstrnamestraggregatestraggregate_keyslistaggregation_keystraggregation_typeliteralarchived_atdatetimecustom_fieldsDict[str, str]event_type_filterEventTypeFilterfilterDict[str, object]group_bylistgroup_keyslistproperty_filterslistsqlstrCustomerListBillableMetricsResponse]
get/v1/customers/{customer_id}/billable-metrics
Get customer costs
v1.customers.list_costs(CustomerListCostsParams**kwargs) -> SyncCursorPage[credit_typesDict[str, CreditTypes]end_timestampdatetimestart_timestampdatetimeCustomerListCostsResponse]
get/v1/customers/{customer_id}/costs
Preview events
v1.customers.preview_events(CustomerPreviewEventsParams**kwargs) -> dataInvoiceCustomerPreviewEventsResponse
post/v1/customers/{customer_id}/previewEvents
Get a customer
get/v1/customers/{customer_id}
Create or update customer ingest aliases
v1.customers.set_ingest_aliases(CustomerSetIngestAliasesParams**kwargs)
post/v1/customers/{customer_id}/setIngestAliases
Update a customer name
v1.customers.set_name(CustomerSetNameParams**kwargs) -> dataCustomerCustomerSetNameResponse
post/v1/customers/{customer_id}/setName
Update a customer configuration
v1.customers.update_config(CustomerUpdateConfigParams**kwargs)
post/v1/customers/{customer_id}/updateConfig
Customer
Customerclass
ShowShow
idstr

the Metronome ID of the customer

formatuuid
external_idstr

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

ingest_aliaseslist
List[str]

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

namestr
custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
Customer Detail
CustomerDetailclass
ShowShow
idstr

the Metronome ID of the customer

formatuuid
created_atdatetime

RFC 3339 timestamp indicating when the customer was created.

formatdate-time
custom_fieldsDict[str, str]
Dict[str, str]
customer_configsalesforce_account_idstrCustomerConfig
Hide ParametersShow Parameters
salesforce_account_idstr

The Salesforce account ID for the customer

external_idstr

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

ingest_aliaseslist
List[str]

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

namestr
archived_atdatetime
optional

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

formatdate-time
current_billable_statusvalueliteraleffective_atdatetimeCurrentBillableStatus
optional

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

Hide ParametersShow Parameters
valueliteral
Literal["billable", "unbillable"]
Hide ParametersShow Parameters
"billable"
"unbillable"
effective_atdatetime
optional
formatdate-time

V1CustomersAlerts

List customer alerts
v1.customers.alerts.list(AlertListParams**kwargs) -> datalistnext_pagestrAlertListResponse
post/v1/customer-alerts/list
Reset an alert for a customer
v1.customers.alerts.reset(AlertResetParams**kwargs)
post/v1/customer-alerts/reset
Get an alert
v1.customers.alerts.retrieve(AlertRetrieveParams**kwargs) -> dataCustomerAlertAlertRetrieveResponse
post/v1/customer-alerts/get
Customer Alert
CustomerAlertclass
ShowShow
alertidstrnamestrstatusliteralthresholdfloattypeliteralupdated_atdatetimecredit_grant_type_filterslistcredit_typeCreditTypeDatacustom_field_filterslistgroup_key_filterAlertGroupKeyFiltergroup_valueslistinvoice_types_filterlistuniqueness_keystrAlert
Hide ParametersShow Parameters
idstr

the Metronome ID of the alert

namestr

Name of the alert

statusliteral
Literal["enabled", "archived", "disabled"]

Status of the alert

Hide ParametersShow Parameters
"enabled"
"archived"
"disabled"
thresholdfloat

Threshold value of the alert policy

typeliteral
Literal["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_atdatetime

Timestamp for when the alert was last updated

formatdate-time
credit_grant_type_filterslist
optional
Optional[List[str]]

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_typeCreditTypeData
optional
custom_field_filterslist
optional
Optional[List[AlertCustomFieldFilter]]

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

Hide ParametersShow Parameters
entityliteral
Literal["Contract", "Commit", "ContractCredit"]
Hide ParametersShow Parameters
"Contract"
"Commit"
"ContractCredit"
keystr
valuestr
group_key_filterkeystrvaluestrAlertGroupKeyFilter
optional

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

Hide ParametersShow Parameters
keystr
valuestr
group_valueslist
optional
Optional[List[AlertGroupValue]]

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

Hide ParametersShow Parameters
keystr
valuestr
invoice_types_filterlist
optional
Optional[List[str]]

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

uniqueness_keystr
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_statusliteral
Optional[Literal["ok", "in_alarm", "evaluating"]]

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

Hide ParametersShow Parameters
"ok"
"in_alarm"
"evaluating"
triggered_bystr
optional

If present, indicates the reason the alert was triggered.

V1CustomersBilling Config

Set a customer billing configuration
v1.customers.billing_config.create(BillingConfigCreateParams**kwargs)
post/v1/customers/{customer_id}/billing-config/{billing_provider_type}
Delete a customer billing configuration
v1.customers.billing_config.delete(BillingConfigDeleteParams**kwargs)
delete/v1/customers/{customer_id}/billing-config/{billing_provider_type}
Get a customer billing configuration
v1.customers.billing_config.retrieve(BillingConfigRetrieveParams**kwargs) -> dataDataBillingConfigRetrieveResponse
get/v1/customers/{customer_id}/billing-config/{billing_provider_type}

V1CustomersCommits

Create a commit
v1.customers.commits.create(CommitCreateParams**kwargs) -> dataIDCommitCreateResponse
post/v1/contracts/customerCommits/create
List commits
v1.customers.commits.list(CommitListParams**kwargs) -> datalistnext_pagestrCommitListResponse
post/v1/contracts/customerCommits/list
Update the commit end date
v1.customers.commits.update_end_date(CommitUpdateEndDateParams**kwargs) -> dataIDCommitUpdateEndDateResponse
post/v1/contracts/customerCommits/updateEndDate

V1CustomersCredits

Create a credit
v1.customers.credits.create(CreditCreateParams**kwargs) -> dataIDCreditCreateResponse
post/v1/contracts/customerCredits/create
List credits
v1.customers.credits.list(CreditListParams**kwargs) -> datalistnext_pagestrCreditListResponse
post/v1/contracts/customerCredits/list
Update the credit end date
v1.customers.credits.update_end_date(CreditUpdateEndDateParams**kwargs) -> dataIDCreditUpdateEndDateResponse
post/v1/contracts/customerCredits/updateEndDate

V1CustomersInvoices

Add a one time charge
v1.customers.invoices.add_charge(InvoiceAddChargeParams**kwargs) -> InvoiceAddChargeResponse
post/v1/customers/{customer_id}/addCharge
List invoices
v1.customers.invoices.list(InvoiceListParams**kwargs) -> SyncCursorPage[idstrcredit_typeCreditTypeDatacustomer_idstrline_itemsliststatusstrtotalfloattypestramendment_idstrbillable_statusliteralcontract_custom_fieldsDict[str, str]contract_idstrcorrection_recordCorrectionRecordcreated_atdatetimecustom_fieldsDict[str, object]customer_custom_fieldsDict[str, str]end_timestampdatetimeexternal_invoiceExternalInvoiceinvoice_adjustmentslistissued_atdatetimenet_payment_terms_daysfloatnetsuite_sales_order_idstrplan_custom_fieldsDict[str, str]plan_idstrplan_namestrreseller_royaltyResellerRoyaltysalesforce_opportunity_idstrstart_timestampdatetimesubtotalfloatInvoice]
get/v1/customers/{customer_id}/invoices
List invoice breakdowns
v1.customers.invoices.list_breakdowns(InvoiceListBreakdownsParams**kwargs) -> SyncCursorPage[breakdown_end_timestampdatetimebreakdown_start_timestampdatetimeInvoiceListBreakdownsResponse]
get/v1/customers/{customer_id}/invoices/breakdowns
Get an invoice
v1.customers.invoices.retrieve(InvoiceRetrieveParams**kwargs) -> dataInvoiceInvoiceRetrieveResponse
get/v1/customers/{customer_id}/invoices/{invoice_id}
Invoice
Invoiceclass
ShowShow
idstr
formatuuid
credit_typeidstrnamestrCreditTypeData
customer_idstr
formatuuid
line_itemslist
List[LineItem]
Hide ParametersShow Parameters
credit_typeidstrnamestrCreditTypeData
namestr
totalfloat
applied_commit_or_creditidstrtypeliteralLineItemAppliedCommitOrCredit
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
idstr
formatuuid
typeliteral
Literal["PREPAID", "POSTPAID", "CREDIT"]
Hide ParametersShow Parameters
"PREPAID"
"POSTPAID"
"CREDIT"
commit_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
commit_idstr
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_idstr
optional
commit_netsuite_sales_order_idstr
optional
commit_segment_idstr
optional
formatuuid
commit_typestr
optional

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

custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
discount_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
discount_idstr
optional

ID of the discount applied to this line item.

formatuuid
ending_beforedatetime
optional

The line item's end date (exclusive).

formatdate-time
group_keystr
optional
group_valuestr
optional
is_proratedbool
optional

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

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

metadatastr
optional
netsuite_invoice_billing_enddatetime
optional

The end date for the billing period on the invoice.

formatdate-time
netsuite_invoice_billing_startdatetime
optional

The start date for the billing period on the invoice.

formatdate-time
netsuite_item_idstr
optional
postpaid_commitidstrLineItemPostpaidCommit
optional

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

Hide ParametersShow Parameters
idstr
formatuuid
presentation_group_valuesDict[str, Optional[str]]
optional
Optional[Dict[str, Optional[str]]]

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

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

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

product_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
product_idstr
optional

ID of the product associated with the line item.

formatuuid
product_tagslist
optional
Optional[List[str]]

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

product_typestr
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_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
professional_service_idstr
optional
formatuuid
quantityfloat
optional

The quantity associated with the line item.

reseller_typeliteral
optional
Optional[Literal["AWS", "AWS_PRO_SERVICE", "GCP", "GCP_PRO_SERVICE"]]
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
scheduled_charge_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
scheduled_charge_idstr
optional

ID of scheduled charge.

formatuuid
starting_atdatetime
optional

The line item's start date (inclusive).

formatdate-time
sub_line_itemslist
optional
Optional[List[LineItemSubLineItem]]
Hide ParametersShow Parameters
custom_fieldsDict[str, str]
Dict[str, str]
namestr
quantityfloat
subtotalfloat
charge_idstr
optional
formatuuid
credit_grant_idstr
optional
formatuuid
end_datedatetime
optional

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

formatdate-time
pricefloat
optional

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

start_datedatetime
optional

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

formatdate-time
tier_periodstarting_atdatetimeending_beforedatetimeLineItemSubLineItemTierPeriod
optional

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

Hide ParametersShow Parameters
starting_atdatetime
formatdate-time
ending_beforedatetime
optional
formatdate-time
tierslist
optional
Optional[List[LineItemSubLineItemTier]]
Hide ParametersShow Parameters
pricefloat
quantityfloat
starting_atfloat

at what metric amount this tier begins

subtotalfloat
subscription_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
tierlevelfloatstarting_atstrsizestrLineItemTier
optional

Populated if the line item has a tiered price.

Hide ParametersShow Parameters
levelfloat
starting_atstr
sizestr
optional
unit_pricefloat
optional

The unit price associated with the line item.

statusstr
totalfloat
typestr
amendment_idstr
optional
formatuuid
billable_statusliteral
optional
Optional[Literal["billable", "unbillable"]]

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

Hide ParametersShow Parameters
"billable"
"unbillable"
contract_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
contract_idstr
optional
formatuuid
correction_recordcorrected_invoice_idstrmemostrreasonstrcorrected_external_invoiceCorrectionRecordCorrectedExternalInvoiceCorrectionRecord
optional
Hide ParametersShow Parameters
corrected_invoice_idstr
formatuuid
memostr
reasonstr
corrected_external_invoicebilling_provider_typeliteralexternal_statusliteralinvoice_idstrissued_at_timestampdatetimeCorrectionRecordCorrectedExternalInvoice
optional
Hide ParametersShow Parameters
billing_provider_typeliteral
Literal["aws_marketplace", "stripe", "netsuite", 5 more]
Hide ParametersShow Parameters
"aws_marketplace"
"stripe"
"netsuite"
"custom"
"azure_marketplace"
"quickbooks_online"
"workday"
"gcp_marketplace"
external_statusliteral
optional
Optional[Literal["DRAFT", "FINALIZED", "PAID", 8 more]]
Hide ParametersShow Parameters
"DRAFT"
"FINALIZED"
"PAID"
"UNCOLLECTIBLE"
"VOID"
"DELETED"
"PAYMENT_FAILED"
"INVALID_REQUEST_ERROR"
"SKIPPED"
"SENT"
"QUEUED"
invoice_idstr
optional
issued_at_timestampdatetime
optional
formatdate-time
created_atdatetime
optional

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

formatdate-time
custom_fieldsDict[str, object]
optional
Optional[Dict[str, object]]
customer_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
end_timestampdatetime
optional

End of the usage period this invoice covers (UTC)

formatdate-time
external_invoicebilling_provider_typeliteralexternal_statusliteralinvoice_idstrissued_at_timestampdatetimeExternalInvoice
optional
Hide ParametersShow Parameters
billing_provider_typeliteral
Literal["aws_marketplace", "stripe", "netsuite", 5 more]
Hide ParametersShow Parameters
"aws_marketplace"
"stripe"
"netsuite"
"custom"
"azure_marketplace"
"quickbooks_online"
"workday"
"gcp_marketplace"
external_statusliteral
optional
Optional[Literal["DRAFT", "FINALIZED", "PAID", 8 more]]
Hide ParametersShow Parameters
"DRAFT"
"FINALIZED"
"PAID"
"UNCOLLECTIBLE"
"VOID"
"DELETED"
"PAYMENT_FAILED"
"INVALID_REQUEST_ERROR"
"SKIPPED"
"SENT"
"QUEUED"
invoice_idstr
optional
issued_at_timestampdatetime
optional
formatdate-time
invoice_adjustmentslist
optional
Optional[List[InvoiceAdjustment]]
Hide ParametersShow Parameters
credit_typeidstrnamestrCreditTypeData
namestr
totalfloat
credit_grant_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
credit_grant_idstr
optional
issued_atdatetime
optional

When the invoice was issued (UTC)

formatdate-time
net_payment_terms_daysfloat
optional
netsuite_sales_order_idstr
optional

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

plan_custom_fieldsDict[str, str]
optional
Optional[Dict[str, str]]
plan_idstr
optional
formatuuid
plan_namestr
optional
reseller_royaltyfractionstrnetsuite_reseller_idstrreseller_typeliteralaws_optionsResellerRoyaltyAwsOptionsgcp_optionsResellerRoyaltyGcpOptionsResellerRoyalty
optional

Only present for contract invoices with reseller royalties.

Hide ParametersShow Parameters
fractionstr
netsuite_reseller_idstr
reseller_typeliteral
Literal["AWS", "AWS_PRO_SERVICE", "GCP", "GCP_PRO_SERVICE"]
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
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
gcp_optionsgcp_account_idstrgcp_offer_idstrResellerRoyaltyGcpOptions
optional
Hide ParametersShow Parameters
gcp_account_idstr
optional
gcp_offer_idstr
optional
salesforce_opportunity_idstr
optional

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

start_timestampdatetime
optional

Beginning of the usage period this invoice covers (UTC)

formatdate-time
subtotalfloat
optional

V1CustomersNamed Schedules

Get a customer's named schedule
v1.customers.named_schedules.retrieve(NamedScheduleRetrieveParams**kwargs) -> datalistNamedScheduleRetrieveResponse
post/v1/customers/getNamedSchedule
Update a customer's named schedule
v1.customers.named_schedules.update(NamedScheduleUpdateParams**kwargs)
post/v1/customers/updateNamedSchedule

V1CustomersPlans

Add a plan to a customer
v1.customers.plans.add(PlanAddParams**kwargs) -> dataIDPlanAddResponse
post/v1/customers/{customer_id}/plans/add
End a customer plan
v1.customers.plans.end(PlanEndParams**kwargs) -> PlanEndResponse
post/v1/customers/{customer_id}/plans/{customer_plan_id}/end
List customer plans
v1.customers.plans.list(PlanListParams**kwargs) -> SyncCursorPage[idstrcustom_fieldsDict[str, str]plan_descriptionstrplan_idstrplan_namestrstarting_ondatetimeending_beforedatetimenet_payment_terms_daysfloattrial_infoTrialInfoPlanListResponse]
get/v1/customers/{customer_id}/plans
Get the plan adjustments for a customer
v1.customers.plans.list_price_adjustments(PlanListPriceAdjustmentsParams**kwargs) -> SyncCursorPage[charge_idstrcharge_typeliteralpricesliststart_periodfloatquantityfloatPlanListPriceAdjustmentsResponse]
get/v1/customers/{customer_id}/plans/{customer_plan_id}/priceAdjustments

V1Dashboards

Get an embeddable customer dashboard
v1.dashboards.get_embeddable_url(DashboardGetEmbeddableURLParams**kwargs) -> dataDataDashboardGetEmbeddableURLResponse
post/v1/dashboards/getEmbeddableUrl

V1Invoices

Regenerate an invoice
v1.invoices.regenerate(InvoiceRegenerateParams**kwargs) -> dataDataInvoiceRegenerateResponse
post/v1/invoices/regenerate
Void an invoice
v1.invoices.void(InvoiceVoidParams**kwargs) -> dataDataInvoiceVoidResponse
post/v1/invoices/void

V1Plans

Get plan details
v1.plans.get_details(PlanGetDetailsParams**kwargs) -> dataPlanDetailPlanGetDetailsResponse
get/v1/planDetails/{plan_id}
List plans
v1.plans.list(PlanListParams**kwargs) -> SyncCursorPage[idstrdescriptionstrnamestrcustom_fieldsDict[str, str]PlanListResponse]
get/v1/plans
List plan charges
v1.plans.list_charges(PlanListChargesParams**kwargs) -> SyncCursorPage[idstrcharge_typeliteralcredit_typeCreditTypeDatacustom_fieldsDict[str, str]namestrpriceslistproduct_idstrproduct_namestrquantityfloatstart_periodfloattier_reset_frequencyfloatunit_conversionUnitConversionPlanListChargesResponse]
get/v1/planDetails/{plan_id}/charges
List customers on a plan
v1.plans.list_customers(PlanListCustomersParams**kwargs) -> SyncCursorPage[customer_detailsCustomerDetailplan_detailsPlanDetailsPlanListCustomersResponse]
get/v1/planDetails/{plan_id}/customers
Plan Detail
PlanDetailclass
ShowShow
idstr
formatuuid
custom_fieldsDict[str, str]
Dict[str, str]
namestr
credit_grantslist
optional
Optional[List[CreditGrant]]
Hide ParametersShow Parameters
amount_grantedfloat
amount_granted_credit_typeidstrnamestrCreditTypeData
amount_paidfloat
amount_paid_credit_typeidstrnamestrCreditTypeData
effective_durationfloat
namestr
prioritystr
send_invoicebool
reasonstr
optional
recurrence_durationfloat
optional
recurrence_intervalfloat
optional
descriptionstr
optional
minimumslist
optional
Optional[List[Minimum]]
Hide ParametersShow Parameters
credit_typeidstrnamestrCreditTypeData
namestr
start_periodfloat

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

valuefloat
overage_rateslist
optional
Optional[List[OverageRate]]
Hide ParametersShow Parameters
credit_typeidstrnamestrCreditTypeData
fiat_credit_typeidstrnamestrCreditTypeData
start_periodfloat

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

to_fiat_conversion_factorfloat

V1Pricing Units

List pricing units
v1.pricing_units.list(PricingUnitListParams**kwargs) -> SyncCursorPage[idstris_currencyboolnamestrPricingUnitListResponse]
get/v1/credit-types/list

V1Services

Get services
v1.services.list() -> serviceslistServiceListResponse
get/v1/services

V1Usage

Ingest events
v1.usage.ingest(UsageIngestParams**kwargs)
post/v1/ingest
Get batched usage data
v1.usage.list(UsageListParams**kwargs) -> datalistnext_pagestrUsageListResponse
post/v1/usage
Get usage data with paginated groupings
v1.usage.list_with_groups(UsageListWithGroupsParams**kwargs) -> SyncCursorPage[ending_beforedatetimegroup_keystrgroup_valuestrstarting_ondatetimevaluefloatUsageListWithGroupsResponse]
post/v1/usage/groups
Search events
v1.usage.search(UsageSearchParams**kwargs) -> idstrcustomer_idstrevent_typestrtimestampdatetimetransaction_idstris_duplicateboolmatched_billable_metricslistmatched_customerUsageSearchResponseItemMatchedCustomerprocessed_atdatetimepropertiesDict[str, object]UsageSearchResponse
post/v1/events/search