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:
CurrencyCode
stringRequiredThe appropriate currency code used for the value. This should be in ISO 4217 format. E.g. GBP
Value
intRequiredThe value of the revenue.
RevenueClosedDate
stringRequiredThe date and time the revenue was captured. Must be in one of the ISO 8601 formats:
LeadDate
stringThis can be empty or Must be in oe of the ISO 8601 formats:
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: EmailAddress, PhoneNumber, RaId, PayloadValue, CookieValue
Value
stringRequiredThe value for the visitor identifier.
Labels
Array(string)RequiredRevenue Labels, at least one should be set
Reference
stringRequiredA unique reference for the opportunity
AdditionalDataProperties
ArrayAn array of additional data properties. Each item in the array should include the following parameters:
Name
stringRequiredThe name key for the property, this can be set to anything
Value
stringRequiredThe value for the named property.
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/{siteId}/revenue/upload' \ -H 'Authorization: Bearer {your-access-token}' \ -H 'Content-Type: application/json' \ -d '{ "CurrencyCode": "{currencyCode}", "Value": "{value}", "RevenueClosedDate": "{closedDate}", "LeadDate": "{leadDate}", "VisitorIdentifierOptions": [ { "Key": "{key}", "Value": "{value}" } ], "Labels": [ "{labels[0]}", "{labels[1]}" ], "Reference": "{reference}", "AdditionalDataProperties": [ { "Name": "{name}", "Value": "{value}" } ] }'