agency-time

POST /v1/agency/time/schedules

Set a client's billing trigger.

ሁሉም የ agency-time ማጠናቀቂያ ነጥቦች

ማረጋገጫ

የኤፒአይ ቁልፍ (API key) እንደ ቢረር ቶከን (bearer token) ይላኩ። ይህ የመጨረሻ ነጥብ (endpoint) በመግለጫው ውስጥ የተወሰነ ፈቃድ አልገለጸም፣ ስለዚህ ከማሰብ ይልቅ ለቁልፍዎ የሚያስፈልገውን አነስተኛ ፈቃድ ይስጡት እና ምላሹን ያረጋግጡ።

የድርጅትዎ መታወቂያ የሚገባበት ቦታ

ይህ ማቆሚያ ነጥብ (endpoint) org_idን በJSON አካል ውስጥ እንደ ሜዳ ይወስዳል።

የድርጅትዎ መለያ ቁጥር (ID) በዳሽቦርድዎ ላይ በሚገኙት የኤፒአይ ቁልፎች (API keys) ማያ ገጽ ላይ ከቁልፉ አጠገብ ይገኛል። በሚያደርጉት እያንዳንዱ ጥያቄ ላይ የሚጠቀሙበት መለያ ቁጥር አንድ አይነት ነው።

ሞክሩት

በቅንፍ ውስጥ ያለውን ማንኛውንም ነገር በራስዎ እሴቶች ይተኩ፣ እና ቁልፍ ቦታ ያዢውን ከዳሽቦርድዎ በመጣ ቁልፍ ይተኩ።

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 ኮንሶል ውስጥ ይክፈቱ

ዝርዝሮች

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_idstringአይ
triggerstring<manual, on_log, day_of_month, threshold>አዎ
day_of_monthintegerአይ
threshold_minorintegerአይ
currencystringአይ
activebooleanአይ
org_idstringአይ

ምላሽ

ስምዓይነትየሚያስፈልግምንነቱ
idstringአዎ
client_idstringአይ`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.
triggerstring<manual, on_log, day_of_month, threshold>አዎ
day_of_monthintegerአይ⛔ 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_minorintegerአይ
currencystringአዎ
activebooleanአዎ
next_run_atstringአይ
last_attempted_atstringአይ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_atstringአይA SECOND column, deliberately: one column cannot serve as both the cursor the sweep advances and the signal a staleness alarm reads.
last_errorstringአይ

ይህ ማብቂያ ሊመልሳቸው የሚችሉ ስህተቶች

401 · 403 · 422