Note: The Usage (with Active Rating) operations are part of the Active Rating feature. You cannot use these operations with the Usage operations.
If a 500 or 502 error occurs when you call any of the Usage (with Active Rating) operations, the first troubleshooting step is to retry the call.
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Creates a single or multiple usage records for an account. The account that you want to create usage records for must have a corresponding usage-based rate plan charge.
For more information about the usage data format, see Usage Data Import.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
Content-Type required | string The type of the request content.
|
Array of objects (data) (Conditional) This field is only used for creating multiple usage records. If you create a single usage record, you do not need to specify the An array of usage records information. |
OK
Bad Request
Conflict
Internal Server Error
{- "data": [
- {
- "accountNumber": "A00002689",
- "tag": "AccountNumber:A00002689",
- "quantity": "15",
- "unitOfMeasure": "Each",
- "startDateTime": "2017-01-14T21:32:00+08:00",
- "description": "Disk usage for A00002689",
- "groupId": "Group A"
}, - {
- "accountNumber": "A00002689",
- "tag": "AccountNumber:A00002689",
- "quantity": "15",
- "unitOfMeasure": "Each",
- "startDateTime": "2017-01-14T21:32:00+08:00",
- "description": "Disk usage for A00002689",
- "groupId": "Group B"
}
]
}
{- "data": [
- {
- "id": "string"
}
]
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Updates certain information of a specified usage record. Note that you can only update usage records that are not billed.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
object (customFields) Container for custom fields. | |
description | string <= 200 characters The description of the usage record. |
quantity | number <double> The number of units the usage record is used. |
startDateTime | string <date-time> The start date and time when the usage is consumed. See supported date and time format. |
unitOfMeasure | string <= 50 characters The definable unit used to measure consumed usage. |
OK
Bad Request
Not Found
Conflict
Internal Server Error
{- "quantity": "15",
- "unitOfMeasure": "Each",
- "startDateTime": "2017-01-14T21:00:00+08:00",
- "description": "Disk usage for A00002689"
}
{- "id": "string"
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves information about a specific usage record.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
{- "accountNumber": "string",
- "createdBy": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "description": "string",
- "fileName": "string",
- "groupId": "string",
- "id": "string",
- "importId": "string",
- "quantity": 0.1,
- "startDateTime": "2019-08-24T14:15:22Z",
- "status": "Pending",
- "tag": "string",
- "uniqueKey": "string",
- "unitOfMeasure": "string",
- "updatedBy": "string",
- "updatedOn": "2019-08-24T14:15:22Z"
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Deletes a usage record. Note that you can only delete usage records with the Pending or Rated status.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
{- "success": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves information about usage records.
You can specify certain response fields you want to retrieve by specifying the fields
and filters
query parameters. By default, all the response fields are returned in the response.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Internal Server Error
{- "data": [
- {
- "accountNumber": "string",
- "createdBy": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "description": "string",
- "fileName": "string",
- "groupId": "string",
- "id": "string",
- "importId": "string",
- "quantity": 0.1,
- "startDateTime": "2019-08-24T14:15:22Z",
- "status": "Pending",
- "tag": "string",
- "uniqueKey": "string",
- "unitOfMeasure": "string",
- "updatedBy": "string",
- "updatedOn": "2019-08-24T14:15:22Z"
}
]
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves information about usage records in a stream without pagination.
You can specify certain response fields you want to retrieve by sepcifying the fields
and filters
query parameters. By default, all the reponse fields are returned in the response.
The value of the filters
parameter must be URL-encoded. If you want to use a plus sign +
in the endpoint URL, you must replace the plus sign +
with %2B
. For example, if you use /usage/stream-query?filters=(status='Pending' and startDateTime > '2018-04-04T13:32:37+08:00')
in the endpoint URL, an error occurs. You have to use /usage/stream-query?filters=(status='Pending' and startDateTime > '2018-04-04T13:32:37%2B08:00')
instead.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Internal Server Error
{- "data": [
- {
- "accountNumber": "string",
- "createdBy": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "description": "string",
- "fileName": "string",
- "groupId": "string",
- "id": "string",
- "importId": "string",
- "quantity": 0.1,
- "startDateTime": "2019-08-24T14:15:22Z",
- "status": "Pending",
- "tag": "string",
- "uniqueKey": "string",
- "unitOfMeasure": "string",
- "updatedBy": "string",
- "updatedOn": "2019-08-24T14:15:22Z"
}
]
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Imports usage data by uploading a usage file.
A usage file can be in comma-separated value (.csv
), Microsoft Excel (.xls
), or ZIP format. The maximum size of a usage file in CSV, Excel, or ZIP format to be uploaded is 20 MB. If the size of a usage file exceeds 20 MB, zip the usage file before uploading it. One ZIP file can only contain one CSV or Excel file.
The name of a usage file cannot be longer than 50 characters, including the length of the file name extension.
For more information about the usage file format, see Usage Data Import.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Internal Server Error
curl -X POST -H "Authorization: Bearer 66c7fc29ea984b049284d10f6b6328f5' -F "file=@UsageData.csv" -F "description=import testing" "https://rest.zuora.com/usage-imports"
{- "id": "string",
- "status": "PENDING"
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the information about all the usage import files, such as the processing status of the usage import files, the total number of usage records that are validated, and the number of usage records with validation errors.
The response is in descending order by the date and time of the updatedOn
field.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Internal Server Error
{- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "status": "PENDING",
- "error": "string",
- "processStart": "2019-08-24T14:15:22Z",
- "processEnd": "2019-08-24T14:15:22Z",
- "totalCount": 0,
- "errorCount": 0,
- "importedCount": 0,
- "createdBy": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "updatedBy": "string",
- "updatedOn": "2019-08-24T14:15:22Z"
}
]
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the detailed information about a specified usage import file.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
{- "id": "string",
- "name": "string",
- "description": "string",
- "status": "PENDING",
- "error": "string",
- "processStart": "2019-08-24T14:15:22Z",
- "processEnd": "2019-08-24T14:15:22Z",
- "totalCount": 0,
- "errorCount": 0,
- "importedCount": 0,
- "createdBy": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "updatedBy": "string",
- "updatedOn": "2019-08-24T14:15:22Z"
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the processing status of a specified usage import file.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
{- "status": "PENDING"
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Downloads a usage import file with the specified usage import ID.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Downloads the corresponding usage import failure file when a usage file fails to be imported. Usage import failure files are only available for usage import files in VALIDATED_FAILED status.
The downloaded usage import failure file is in ZIP format, and contains the error information about each usage record failing to be imported.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Not Found
Internal Server Error
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Downloads a usage file template. The usage file template can be in comma-separated value (.csv
) or Microsoft Excel (.xls
) format.
After the template is downloaded, you can create a usage file based on the template and add usage records to the file.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of all the usage charges associated with the specified customer account. The response returns the rating amount of the charges based on billing period.
By default, the response data is displayed in descending order by updated time.
You can specify the date range for which you want to rate in the fromDate
and toDate
query parameters. For example: /rated-results/account/accountNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "amount": 0.1,
- "currency": "string",
- "additionalInfo": {
- "quantity": 0.1,
- "uom": "string",
- "isOverage": true,
- "isCredit": true
}, - "ratedTime": "string",
- "chargeNumber": "string",
- "subscriptionNumber": "string",
- "accountNumber": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of all the usage charges associated with the specified subscription. The rating is based on billing period.
You can specify the date range for which you want to rate in the fromDate
and toDate
query parameters. For example: /rated-results/subscription/subscriptionNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "amount": 0.1,
- "currency": "string",
- "additionalInfo": {
- "quantity": 0.1,
- "uom": "string",
- "isOverage": true,
- "isCredit": true
}, - "ratedTime": "string",
- "chargeNumber": "string",
- "subscriptionNumber": "string",
- "accountNumber": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of all the usage charges associated with the specified rate plan charge. The rating is based on billing period.
You can specify the date range for which you want to rate in the fromDate
and toDate
query parameters. For example: /rated-results/charge/chargenNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "amount": 0.1,
- "currency": "string",
- "additionalInfo": {
- "quantity": 0.1,
- "uom": "string",
- "isOverage": true,
- "isCredit": true
}, - "ratedTime": "string",
- "chargeNumber": "string",
- "subscriptionNumber": "string",
- "accountNumber": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of the usage records associated with the specified customer account. The response returns the rating result of each usage record.
You can specify the date range for which you want to get the usage rating result in the fromDate
and toDate
query parameters. For example: /rated-usages/account/accountNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "quantity": 0.1,
- "unitOfMeasure": "string",
- "amount": 0.1,
- "currency": "string",
- "accountNumber": "string",
- "subscriptionNumber": "string",
- "chargeNumber": "string",
- "usageId": "string",
- "ratedResultId": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of the usage records associated with the specified subscription. The response returns the rating result of each usage record.
You can specify the date range for which you want to get the rating result in the fromDate
and toDate
query parameters. For example: /rated-results/subscription/subscriptionNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "quantity": 0.1,
- "unitOfMeasure": "string",
- "amount": 0.1,
- "currency": "string",
- "accountNumber": "string",
- "subscriptionNumber": "string",
- "chargeNumber": "string",
- "usageId": "string",
- "ratedResultId": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating is enabled. The Active Rating feature is in development. If you wish to have access to the feature, submit a request at Zuora Global Support.
Retrieves the rating result of the usage records associated with the specified charge. The response returns the rating result of each usage record.
You can specify the date range for which you want to get the rating result in the fromDate
and toDate
query parameters. For example: /rated-results/charge/chargenNumber?fromDate=2016-08-01&toDate=2016-08-21
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
Not Found
Internal Server Error
{- "dataSet": [
- {
- "id": "string",
- "startDate": "2019-08-24",
- "quantity": 0.1,
- "unitOfMeasure": "string",
- "amount": 0.1,
- "currency": "string",
- "accountNumber": "string",
- "subscriptionNumber": "string",
- "chargeNumber": "string",
- "usageId": "string",
- "ratedResultId": "string"
}
], - "cursor": "string",
- "count": 0,
- "hasMore": true
}
Note: This operation is available only if Active Rating and Custom Fields services are enabled. The Custom Fields service is in Limited Availability and Active Rating is in development. If you wish to have access to the services, submit a request at Zuora Global Support.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "createdById": "string",
- "updatedById": "string",
- "createdDate": "2019-08-24T14:15:22Z",
- "updatedDate": "2019-08-24T14:15:22Z",
- "schema": { }
}
Note: This operation is available only if Active Rating and Custom Fields services are enabled. The Custom Fields service is in Limited Availability and Active Rating is in development. If you wish to have access to the services, submit a request at Zuora Global Support.
This custom fields definition has the following limitations:
label
) is 64.__c
as the suffix.If you want to add new custom fields or update existing custom fields, you must include the schema of all existing custom fields in the request body.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
If-Match | string The expected ETag of the resource. You can use this header to perform a conditional request. Zuora responds with 412 Precondition Failed if the ETag of the resource does not match the value of this header. |
The schema for the custom fields definition.
The schema must be the complete custom fields definition that includes all Usage custom fields.
The schema must conform to the JSON Schema specification.
If the value of the type
path parameter is Usage
, the schema must have "type": "object"
. Each property in the schema must not have "type": "object"
or "type": "array"
.
OK
Bad Request
Precondition Failed
{- "title": "Usage",
- "type": "object",
- "properties": {
- "firstName__c": {
- "type": "string"
}, - "lastName__c": {
- "type": "string"
}, - "country__c": {
- "type": "string"
}, - "age__c": {
- "description": "Age in years",
- "type": "integer",
- "minimum": 0
}
}, - "required": [
- "firstName__c",
- "lastName__c"
]
}
Note: This operation is available only if Active Rating and Custom Fields services are enabled. The Custom Fields service is in Limited Availability and Active Rating is in development. If you wish to have access to the services, submit a request at Zuora Global Support.
Before calling this operation, you must delete all data stored in the custom fields. To delete all data stored in custom fields that are part of Active Rating, use Delete usage record.
When you delete the schema of a custom fields definition, Zuora sets "schema": {}
and "type": "_internal"
for the custom fields definition.
Authorization required | string
|
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
OK
Bad Request