This API request stores and updates revenue data for a specific site using the HTTP method PUT. The request includes the following parameters:
Authorization
stringRequired 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.
The data containing the ad cost information to store or update. The payload should include the following parameters:
SiteId
stringRequiredThe ID of the site for which to add or update revenue data
Value
intRequiredThe value of the revenue.
RevenueClosedDate
stringRequiredThe date and time the revenue was captured. Must be in ISO 8601 format. yyyy-MM-dd
VisitorIdentifierOptions
ArrayRequiredAn array of visitor identifiers. Each item in the array should include the following parameters:
Key
stringRequiredThe key for the visitor identifier. Accepted Keys: Email, Phone, RaId, PayloadValue
Value
stringRequiredThe value for the visitor identifier.
Labels
Array(string)RequiredRevenue Lables, atleast one should be set
The {your-access-token}
parameter in the authorization header should be replaced with the appropriate access token.
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]}" ] }'