Approve a planned batch

Releases a search plan and lets the harvest run.

POSThttps://api.easydata.win/v1/batches/{id}/approve
free

Releases a /sales/search/deep plan. Everything on the batch waiting for approval starts; everything else is untouched.

The credit check happens here and could not have happened at submit: what a planned run costs is not known until the plan exists. A batch whose plan you have read and whose balance will not cover it answers 402 rather than starting and dying halfway through.

Free. It starts work; it is not work.

Request #

FieldTypeNotes
idrequiredpathThe batch id.

Call it #

cURL
curl -X POST "https://api.easydata.win/v1/batches/{id}/approve" \
  -H "X-API-Key: $API_KEY"

Response #

JSON
{
  "data": { "batch_id": "afec9131-080b-4b96-b3bb-726249e4bbf8", "status": "processing", "...": "Batch" },
  "meta": { "requestId": "req_8f2ka91x" }
}

Errors #

StatusTypeWhen
401invalid_api_keyMissing, malformed, revoked or expired key. Never metered.
404not_foundNo such batch.
409conflictNothing is waiting for approval, the plan has expired, or the batch has already finished. The message says which.
402insufficient_creditsThe balance will not cover what the plan quoted.

Every failure uses the same envelope, and none of them is metered - see Errors.