تصدیقهویت
د بیارر ټوکن په توګه یو API کي وسپارئ. دا پای ټکی په مشخصاتو کې کوم ځانګړی اجازه لیک نه بیانوي، نو خپل کیلي ته لږترلږه هغه څه ورکړئ چې ورته اړتیا لري او د فرض کولو پر ځای ځواب وپلټئ.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د JSON په متن کې د یوې ساحې په توګه org_id اخلي.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
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>> }'ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ
تفصیلات
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.
د غوښتنې بدن
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
client_id | string | نه | — |
trigger | string<manual, on_log, day_of_month, threshold> | هو | — |
day_of_month | integer | نه | — |
threshold_minor | integer | نه | — |
currency | string | نه | — |
active | boolean | نه | — |
org_id | string | نه | — |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
id | string | هو | — |
client_id | string | نه | `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> | هو | — |
day_of_month | integer | نه | ⛔ 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 | نه | — |
currency | string | هو | — |
active | boolean | هو | — |
next_run_at | string | نه | — |
last_attempted_at | string | نه | 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 | نه | 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 | نه | — |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 422