Revenue

Revenue

Retrieving Revenue Report Information

If you are distributing under any Revelator distribution deals, your Revelator revenue reports are added directly to your account. Download these reports for use in any an external system.

If you are using any non-Revelator distribution deals and not using Revelator for reporting or analytics, make sure that you do not configure your account to import your 3rd party revenue reports. Also, do not enter your credentials for the reporting fields when configuring your integration settings.

GET /finance/salereport/all

Retrieves all statement IDs and other identifying parameters of revenue reports in your account. Use this endpoint with filtering parameters, to find a specific statementTypeId.

Query Params

ParameterTypeDescription
storeId
optional
integerTo filter for a specific DSP, provide the DSP’s storeId.
storeIds
optional
array of integersTo filter for multiple DSPs, provide multiple DSP’s storeId separately
processed
optional
boolean
  • true - to filter for processed reports
  • false - to filter for unprocessed reports
approved
optional
boolean
  • true - to filter for approved reports
  • false - to filter for unapproved reports

Example

Request
curl -X GET -H 'Accept: text/plain'\
'https://api.revelator.com/finance/salereport/all?storeIds=1&storeIds=2&approved=true'
Response
{
    "total": 5080.8400000000,
    "totalSmartContracts": 0.000000,
    "totalMissingSmartContracts": 5080.8400000000,
    "totalItemsCount": 7,
    "pageNumber": 1,
    "pageSize": 1,
    "items": [
        {
            "statementId": "-1|123456",
            "statementTypeId": -1,
            "payorDistributorId": 479,
            "payorDistributorStoreId": 413,
            "payorName": "Example Payor",
            "payorImageId": null,
            "payeeName": "Example Payee",
            "payeeImageId": null,
            "isReady": true,
            "isReprocessing": false,
            "currencyCode": "USD",
            "targetCurrencyCode": "USD",
            "countryId": null,
            "exchangeRate": 1.0000000000,
            "isExchangeRateConfirmed": true,
            "fileName": "monthly-sales-report.txt",
            "filePath": null,
            "userStatementDownloadToken": null,
            "createdBy": "[email protected]",
            "lastUpdateBy": "[email protected]",
            "creationDate": "2024-07-10T13:37:28.6",
            "lastUpdateDate": "2024-07-11T11:56:11.663",
            "approvalDate": "2024-07-11T11:56:11.663",
            "date": "2024-01-01T00:00:00",
            "totalQuantity": 20,
            "totalQuantityDownload": 0,
            "totalQuantityStreaming": 0,
            "totalGross": 14.0000000000,
            "totalNet": 14.000000,
            "errorsAssetsCount": 0.0,
            "errorsGross": null,
            "totalNetDownload": 0.0,
            "totalNetStreaming": 0.0,
            "totalTax": 0.0000000000,
            "totalAdjustment": 0.0000000000,
            "adjustmentPercentage": null,
            "totalRevenuShare": 0.0000000000,
            "totalMechanicals": 0.0000000000,
            "hasErrors": false,
            "payeeId": 123456,
            "isRoyaltyTokenPayee": false,
            "statementDisplayTypeId": -1,
            "statementType": "Revenue Report",
            "isNew": false,
            "suffix": null,
            "contractName": null,
            "status": 2,
            "isSplited": false,
            "approvedBy": "John Doe",
            "sentToPayeeAtDate": null,
            "userStatementsQueueName": null,
            "payorId": null,
            "canUnlock": true,
            "isPayed": true,
            "statementApprovalQueueApprove": true,
            "statementApprovalQueueStatus": 4,
            "statementEmailQueueStatus": null,
            "smartContractsTotalNet": 0.000000,
            "totalNetMissingSmartContracts": 14.000000
        }
    ],
    "additionalCounters": {
        "totalApprovedCount": 1.0,
        "totalUnApprovedCount": 0.0,
        "totalErrorCount": 6.0,
        "totalNeedFxCount": 0.0,
        "totalCount": 7.0
    }
}

GET /finance/salereport/{statementId}

Retrieves only the specified statement and its parameters.

The format of statementId in the query is: statementId={statementTypeId}%7C{statementId} , %7C is URL-encoded for ”|” (bar/pipe).

Failure to use this format will result in an error response. Use the Retrieving Revenue Report Information endpoint with filtering parameters, to find the specific statementTypeId of the statement you need.

Example

Request
curl -X GET -H 'Accept: text/plain'\
'https://api.revelator.com/finance/salereport/1%7C123456'
Response
{
    "statementId": "-1|123456",
    "statementTypeId": -1,
    "payorDistributorId": 479,
    "payorDistributorStoreId": 413,
    "payorName": "Example Payor",
    "payorImageId": null,
    "payeeName": "Example Payee",
    "payeeImageId": null,
    "isReady": true,
    "isReprocessing": false,
    "currencyCode": "USD",
    "targetCurrencyCode": "USD",
    "countryId": null,
    "exchangeRate": 1.0000000000,
    "isExchangeRateConfirmed": true,
    "fileName": "monthly-sales-report.txt",
    "filePath": null,
    "userStatementDownloadToken": null,
    "createdBy": "[email protected]",
    "lastUpdateBy": "[email protected]",
    "creationDate": "2024-07-10T13:37:28.6",
    "lastUpdateDate": "2024-07-11T11:56:11.663",
    "approvalDate": "2024-07-11T11:56:11.663",
    "date": "2024-01-01T00:00:00",
    "totalQuantity": 20,
    "totalQuantityDownload": 0,
    "totalQuantityStreaming": 0,
    "totalGross": 14.0000000000,
    "totalNet": 14.000000,
    "errorsAssetsCount": 0.0,
    "errorsGross": null,
    "totalNetDownload": 0.0,
    "totalNetStreaming": 0.0,
    "totalTax": 0.0000000000,
    "totalAdjustment": 0.0000000000,
    "adjustmentPercentage": null,
    "totalRevenuShare": 0.0000000000,
    "totalMechanicals": 0.0000000000,
    "hasErrors": false,
    "payeeId": 123456,
    "isRoyaltyTokenPayee": false,
    "statementDisplayTypeId": -1,
    "statementType": "Revenue Report",
    "isNew": false,
    "suffix": null,
    "contractName": null,
    "status": 2,
    "isSplited": false,
    "approvedBy": "John Doe",
    "sentToPayeeAtDate": null,
    "userStatementsQueueName": null,
    "payorId": null,
    "canUnlock": true,
    "isPayed": true,
    "statementApprovalQueueApprove": true,
    "statementApprovalQueueStatus": 4,
    "statementEmailQueueStatus": null,
    "smartContractsTotalNet": 0.000000,
    "totalNetMissingSmartContracts": 14.000000
}

Downloading Revenue Reports

Revenue Reports can be downloaded in 2 formats; Summary, as an HTML file, or Details, in a .csv file. All download requests must use the format below. Failure to use the correct format will result in an error response.

GET /finance/salereport/download/summary

Downloads the Summary revenue report as an HTML file for the specified statement ID.

The format of statementId in the query is: statementId={statementTypeId}%7C{statementId} , %7C is URL-encoded for ”|” (bar/pipe).

Failure to use this format will result in an error response.

Its recommended to first retrieve and view the Revenue Reports using the Retrieving Revenue Report Information endpoints to confirm the correct values of statementTypeId and statementId.

Query Params

ParameterTypeDescription
statementId
required
stringStatement ID of the report.

GET /finance/salereport/download/details

Downloads the Details revenue report as a .csv file for the specified statement ID.

The format of statementId in the query is: statementId={statementTypeId}%7C{statementId} , %7C is URL-encoded for ”|” (bar/pipe).

Failure to use this format will result in an error response.

Its recommended to first retrieve and view the Revenue Reports using the Retrieving Revenue Report Information endpoints to confirm the correct values of statementTypeId and statementId.

Query Params

ParameterTypeDescription
statementId
required
stringStatement ID of the report.

Example

Request
curl -X GET -H 'Accept: text/plain'\
'http://api.revelator.com/finance/salereport/download/summary?statementId=1%7C123456'
Request
curl -X GET -H 'Accept: text/plain'\
'http://api.revelator.com/finance/salereport/download/details?statementId=1%7C123456'