Skip to main content

Create usage records with the Usage custom fields

Zuora

Create usage records with the Usage custom fields

The Multi-Attribute Pricing charge model for one-time and recurring charges is available to all customers.

After creating custom fields, the corresponding lookup table, and the subscription, you can call the CRUD: Create usage record operation to create usage records with the custom fields. 

The account that you want to create the usage records for must have a corresponding usage-based rate plan charge.

Procedure

Call the CRUD: Create usage record operation to create usage records, with the custom fields specified in the request body.

The following request example is used to create a single usage record with the Usage custom fields:

POST https://rest.zuora.com/v1/object/usage
{
   "AccountNumber": "A00000002",
   "ChargeNumber": "C-00000229",
   "Quantity": 50,
   "StartDateTime": "2019-09-21T16:41:36.000+01:00",
   "SubscriptionNumber": "A-S00000100",
   "UOM": "Each",
   "state__c": "California",
   "type__c": "minicar"
}

After the request is submitted successfully, the following response is returned with the usage record ID:

{
   "Success": true,
   "Id": "2c93808457d787030157e02e0a301d0a"
}