Newer Version Available
Revenue Recognition REST API
Use REST API to call invocable methods from the Revenue Recognition Apex
class.
This object is available in API version 48.0 and later.
Supported REST HTTP Methods
- URI
- actions/custom/apex/blng__RevenueRecognition
- Formats
- JSON, XML
- HTTP Methods
- POST
- Authentication
- Bearer Token
Parameters
| Input | Details |
|---|---|
| currencyIsoCode |
|
| legalEntityID |
|
| revenueAmount |
|
| revenueRecognitionRuleId |
|
| source |
|
| sourceFieldName |
|
| startDate |
|
| endDate |
|
Response Body
| Name | Type | Definition |
|---|---|---|
| jobId | ID | The ID of the APEX job that sent your input parameters to the revenue recognition service. |
| inputValidationStatus | String | A list of input parameters that encountered validation errors. |
| totalNumberOfInputsWithErrors | Integer | The number of input parameters that the revenue recognition service couldn’t use due to errors (for example, a missing startDate, or a revenueAmount with a non-numeric character). |
| totalNumberOfInputsWithoutErrors | Integer | The number of input parameters that were successfully passed to the revenue recognition service. |
Samples
- Sample Request Body
- This payload passes a payment record to the Revenue Recognition Service. The service attempts to create a revenue schedule based off the revenue amount of $12000 and the defined revenue recognition rule.
-
1{ 2 "inputs":[ 3 { 4 "revenueAmount":"12000", 5 "currencyIsoCode":"USD", 6 "revenueRecognitionRuleId":"a2A0x000000jM6REAU", 7 "startDate":"2019-08-29", 8 "source":"a2217000000G4ecAAC", 9 "sourceFieldname":"blng__Contract__c" 10 } 11 ] 12} - Sample Response Body
- In this case, we receive a response with one error because the sample payload didn’t include a startDate variable.
-
1[ 2 { 3 "actionName" : "blng__RecognizeRevenue", 4 "errors" : null, 5 "isSuccess" : true, 6 "outputValues" : { 7 "jobId" : "7070x00000s3Ut9AAE", 8 "totalInputWithoutErrors" : "0", 9 "totalInputWithErrors" : "1", 10 "inputValidationStatus" : [ 11 [ "Queued"], 12 [ "Start date is a required field"] 13 ] 14 } 15 } 16]