Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Revenue Schedules > Distribute revenue on a specific date

Distribute revenue on a specific date

This REST API reference describes how to distribute revenue on a specific recognition date. Request and response field descriptions and sample code are provided.

Request

  • Production: PUT https://api.zuora.com/rest/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date
  • API Sandbox: PUT https://apisandbox-api.zuora.com/rest/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date

Request header

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

Request parameters

rs-number

required

path

Revenue schedule number. Specify the revenue schedule whose revenue you want to distribute.

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

Request body

distributionType

required

How to distribute the revenue for milestone-based recognition.

Type: string (enum)

Values are:

  • specific date (delta fixed amount)
  • specific date (delta percent total)
  • specific date (delta percent undistributed)

distributeOn

required

The recognition date on which to distribute revenue for milestone-based recognition.

Type: date in YYYY-MM-DD format.

eventType

optional

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

eventTypeSystemId

optional

System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to Settings > Z-Finance Settings > Configure Revenue Event Types in the Zuora UI.

notes

optional

Additional information about this record.

amount

optional

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."

percentage

optional

Percentage of the total recognition amount or total undistributed to distribute.

Type: decimal

Required if distributionType is either:

  • specific date (delta percent total)
  • specific date (delta percent undistributed)

cf_txtn__c

optional

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

cf_pkn__c

optional

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

Response

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

revenueEventNumber

The revenue event number created when a revenue event occurs.

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:

PUT https://apisandbox-api.zuora.com/rest/v1/revenue-schedules/RS-00000001/distribute-revenue-on-specific-date

HTTP/JSON request:

{
   "distributionType: "specific date (delta fixed amount)",
   "eventType": "Revenue Distributed",
   "eventTypeSystemId": "RevenueDistributed__z",
   "eventNumber__c": "phase 2"
   "distributeOn": "2016-02-03",
   "amount": "1000.00",
   "notes": "service delivered and accepted by customer"
 }

JSON response:

{
"revenueEventNumber": "RE-00000326",
"success": true
}
Last modified
16:53, 6 Jan 2016

Tags

Classifications

(not set)