Store/Update Revenue

This API request stores and updates revenue data for a specific site using the HTTP method PUT. The request includes the following parameters:

Headers:

AuthorizationstringRequired

The authorization token for accessing the API. The header value should be set to "Bearer {your-access-token}", where {your-access-token} is the access token assigned to the user.

Request Body(JSON payload):

The data containing the ad cost information to store or update. The payload should include the following parameters:

SiteIdstringRequired

The ID of the site for which to add or update revenue data

ValueintRequired

The value of the revenue.

RevenueClosedDatestringRequired

The date and time the revenue was captured. Must be in ISO 8601 format. yyyy-MM-dd

VisitorIdentifierOptionsArrayRequired

An array of visitor identifiers. Each item in the array should include the following parameters:

KeystringRequired

The key for the visitor identifier. Accepted Keys: Email, Phone, RaId, PayloadValue

ValuestringRequired

The value for the visitor identifier.

LabelsArray(string)Required

Revenue Lables, atleast one should be set


The {your-access-token} parameter in the authorization header should be replaced with the appropriate access token.

Request
PUT
revenue/upload
curl -X PUT \ 'https://rest.rulerapi.com/v1/revenue/upload' \ -H 'Authorization: Bearer {your-access-token}' \ -H 'Content-Type: application/json' \ -d '{ "SiteId": "{siteId}", "Value": "{value}", "RevenueClosedDate": "{clicks}", "VisitorIdentifierOptions": [ { "Key": "{key}", "Value": "{value}" } ], "Labels": [ "{labels[0]}", "{labels[1]}" ] }'
Response
Status: 201