BillOS v1
Console llms.txt OpenAPI
POST/businesses/{bid}/recurring/{id}/run

Run a plan now

POST /businesses/{bid}/recurring/{id}/run

Requires the documents scope.

Produces today's document (a draft, or an issued document with autoIssue) without moving the schedule. Idempotent for the day: a second call the same day finds the document the first one made. outcome is draft, issued or failed (with error).

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.
idstringrequiredRecurring plan id.

Response

201: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
outcomestringrequiredOne of: draft, issued, failed.
documentDocumentA draft is freely mutable. An issued document is immutable forever, blocked at the database engine, not merely in application code.
planRecurringPlanrequiredA template the scheduler turns into a draft (or an issued document, with autoIssue) every interval. Not a document: freely editable and deletable.
errorstring

Errors: 400, 401, 403, 404, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

POST /businesses/{bid}/recurring/{id}/run
curl -X POST "$BASE/businesses/$BID/recurring/$DOC_ID/run" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/recurring/${DOC_ID}/run`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/recurring/{DOC_ID}/run",
    headers={"X-Api-Key": KEY},
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.