agency-time
POST /v1/agency/time/entries
Log time.
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
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
project_id | string | Bəli | — |
task_id | string | Xeyr | — |
work_date | string | Bəli | — |
minutes | integer | Bəli | — |
description | string | Xeyr | — |
billable | boolean | Xeyr | — |
user_id | string | Xeyr | Log on somebody else's behalf. Requires agency.time.manage; without it a caller may only log their own time. |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Bəli | — |
user_id | string | Xeyr | — |
project_id | string | Bəli | — |
project_name | string | Xeyr | — |
task_id | string | Xeyr | — |
task_name | string | Xeyr | — |
client_id | string | Xeyr | — |
work_date | string | Bəli | — |
minutes | integer | Bə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_label | string | Bəli | Presentational only — never multiplied by anything. |
description | string | Xeyr | — |
billable | boolean | Bəli | — |
billing_run_id | string | Xeyr | The run that invoiced this entry. null means it is still outstanding. |
billed_rate_minor_per_hour | integer | Xeyr | — |
billed_amount_minor | integer | Xeyr | What 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_currency | string | Xeyr | — |
billed_under_fixed_price | boolean | Xeyr | TRUE 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_hour | integer | Xeyr | The 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_scope | string<task, project, client, org> | Xeyr | Which rate card won, so a surprising invoice can be explained. |
rate_kind | string<hourly, fixed> | Xeyr | — |
created_at | string | Bəli | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422