agency-time

POST /v1/agency/time/billing-runs

Bill now — turn unbilled time into a draft invoice.

Gbogbo àwọn agency-time endpoints

Ì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ọIruTí a nílòKini o jẹ
client_idstringBẹẹni
currencystringBẹẹni
untilstringBẹẹkọBill work up to and including this date — "everything to the end of last month".
notesstringBẹẹkọ
org_idstringBẹẹkọ

Idahun

OrúkọIruTí a nílòKini o jẹ
idstringBẹẹni
client_idstringBẹẹkọ
currencystringBẹẹni
period_startstringBẹẹkọ
period_endstringBẹẹkọ
triggerstring<manual, on_log, day_of_month, threshold>Bẹẹni
statusstring<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_minorintegerBẹẹniOur own exact arithmetic, before tax. What the invoice is reconciled against.
minutes_totalintegerBẹẹni
duration_labelstringBẹẹkọ
entry_countintegerBẹẹkọ
fixed_line_countintegerBẹẹkọ
invoice_idstringBẹẹkọ
invoice_numberstringBẹẹkọ
invoice_createdbooleanBẹẹ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_statestring<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_detailstringBẹẹkọ
invoiced_atstringBẹẹkọ
released_atstringBẹẹkọ
last_errorstringBẹẹkọ
created_atstringBẹẹni
actualobjectBẹẹ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