Delete Batch
Delete Batch
Batches can be deleted by making an HTTP DELETE request to the /batches/BATCH_ID endpoint (where BATCH_ID is the id of the Batch you wish to delete).
A Batch can only be deleted under certain condidtions.
- A batch cannot be deleted if it is currently running.
- A batch cannot be deleted if any results within it have a webhook_status of "failed", unless the force=true parameter is added to the request. If force=true is added to the request, then the batch will be deleted even if there are webhook failures.
To check whether a Batch is currently running use the Get BatchGet Batch endpoint.
To check whether a webhook has failed, use the Get Result SetGet Result Set endpoint.
Example
DELETE /batches/BATCH_ID
In the example below we delete a Batches with id=123456 :
$ curl -X DELETE "https://api.scaleserp.com/batches/123456?api_key=demo"Scale SERP responds with a JSON object confirming that the Batch has been deleted, or detailing the error if it has not been possible to delete the Batch:
{
"request_info": {
"success": true,
"message": "batch deleted"
}
}Example when webhook failed
DELETE /batches/BATCH_ID?force=true
In the example below we delete a Batches with id=123456 :
$ curl -X DELETE "https://api.scaleserp.com/live/batches/123456?api_key=demo&force=true"As above, Scale Serp responds with a JSON object confirming that the Batch has been deleted, or detailing the error if it has not been possible to delete the Batch:
{
"request_info": {
"success": true,
"message": "batch deleted"
}
}Next Steps Get Batches List Batches