Batch Jobs

What are Batch Jobs?

Batch Jobs allow you to upload large volumes of data to Ruler Analytics asynchronously via CSV file. Rather than sending records one at a time through the standard endpoints, you submit a single file and Ruler processes each row in the background.

Once submitted, you receive a jobId immediately. You can use this to poll the job status and, when processing is complete, retrieve any rows that failed.

How does it work?
  1. Upload a CSV file to the relevant batch upload endpoint. The file is validated immediately — if there are structural errors, a 400 response is returned with details and no job is created.
  2. If validation passes, a 202 Accepted response is returned containing a jobId.
  3. Poll GET /{siteId}/batch/{jobId}/status until the status reaches a terminal state: complete, partialcomplete, or failed.
  4. If the status is partialcomplete or failed, retrieve the failed rows via GET /{siteId}/batch/{jobId}/failures. Correct the errors and re-upload the affected rows.
Job Statuses
  • pending — job created, waiting to begin processing
  • processing — rows are actively being processed
  • complete — all rows processed successfully
  • partialcomplete — processing finished but some rows failed; at least one row succeeded
  • failed — the entire job failed, either because all rows failed or a fatal error occurred (e.g. file could not be read, file was empty)
Supported Batch Job Types
  • Revenue — upload closed revenue records matched to visitor journeys
Getting Started

Browse the endpoints in the navigation menu to get started. For revenue uploads, begin with Upload Revenue Batch to understand the CSV format and validation rules.

If you experience any issues, please contact support@ruleranalytics.com.