This endpoint accepts a CSV file containing multiple revenue records and processes them asynchronously. The request returns immediately with a jobId that can be used to track progress and retrieve results.
The CSV is validated server-side before the job is created. If validation fails, a 400 response is returned with detailed row-level errors — no job is created and nothing is stored.
AuthorizationstringRequiredThe 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.
Content-TypestringRequiredMust be multipart/form-data. The CSV file should be submitted as a form file part.
The CSV file must include a header row. The following columns are supported:
RevenueClosedDatestringRequiredThe date the revenue was closed. Must be in one of the following ISO 8601 formats (UTC):
Must not be a future date.
CurrencyCodestringRequiredISO 4217 currency code for the revenue value. E.g. GBP, USD, EUR.
ValuedecimalRequiredThe monetary value of the revenue record. Must be a valid number.
Visitor Identifiers (at least one required)
At least one of the following must be provided per row.
RaIdstringThe Ruler Analytics visitor ID.
EmailAddressstringThe visitor's email address.
PhoneNumberstringThe visitor's phone number.
PayloadValuestringA custom payload identifier value.
LeadDatestringThe date the lead was originally captured. Must be in the same ISO 8601 format as RevenueClosedDate and must not be a future date.
LabelstringRequiredA revenue label. At least one Label column must be provided in the header. This column may appear multiple times in the header to attach several labels to a single row (e.g. two Label columns for Deal and Inbound).
ReferencestringRequiredA unique reference identifier for the revenue record.
AdditionalDataPropertiesstringCustom key-value properties. Each entry uses the format Name=X,Value=Y. Separate multiple entries with a semicolon:
Name=Source,Value=Google;Name=Campaign,Value=SpringLabel).Value must be a valid number and must not be empty.Label column must be present.RevenueClosedDate combination are flagged as duplicates.AdditionalDataProperties must follow the Name=X,Value=Y format if provided.curl -X POST \ 'https://rest.rulerapi.com/v1/{siteId}/revenue/upload/batch' \ -H 'Authorization: Bearer {your-access-token}' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@/path/to/revenue.csv'
202 Accepted
{
"jobId": "{{jobId}}"
}The job is processed asynchronously. Use the returned jobId to poll GET /{siteId}/batch/{jobId}/status until the status is complete, partialcomplete, or failed.