You are here: API Reference > Objects > Usage

Usage

This object tracks how many units a customer has used of a certain product, such as the number of minutes in a telephone plan. You can import the data through the Zuora application Admin console, or you can upload a CSV (comma-separated values) file. Spreadsheet programs have the capability of exporting data to CSV files.

Supported Calls

This object is used in the create and query calls.

Fields

In addition to the following fields, zObject contributes additional fields. For information on the field types, see Field Types.

Name Required? Type Allowable Values Description
AccountId Yes zns: ID Any valid account ID This is the account that the usage is tied to.
ChargeNumber No string This number is automatically generated The RatePlanCharge number. You can use this in conjunction with the SubscriptionNumber field to track usages at the charge level.
EndDateTime No dateTime A valid dateTime If a usage is being tracked over a span of time, this is the ending date and time for that span of time.
Quantity Yes double A valid double amount; this cannot be less than 0 This indicates how much of the item has been used.
RbeStatus Yes string Pending, Processed This indicates the status in the Zuora system.
SourceName No string 50 characters The name of the source of the usage information. You can use any identifier you want for the source. If you uploaded a spreadsheet, this is the spreadsheet's file name.
SourceType Yes string API, Import This indicates how the usage information was provided. If you don't specific a SourceType, it automatically defaults to API.

API indicates that it came through an insert using the API.

Import indicates that it came through the Admin console. If you import a spreadsheet, the data can only be in CSV format.
StartDateTime No dateTime A valid dateTime This is the beginning date and time for the span of time that the usage is being tracked over.
SubmissionDateTime No dateTime A valid dateTime This is the date on which the usage was submitted.
SubscriptionNumber No string This number is automatically generated You can use this in conjunction with the ChargeNumber field to track usages at the charge level.
UOM Yes string Allowable values are predefined in the Zuora admin interface This is the unit of measure that is being used (licenses, seats, minutes, and so on). The units are defined in the Admin settings.

Copyright © 2008-2009 Zuora, Inc.