Evenbead docs

Recurring

6 operations. All areas

POST/v1/recurring-templates

Schedule a recurring invoice or bill. Nothing posts until the schedule is run; each occurrence then goes through the same governance as any invoice or bill, once per date.

  • Operation createRecurringTemplate
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Request body
  • name string, required
  • kind "invoice" | "bill", required
  • frequency "weekly" | "monthly" | "quarterly" | "yearly", required
  • interval_count integer Every N weeks/months/quarters/years (default 1)
  • start_date string, required The first occurrence; months clamp to the month end
  • end_date string Calendar date, YYYY-MM-DD.
  • request object, required
Responses
  • 201 Created (object)
  • Errors 400, 401, 403, 409, 422, 429, 500 (Error: error.type, message)

GET/v1/recurring-templates

Recurring templates with their next occurrence

  • Operation listRecurringTemplates
  • Scope: read
  • Read
Parameters
  • active query, boolean
Responses
  • 200 Templates (object)
  • Errors 400, 401, 403, 429, 500 (Error: error.type, message)

GET/v1/recurring-templates/{id}

A recurring template with every occurrence generated so far

  • Operation getRecurringTemplate
  • Scope: read
  • Read
Parameters
  • id path, string, required
Responses
  • 200 Template (object)
  • Errors 400, 401, 403, 404, 429, 500 (Error: error.type, message)

POST/v1/recurring-templates/{id}/update

Pause or resume a template, or change its end date (anything else: a new template)

  • Operation updateRecurringTemplate
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • active boolean
  • end_date string | null Calendar date, YYYY-MM-DD.
  • reason string
Responses
  • 200 Updated (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/recurring-templates/{id}/run

Generate every occurrence due through a date (default: the server's today) that has not been generated yet, through the governed path (agents: within policy it posts, else a proposal). Idempotent per occurrence. dry_run previews.

  • Operation runRecurringTemplate
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Parameters
  • id path, string, required
Request body
  • through string Calendar date, YYYY-MM-DD.
  • dry_run boolean
Responses
  • 200 Occurrences generated, queued or refused (or previewed) (RecurringRunResult)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)

POST/v1/recurring/run

Run every active recurring template through a date (default: the server's today): what a scheduler agent calls daily

  • Operation runDueRecurring
  • Scope: propose
  • Write: needs Idempotency-Key (or dry_run)
Request body
  • through string Calendar date, YYYY-MM-DD.
  • dry_run boolean
Responses
  • 200 Per template (object)
  • Errors 400, 401, 403, 409, 422, 429, 500 (Error: error.type, message)