agency-time
POST /v1/agency/time/schedules
Set a client's billing trigger.
പ്രമാണീകരണം
ബെയറർ ടോക്കണായി ഒരു 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 കൺസോൾ നിങ്ങളുടെ യഥാർത്ഥ ഓർഗനൈസേഷൻ ഐഡിയും നിങ്ങളുടെ സ്വന്തം കീയും പൂരിപ്പിക്കുകയും, യഥാർത്ഥ പ്രതികരണം (response) നിങ്ങൾക്ക് കാണുന്നതിനായി ലൈവ് API-ലേക്ക് അഭ്യർത്ഥന (request) പ്രവർത്തിപ്പിക്കുകയും ചെയ്യുന്നു. ഈ എൻഡ്പോയിന്റ് 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