Get bulk job results
Read each item's result from a match prediction bulk update job, one page at a time, once the job has finished.
- Method
- GET
- Path
https://api.returning.ai / v1/ match-predictions/ bulk-jobs/ {jobId}/ results - Permission
- matchPredictions
- Retries
- Read-only; poll at the Retry-After interval
When to use this
- Find the matches a bulk update couldn't change, and why.
- Record the new
versionof each match the job changed.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- matchPredictionsShown in the dashboard as “Match Prediction”
Use a Community API key with matchPredictions, shown in the dashboard as Match Prediction, and keep it on your server. The key decides the community: you only see and change match predictions in that community, and you can only read jobs created with a key from that community. Personal API keys are rejected with 403. A job from another community returns 404, the same as an unknown ID.
Behaviour#
api.returning.ai doesn't serve this route yet: requests return an empty 404. Ask Returning.AI before you build on it.
While the job is queued or processing, this returns 202 MATCH_PREDICTION_BULK_UPDATE_IN_PROGRESS with progress counts and a Retry-After header of 3 seconds, and no items. Once it has finished, it returns 200 with the item results. A failed job lists only the items it reached. Jobs are kept for 7 days.
Request#
Path parameters#
operationId from Bulk update match predictions.Rulempbu_ and 32 hex characters
Eg"mpbu_66f00000000000000000000000000802"
Query parameters#
Headers#
curl --request GET \
--url 'https://api.returning.ai/v1/match-predictions/bulk-jobs/mpbu_66f00000000000000000000000000802/results?status=failed' \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns one result per item. meta.total counts the items that match your status filter. For a VERSION_CONFLICT, read the match again before you retry the change.
Rulesuccess
RuleMATCH_PREDICTION_BULK_JOB_RESULTS_RETRIEVED
X-Request-Id if you sent one, otherwise a generated req_... ID. Quote it when you contact support.Rulecompleted, completed_with_errors or failed
Ruleupdated or failed
updated items.updated items.failed items.RuleMATCH_PREDICTION_NOT_FOUND, VERSION_CONFLICT, LOCKED_FIELDS_IMMUTABLE, SCHEDULE_MAY_NOT_MOVE_EARLIER, MATCH_PREDICTION_VALIDATION_FAILED or INTERNAL_ERROR
MATCH_PREDICTION_VALIDATION_FAILED, with field, code and message.{
"meta": {
"status": "success",
"statusCode": 200,
"code": "MATCH_PREDICTION_BULK_JOB_RESULTS_RETRIEVED",
"requestId": "req_66f00000000000000000000000000811",
"page": 1,
"limit": 100,
"total": 2
},
"message": "Bulk job results retrieved.",
"data": {
"jobId": "mpbu_66f00000000000000000000000000802",
"status": "completed_with_errors",
"items": [
{
"matchPredictionId": "mp_66f000000000000000000801",
"status": "updated",
"newVersion": 3,
"resourceUrl": "/v1/match-predictions/mp_66f000000000000000000801"
},
{
"matchPredictionId": "mp_66f000000000000000000807",
"status": "failed",
"error": {
"statusCode": 404,
"code": "MATCH_PREDICTION_NOT_FOUND",
"message": "Match prediction not found.",
"details": []
}
}
]
}
}
Errors#
Every error carries its code in meta.code and the request's ID in meta.requestId. Validation errors list each problem in details, with a field, code and message. The API key checks (401, 403, 404 COMMUNITY_NOT_FOUND and 500 AUTHENTICATION_FAILED) return detail and solution instead. A 404 with an empty body means the route isn't available on api.returning.ai yet.
Fix the request04
MATCH_PREDICTION_VALIDATION_FAILEDFix the requestpage below 1, limit outside 1-1,000, or a status other than updated or failed. details names it.AUTHENTICATION_REQUIREDFix the requestAuthorization: Bearer <API_KEY> with a current Community API key.API_KEY_PERMISSION_DENIEDFix the requestmatchPredictions, or it is a personal key. Use a Community API key and add Match Prediction in Settings > Integration > API Keys.Fix the data02
MATCH_PREDICTION_BULK_JOB_NOT_FOUNDFix the dataoperationId from Bulk update match predictions.COMMUNITY_NOT_FOUNDFix the dataRetry with backoff04
RATE_LIMITEDRetry with backoffRetry-After, then retry.INTERNAL_ERRORRetry with backoffAUTHENTICATION_FAILEDRetry with backoffMATCH_PREDICTION_FROZENRetry with backoff{
"meta": {
"status": "error",
"statusCode": 404,
"code": "MATCH_PREDICTION_BULK_JOB_NOT_FOUND",
"requestId": "req_66f00000000000000000000000000811"
},
"message": "Bulk job not found."
}