Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Feld im JSON-Body.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X POST https://api.zinndigital.com/v1/agency/time/schedules \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "trigger": <string<manual, on_log, day_of_month, threshold>> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
Idempotent by `(org, client)` — a second POST updates rather than creating a second row, because two schedules for one client is the arrangement that bills them twice. Four triggers: `manual` (on demand only), `on_log` (immediately, as time is logged), `day_of_month`, and `threshold` (when unbilled work reaches an amount). ⛔ `day_of_month` is 1–28, and that is not a limitation of the storage. A schedule set to the 31st would silently skip February, April, June, September and November — seven months a year in which the agency is not paid and nothing is red. "The end of the month" is expressed as 28.
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
client_id | string | Nein | — |
trigger | string<manual, on_log, day_of_month, threshold> | Ja | — |
day_of_month | integer | Nein | — |
threshold_minor | integer | Nein | — |
currency | string | Nein | — |
active | boolean | Nein | — |
org_id | string | Nein | — |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
id | string | Ja | — |
client_id | string | Nein | `null` is the organisation-wide DEFAULT, covering every client without a row of its own. A per-client row replaces it rather than layering on it. |
trigger | string<manual, on_log, day_of_month, threshold> | Ja | — |
day_of_month | integer | Nein | ⛔ 1–28. The 29th to the 31st do not exist in every month, so a schedule set to the 31st would silently skip five of them a year. |
threshold_minor | integer | Nein | — |
currency | string | Ja | — |
active | boolean | Ja | — |
next_run_at | string | Nein | — |
last_attempted_at | string | Nein | Stamped for every schedule the sweep REACHES, before its result is read — so a client whose invoice fails still leaves the front of the queue. |
last_succeeded_at | string | Nein | A SECOND column, deliberately: one column cannot serve as both the cursor the sweep advances and the signal a staleness alarm reads. |
last_error | string | Nein | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 422