Sandbox
Testmodus: Testdaten einspielen, zurücksetzen und die Test-Uhr vorstellen.
Test-mode sandbox: seed, reset, and advance the test clock.
Operationen
-
POST/sandbox/seedSeed the caller's sandbox (test mode) with a deterministic German dataset. -
POST/sandbox/test-clock/advanceFast-forward the sandbox clock, materializing all due runs. -
POST/sandbox/resetReset the sandbox to empty (optionally re-seed). TEST MODE ONLY. -
GET/sandbox/jobs/{id}Poll a sandbox seed/advance/reset job. TEST MODE ONLY.
Seed the caller's sandbox (test mode) with a deterministic German dataset.
POST /sandbox/seed
Sandbox Time Machine. Seeds a mid-cycle monthly subscription + a scheduled (deferred) invoice + a customer and sets the test clock to a fixed anchor, so a subsequent POST /sandbox/test-clock/advance materializes deterministic billing/issuance runs. Idempotent (a re-seed adds no duplicate). TEST MODE ONLY — a live key/session is rejected 409 sandbox_test_mode_only. Behind the sandbox time machine capability (default off ⇒ 404). Runs as an async job (202 + poll /sandbox/jobs/:id).
- Erforderlicher Scope
-
sandbox:write - Zugang
- API-Schlüssel oder angemeldete Sitzung
Antworten
-
202Seed job accepted (poll for completion).
application/jsonSandboxJob -
403Missing
sandbox:writescope (insufficient_scope). -
409Caller is not in test mode (
sandbox_test_mode_only).
Fast-forward the sandbox clock, materializing all due runs.
POST /sandbox/test-clock/advance
Fast-forward the sandbox clock to toDate, materializing all due subscription-billing and deferred-invoice runs (and their lifecycle webhooks) deterministically via the SAME idempotent run-billing/issue orchestrators the scheduling workers use — with an injected asOf in place of wall-clock. Forward-only. TEST MODE ONLY.
- Erforderlicher Scope
-
sandbox:write - Zugang
- API-Schlüssel oder angemeldete Sitzung
Request-Body erforderlich
application/json object
Antworten
-
202Advance job accepted (poll for the materialized sequence).
application/jsonSandboxJob -
400toDateis not strictly after the current clock (clock_cannot_rewind) or beyond the horizon cap (advance_horizon_exceeded). -
403Missing
sandbox:writescope. -
409Caller is not in test mode (
sandbox_test_mode_only) or the sandbox has not been seeded (sandbox_not_seeded).
Reset the sandbox to empty (optionally re-seed). TEST MODE ONLY.
POST /sandbox/reset
RLS-scoped wipe of the caller's deletable (entity, mode='test') fixtures + reset the clock to its anchor. Issued compliance documents are append-only (mode-independent) and are NOT deleted. Optional { reseed: true } re-seeds after the wipe. Live data can NEVER be reset by this path.
- Erforderlicher Scope
-
sandbox:write - Zugang
- API-Schlüssel oder angemeldete Sitzung
Request-Body optional
application/json object
Antworten
-
202Reset job accepted.
application/jsonSandboxJob -
403Missing
sandbox:writescope. -
409Caller is not in test mode (
sandbox_test_mode_only).
Poll a sandbox seed/advance/reset job. TEST MODE ONLY.
GET /sandbox/jobs/{id}
requested → running → done|failed plus the materialized document/webhook sequence in result. RLS-scoped: a cross-entity/mode job id is a 404.
- Erforderlicher Scope
-
sandbox:write - Zugang
- API-Schlüssel oder angemeldete Sitzung
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
id erforderlich | Pfad | string (uuid) |
Antworten
-
200The job state + result.
application/jsonSandboxJob -
404Not found (or not visible to this sandbox).
-
409Caller is not in test mode (
sandbox_test_mode_only).
Datenmodelle
Jedes Datenmodell dieser Gruppe einmal, mit allen Feldern – auch den verschachtelten. Verschachtelte Objekte sind aufklappbar; ein benannter Typ verweist auf seinen eigenen Abschnitt.
SandboxJob object
Async sandbox job (seed / advance / reset). Poll GET /sandbox/jobs/:id until state is done or failed. result carries the materialized document/webhook id sequence (advance) or the seed/reset summary. mode is always test by construction.
| Feld | Typ | Beschreibung |
|---|---|---|
id erforderlich | string (uuid) | |
kind erforderlich | string | Werte: "seed", "advance", "reset" |
state erforderlich | string | Werte: "requested", "running", "done", "failed" |
mode erforderlich | string | Werte: "test" |
toDate | string (date) | null | |
result | object | null | Job-kind-specific outcome (materialized sequence / seed / reset summary). |
lastError | string | null | |
createdAt erforderlich | string (date-time) | |
updatedAt erforderlich | string (date-time) |
Verwendet von:
POST /sandbox/seed , POST /sandbox/test-clock/advance , POST /sandbox/reset , GET /sandbox/jobs/{id}
Nach oben · Alle Ressourcengruppen · OpenAPI-Spezifikation (YAML)