Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Revenue Schedules > Get revenue schedule details

Get revenue schedule details

This REST API reference describes how to get the details of a revenue schedule by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.

Request

  • Production: GET https://api.zuora.com/rest/v1/revenue-schedules/{rs-number}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/revenue-schedules/{rs-number}

Request header

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

Request parameters

rs-number

required

path

Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".

Response

This response includes details of a revenue schedule associated with the requested revenue schedule number (rs-number). 

number

Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".

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.

createdOn

The date when the record was created in YYYY-MM-DD HH:MM:SS format.

updatedOn

The date when the revenue automation start date was set.

accountId

An account ID.

subscriptionId

The original subscription ID.

subscriptionChargeId

The original subscription charge ID.

productChargeId

Unique product rate plan charge ID.

linkedTransactionID

The linked transaction ID for billing transactions. This field is used for all rules except the custom unlimited or manual recognition rule models. If using the custom unlimited rule model, then the field value must be null. If the field is not null, then the referenceId field must be null. 

linkedTransactionType

The type of linked transaction for billing transactions, which can be invoice item or invoice item adjustment. This field is used for all rules except the custom unlimited or manual recognition rule models. 

referenceID

Reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to an invoice item or invoice item adjustment.

revenueScheduleDate

The effective date of the revenue schedule. For example, the revenue schedule date for bookings-based revenue recognition is typically set to the order date or contract date.

The date cannot be in a closed accounting period. The date must be in the YYYY-MM-DD format.

cf_txtn__c

One or more optional custom fields, where n is the maximum number of custom fields allowed.

cf_pkn__c

One or more optional custom fields, where n is the maximum number of custom fields allowed. 

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.

recognizedRevenueAccountingCodeType

The type associated with the recognized revenue accounting code, such as Sales Revenue or Sales Discount. Required only when overrideChargeAccountingCodes is true. Otherwise this value is ignored.

recognizedRevenueAccountingCode

The accounting code for recognized revenue, such as Monthly Recurring Charges or Overage Charges. Required only when overrideChargeAccountingCodes is true. Otherwise the value is ignored.

deferredRevenueAccountingCodeType

The type associated with the deferred revenue accounting code, such as Deferred Revenue. Required only when overrideChargeAccountingCodes is true. Otherwise this value is ignored.

deferredRevenueAccountingCode

The accounting code for deferred revenue, such as Monthly Recurring Liability. Required only when overrideChargeAccountingCodes is true. Otherwise this value is ignored.

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 no revenue schedule exists with the number passed in, you will get a "Can not find entity by key: {rs-number}" error.

Example

HTTP/JSON request:

GET https://api.zuora.com/rest/v1/revenue-schedules/RS-00000008

JSON response:

 ​{ ​   
   "number": "RS-00000008",
   "recognitionRuleName": "Recognize upon invoicing",
   "amount": 50,
   "undistributedUnrecognizedRevenue": -10,
   "recognizedRevenue": 0,
   "unrecognizedRevenue": 50,
   "currency": "USD",
   "notes": "change recognition term",
   "createdOn": "2014-01-20 16:36:45",
   "updatedOn": "2014-01-28 17:05:52",
   "accountId": "2c92c0f8439770960143b2141f5a584e",
   "subscriptionId": "2c92c0f943977b4f0143b23487994327",
   "subscriptionChargeId": "2c92c0f943977b4f0143b23487ed432e",
   "linkedTransactionId": "2c92c095439782cd0143b239aa234cf5",
   "linkedTransactionType": "InvoiceItem",
   "referenceId": null,
   "revenueScheduleDate": "2014-01-20",
   "cf_phases__c": "Phase 1", 
   "revenueItems":  [
      {
         "accountingPeriodName": "Nov'2013",
         "isAccountingPeriodClosed": true,
         "amount": 60,
         "currency": "USD",
         "accountingPeriodStartDate": "2013-10-01",
         "accountingPeriodEndDate": "2013-10-31",
         "recognizedRevenueAccountingCodeType": "Revenue: Sales",
         "recognizedRevenueAccountingCode": "MONTHLY RECURRING CHARGE",
         "deferredRevenueAccountingCodeType": "Liabilities: Deferred Revenue",
         "deferredRevenueAccountingCode": "MONTHLY RECURRING CHARGE",
         }
     {
        "accountingPeriodName": "Open-Ended",
        "isAccountingPeriodClosed": false,
        "amount": -10,
        "currency": "USD",
        "accountingPeriodStartDate": "2013-11-01",
        "accountingPeriodEndDate": null,
        "recognizedRevenueAccountingCodeType": "Revenue: Sales",
        "recognizedRevenueAccountingCode": "MONTHLY RECURRING CHARGE",
        "deferredRevenueAccountingCodeType": "Liabilities: Sales",
        "deferredRevenueAccountingCode": "MONTHLY RECURRING CHARGE",
        }  
     ],
  "success": true
}
Last modified
18:52, 13 Nov 2016

Tags

Classifications

(not set)