agency-time
POST /v1/agency/time/billing-runs
Bill now — turn unbilled time into a draft invoice.
Ìfàṣẹ́pọ̀
Fi bọ́kì kọ́kọ́ (bearer token) ránṣẹ́ gẹ́gẹ́ bí àmì ìdánimọ̀ API. Ibùdó yìí kò sọ àṣẹ pàtó kan nínú àlàyé rẹ̀, nítorí náà fún kọ́kọ́ rẹ̀ ní ohun tó kéré jù lọ tí ó nílò kí o sì ṣàyẹ̀wò ìdáhùn náà dípò kí o kàn rò ó.
Ibùdó àmì ìdánimọ̀ ilé-iṣẹ́ rẹ sí
Ibi-iwọle yii n gba org_id gẹgẹ bi aaye ninu ara JSON naa.
Id àjọ rẹ wa lórí ojú-ìwákòòkò àwọn bọ́tìnnì API nínú daṣibọọdú rẹ, lẹ́gbẹ̀ẹ́ bọ́tìnnì náà gan-an. Ó jẹ́ ìd kan náà nínú gbogbo ìpè tí o bá ṣe.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
curl -X POST https://api.zinndigital.com/v1/agency/time/billing-runs \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "client_id": <string>, "currency": <string> }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
The owner's *"as well as sending on demand invoices"*. Claims the client's unbilled, priced work, hands it to the agency invoicing suite as a **draft**, and records what came back. ⛔ The entries are claimed in a committed transaction **before** the invoicing suite is called, so no other trigger can select them while the call is in flight. The idempotency key handed to the suite is derived from the sorted entry ids rather than minted, so a retry after a crash is given back the invoice that already exists instead of raising a second one for the same hours. `reconcile_state` is `ok` only when the invoice's total for these lines equals our own exact arithmetic. `mismatch` means do not send it.
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
client_id | string | Bẹẹni | — |
currency | string | Bẹẹni | — |
until | string | Bẹẹkọ | Bill work up to and including this date — "everything to the end of last month". |
notes | string | Bẹẹkọ | — |
org_id | string | Bẹẹkọ | — |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
id | string | Bẹẹni | — |
client_id | string | Bẹẹkọ | — |
currency | string | Bẹẹni | — |
period_start | string | Bẹẹkọ | — |
period_end | string | Bẹẹkọ | — |
trigger | string<manual, on_log, day_of_month, threshold> | Bẹẹni | — |
status | string<claimed, invoiced, failed, released> | Bẹẹni | `claimed` is the state between claiming the time and the invoicing suite's reply — a process that dies there leaves one, and the recovery pass finishes it with the same derived… |
subtotal_minor | integer | Bẹẹni | Our own exact arithmetic, before tax. What the invoice is reconciled against. |
minutes_total | integer | Bẹẹni | — |
duration_label | string | Bẹẹkọ | — |
entry_count | integer | Bẹẹkọ | — |
fixed_line_count | integer | Bẹẹkọ | — |
invoice_id | string | Bẹẹkọ | — |
invoice_number | string | Bẹẹkọ | — |
invoice_created | boolean | Bẹẹkọ | FALSE means the invoicing suite's idempotency key fired and handed back an invoice an earlier attempt had already raised. Surfaced rather than hidden: it is the observable that… |
reconcile_state | string<pending, ok, mismatch, unavailable> | Bẹẹkọ | Whether the invoice's total for these lines equals our own arithmetic **exactly**. There is no "close enough": both sides compute from the same two integers, so any difference i… |
reconcile_detail | string | Bẹẹkọ | — |
invoiced_at | string | Bẹẹkọ | — |
released_at | string | Bẹẹkọ | — |
last_error | string | Bẹẹkọ | — |
created_at | string | Bẹẹni | — |
actual | object | Bẹẹkọ | What this run actually consumed, derived from the time entries rather than read off the run's stored columns — so a divergence is visible on the screen. |
Awọn aṣiṣe ti ibudo ipari yii le da pada
401 · 403 · 422