Get Opportunity Failures

Returns the rows that failed processing for an opportunity batch job. Each failure entry includes the original row data alongside an ErrorMessage describing why the row could not be processed.

This endpoint is available once a job has reached a terminal status (partialcomplete or failed). Use the returned data to correct errors and re-upload the affected rows.

Headers:

AuthorizationstringRequired

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.

Path Parameters:

siteIdstringRequired

The unique identifier of the site.

jobIdstringRequired

The unique identifier for the batch job.

Query Parameters:

formatstring

The response format. Accepted values are csv (default) and json.

  • csv — Returns a downloadable CSV file containing the failed rows with an additional ErrorMessage column appended. The column order matches the original upload.
  • json — Returns a JSON array where each object contains the original row fields plus an errorMessage property.
Request
GET
{siteId}/opportunity/batch/{jobId}/failures?format=csv
curl -X GET \ 'https://rest.rulerapi.com/v1/{siteId}/opportunity/batch/{jobId}/failures?format=csv' \ -H 'Authorization: Bearer {your-access-token}'
Response
200 OK Content-Type: text/csv Content-Disposition: attachment; filename="opportunity-failures-{jobId}.csv" RowNumber,OpportunityDateTime,CurrencyCode,OpportunityValue,PipelineStage,RaId,EmailAddress,...,ErrorMessage 3,2024-01-15,GBP,abc,Proposal,ra-example-id,,,,,"'OpportunityValue' must be a valid number." 7,,,1000.00,Proposal,,,,,,"At least one visitor identifier must be provided."