Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Charge Revenue Summaries > Get Charge Revenue Summary Details by Charge ID

Get Charge Revenue Summary Details by Charge ID

Overview

This REST API reference describes how to retrieve the details of a charge revenue summary by specifying the subscription charge ID. Request and response field descriptions and sample code are provided.

Request

  • Production: GET https://api.zuora.com/rest/v1/charge-revenue-summaries/subscription-charges/{charge-key}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/charge-revenue-summaries/subscription-charges/{charge-key}

Request header

The Accept request header is optional. Only JSON is returned.

Request parameters

charge-key

required

path

ID of the subscription rate plan charge; for example, 402892793e173340013e173b81000012.

Response

This response retrieves all revenue items associated with a charge revenue summary by specifying the charge revenue summary number.

number

The charge revenue summary number.

recognitionRuleName

The name of the recognition rule.

amount

The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as JPY 30 or USD 30.15. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned:  "Allocation amount with wrong decimal places."

undistributedUnrecognizedRevenue

Revenue in the open-ended accounting period.

recognizedRevenue

The revenue that was distributed in a closed accounting period.

unrecognizedRevenue

Revenue distributed in all open accounting periods, which includes the open-ended accounting period.

currency

The type of currency used. 

notes

Additional information about this record.

accountId

An account ID.

subscriptionId

The original subscription ID.

subscriptionChargeId

The original subscription charge ID.

productChargeId

Unique product rate plan charge ID.

revenueItems

Revenue items are listed in ascending order by the accounting period start date.

accountingPeriodName

Name of the accounting period. The open-ended accounting period is named Open-Ended

isAccountingPeriodClosed

 Indicates if the accounting period is closed or open. 

amount

The amount of the revenue item.

currency

The type of currency used. 

accountingPeriodStartDate

The accounting period start date.

accountingPeriodEndDate

The accounting period end date. The accounting period end date of the open-ended accounting period is null.

success

Returns true if the request is successful. Otherwise, returns false.

processId

The internal process ID used to assist Zuora support. Returned only if success is false.

reasons

Information describing the reason for the result. Returned only if success is false.

code

An eight-digit numeric error code.

message

A description of the error.

If a charge revenue summary does not exist for the number passed, the following message is returned:

Cannot find entity by key:{charge-key}

Example

HTTP/JSON request:

GET https://api.zuora.com/rest/v1/charge-revenue-summaries/subscription-charges/2c92c0f9410f55dd014110b22cbc023f/

JSON response:

{
 "number": "CRS-00000001",
 "recognitionRuleName": "Recognize daily over time",
 "amount": 428,
 "undistributedUnrecognizedRevenue": 0,
 "recognizedRevenue": 0,
 "unrecognizedRevenue": 428,
 "currency": "USD",
 "notes": null,
 "accountId": "2c92c0f9410f55ee014110a008f6791f",
 "subscriptionId": "2c92c0f9410f55dd014110a14aa47f09",
 "subscriptionChargeId": "2c92c0f9410f55dd014110b22cbc023f",
 "revenueItems": [
   {
     "accountingPeriodName": "May 2012",
     "isAccountingPeriodClosed": false,
     "amount": 100,
     "currency": "USD",
     "accountingPeriodStartDate": "2012-05-01",
     "accountingPeriodEndDate": "2012-05-31"
   },
   {
     "accountingPeriodName": "Jun 2012",
     "isAccountingPeriodClosed": false,
     "amount": 92,
     "currency": "USD",
     "accountingPeriodStartDate": "2012-06-01",
     "accountingPeriodEndDate": "2012-06-30"
   },
   {
     "accountingPeriodName": "Jul 2012",
     "isAccountingPeriodClosed": false,
     "amount": 0,
     "currency": "USD",
     "accountingPeriodStartDate": "2012-07-01",
     "accountingPeriodEndDate": "2012-07-31"
   },
   {
     "accountingPeriodName": "Aug 2012",
     "isAccountingPeriodClosed": false,
     "amount": 85,
     "currency": "USD",
     "accountingPeriodStartDate": "2012-08-01",
     "accountingPeriodEndDate": "2012-08-31"
   },
   {
     "accountingPeriodName": "Sep 2012",
     "isAccountingPeriodClosed": false,
     "amount": 85,
     "currency": "USD",
     "accountingPeriodStartDate": "2012-09-01",
     "accountingPeriodEndDate": "2012-09-30"
   },
   {
     "accountingPeriodName": "Jan'2013",
     "isAccountingPeriodClosed": false,
     "amount": 80,
     "currency": "USD",
     "accountingPeriodStartDate": "2013-01-01",
     "accountingPeriodEndDate": "2013-01-31"
   },
   {
     "accountingPeriodName": "Feb'2013",
     "isAccountingPeriodClosed": false,
     "amount": 5,
     "currency": "USD",
     "accountingPeriodStartDate": "2013-02-01",
     "accountingPeriodEndDate": "2013-02-28"
   },
   {
     "accountingPeriodName": "Sep'2013",
     "isAccountingPeriodClosed": false,
     "amount": -7,
     "currency": "USD",
     "accountingPeriodStartDate": "2013-09-01",
     "accountingPeriodEndDate": "2013-09-30"
   },
   {
     "accountingPeriodName": "Nov'2013",
     "isAccountingPeriodClosed": false,
     "amount": -12,
     "currency": "USD",
     "accountingPeriodStartDate": "2013-11-01",
     "accountingPeriodEndDate": "2013-11-30"
   },
   {
     "accountingPeriodName": "Dec 2013",
     "isAccountingPeriodClosed": false,
     "amount": 0,
     "currency": "USD",
     "accountingPeriodStartDate": "2013-12-11",
     "accountingPeriodEndDate": "2014-01-10"
   },
   {
     "accountingPeriodName": "Open-Ended",
     "isAccountingPeriodClosed": false,
     "amount": 0,
     "currency": "USD",
     "accountingPeriodStartDate": "2014-03-12",
     "accountingPeriodEndDate": null
   }
 ],
 "success": true
}
Last modified
18:49, 13 Nov 2016

Tags

Classifications

(not set)