Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. Ez a végpont nem határoz meg konkrét jogosultságot a specifikációban, ezért adja meg a kulcsnak a legkevesebbet, amire szüksége van, és a feltételezés helyett ellenőrizze a választ.
A szervezet azonosítójának helye
Ez a végpont a org_id mezőt várja a JSON törzsben.
A szervezeted azonosítója a vezérlőpult API-kulcsok képernyőjén található, közvetlenül a kulcs mellett. Ez ugyanaz az azonosító minden indított hívásban.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
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>> }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
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.
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
client_id | string | Nem | — |
trigger | string<manual, on_log, day_of_month, threshold> | Igen | — |
day_of_month | integer | Nem | — |
threshold_minor | integer | Nem | — |
currency | string | Nem | — |
active | boolean | Nem | — |
org_id | string | Nem | — |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | string | Igen | — |
client_id | string | Nem | `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> | Igen | — |
day_of_month | integer | Nem | ⛔ 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 | Nem | — |
currency | string | Igen | — |
active | boolean | Igen | — |
next_run_at | string | Nem | — |
last_attempted_at | string | Nem | 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 | Nem | 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 | Nem | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 422