This endpoint accepts a CSV file containing multiple opportunity 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:
OpportunityDateTimestringRequiredThe date the opportunity was captured. Must be in one of the following ISO 8601 formats (UTC):
Must not be a future date.
CurrencyCodestringRequiredISO 4217 currency code for the opportunity value. E.g. GBP, USD, EUR.
OpportunityValuedecimalRequiredThe monetary value of the opportunity. Must be a valid number.
PipelineStagestringRequiredThe pipeline stage for the opportunity. E.g. Proposal, Negotiation.
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.
LabelstringAn opportunity label. 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).
ReferencestringA unique reference identifier for the opportunity 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=Spring"Label).OpportunityValue must be a valid number and must not be empty.OpportunityDateTime must match an accepted ISO 8601 format and must not be a future date.OpportunityDateTime 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}/opportunity/upload/batch' \ -H 'Authorization: Bearer {your-access-token}' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@/path/to/opportunities.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.