Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Revenue Events > Get revenue events for a revenue schedule

Get revenue events for a revenue schedule

This REST API reference describes how to get all revenue events in 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-events/revenue-schedules/{rs-number}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/revenue-events/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".

Request body

PageSize

optional

Must be an integer. A maximum number of 300 pages can be returned in a response. Any value greater than 300 is treated as 300.

Use this field only when the revenue schedule is not linked to an invoice item or invoice item adjustment, such as for revenue schedules based on the Custom - Unlimited recognition model.  

Response

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

revenueEventDetails

Represents a change to a revenue schedule, such as posting an invoice or distributing revenue.

number

The revenue event number created when a revenue event occurs.

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.

createdOn

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

eventType

Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to Settings > Z-Finance Settings > Configure Revenue Event Types in the Zuora UI. The default revenue event types are:

  • Invoice Posted
  • Invoice Item Adjustment Created
  • Invoice Canceled
  • Invoice Item Adjustment Canceled
  • Revenue Distributed

recognitionStart

The start date of a recognition period in YYYY-MM-DD format.

recognitionEnd

The end date of a recognition period in YYYY-MM-DD format. 

The maximum difference of the recognitionStart and recognitionEnd date fields is equal to 250 multiplied by the length of an accounting period.

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.

nextPage

Provides hyperlinks to view the next pages.

revenueEventsListURL

Returns the URLs of the revenue events.

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.

Example

HTTP/JSON request:

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

JSON response:

"revenueEventDetails": [
{
   "number": "RE-00000001",
   "currency": "USD",
   "notes": "Phase 1 Test",
   "accountId": "2c92c0f8439770960143b2111f5a584e",
   "subscriptionId": "2c92c0f943977b4f0143b23487999327",
   "subscriptionChargeId": "2c92c0f943977b4f0143b22287ed432e",
   "createdOn": "2014-01-21 11:35:42",
   "eventType": "Revenue Distributed",
   "recognitionStart": null,
   "recognitionEnd": null,
   "cf_phases__c": "Phase 1",
   "cf_project__c": "project A",
   "revenueItems": [
      {
         "accountingPeriodName": "Oct'2013",
         "isAccountingPeriodClosed": false,
         "amount": 10,
         "currency": "USD",
         "accountingPeriodStartDate": "2013-10-01",
         "accountingPeriodEndDate": "2013-10-31"
         },
      {
         "accountingPeriodName": "Open-Ended",
         "isAccountingPeriodClosed": false,
         "amount": -10,
         "currency": "USD",
         "accountingPeriodStartDate": "2013-11-12",
         "accountingPeriodEndDate": null
         }
      ]
   },
{
   "number": "RE-00000002",
   "currency": "USD",
   "notes": null,
   "accountId": "2c92c0f8439770960143b2111f5a584e",
   "subscriptionId": "2c92c0f943977b4f0143b22287994327",
   "subscriptionChargeId": "2c92c0f943977b4f0143b99987ed432e",
   "createdOn": "2014-01-20 16:36:45",
   "eventType": "Invoice Posted",
   "recognitionStart": "2013-10-10",
   "recognitionEnd": "2013-10-10",
   "cf_phases__c": "Phase 1",
   "cf_project__c": "project A",
     "revenueItems": [
        {
           "accountingPeriodName": "Oct'2013",
           "isAccountingPeriodClosed": false,
           "amount": 50,
           "currency": "USD",
           "accountingPeriodStartDate": "2013-10-01",
           "accountingPeriodEndDate": "2013-10-31"
           }
       ]
    }
],
"success": true
}
Last modified
18:59, 13 Nov 2016

Tags

Classifications

(not set)