agency-time

POST /v1/agency/time/entries

Log time.

Bütün agency-time nöqtələri

Bütün tərtibatçı sənədləri

Doğrulama

API açarını bearer token kimi göndərin. Açar agency.time.log icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

curl -X POST https://api.zinndigital.com/v1/agency/time/entries \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": <string>, "work_date": <string>, "minutes": <integer> }'

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

minutes is an integer, 1..1440. Requires agency.time.log for your own time, or agency.time.manage to pass user_id and log on somebody else's behalf. If this client's billing schedule is "invoice straight away", logging arms it and starts the billing workflow immediately — the invoice is raised in seconds rather than at the next sweep, without the invoicing call ever sitting in this request.

Sorğu gövdəsi

AdTipTələb olunurNədir
project_idstringBəli
task_idstringXeyr
work_datestringBəli
minutesintegerBəli
descriptionstringXeyr
billablebooleanXeyr
user_idstringXeyrLog on somebody else's behalf. Requires agency.time.manage; without it a caller may only log their own time.

Cavab

AdTipTələb olunurNədir
idstringBəli
user_idstringXeyr
project_idstringBəli
project_namestringXeyr
task_idstringXeyr
task_namestringXeyr
client_idstringXeyr
work_datestringBəli
minutesintegerBəli⛔ An INTEGER of minutes. There is no hours field on this API: an hours-as-float duration re-enters the money through the rate and no rounding point can recover it.
duration_labelstringBəliPresentational only — never multiplied by anything.
descriptionstringXeyr
billablebooleanBəli
billing_run_idstringXeyrThe run that invoiced this entry. null means it is still outstanding.
billed_rate_minor_per_hourintegerXeyr
billed_amount_minorintegerXeyrWhat was actually charged, frozen at billing time so the document can be re-derived years later even if every rate card has since changed.
billed_currencystringXeyr
billed_under_fixed_pricebooleanXeyrTRUE when these minutes were rolled into a task's FIXED price rather than charged by the hour. billed_amount_minor is then 0 and that zero is correct — read this flag, not the…
rate_minor_per_hourintegerXeyrThe rate that WOULD apply, resolved against this entry's own work_date, for an entry not yet billed. ⛔ null means unpriced, not free: work with no rate card is never…
rate_scopestring<task, project, client, org>XeyrWhich rate card won, so a surprising invoice can be explained.
rate_kindstring<hourly, fixed>Xeyr
created_atstringBəli

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 422