Approve a planned batch
Releases a search plan and lets the harvest run.
POST
https://api.easydata.win/v1/batches/{id}/approveReleases 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 #
| Field | Type | Notes |
|---|---|---|
idrequired | path | The batch id. |
Call it #
curl -X POST "https://api.easydata.win/v1/batches/{id}/approve" \
-H "X-API-Key: $API_KEY"Response #
{
"data": { "batch_id": "afec9131-080b-4b96-b3bb-726249e4bbf8", "status": "processing", "...": "Batch" },
"meta": { "requestId": "req_8f2ka91x" }
}Errors #
| Status | Type | When |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, revoked or expired key. Never metered. |
| 404 | not_found | No such batch. |
| 409 | conflict | Nothing is waiting for approval, the plan has expired, or the batch has already finished. The message says which. |
| 402 | insufficient_credits | The balance will not cover what the plan quoted. |
Every failure uses the same envelope, and none of them is metered - see Errors.