agency-time

POST /v1/agency/time/billing-runs

Bill now — turn unbilled time into a draft invoice.

Vituo vyote vya agency-time

Uthibitishaji

Tuma ufunguo wa API kama tokeni ya kubeba. Sehemu hii ya mwisho haitaji ruhusa maalum katika maelezo, kwa hivyo ipe ufunguo wako kiwango cha chini kabisa kinachohitajika na uangalie jibu badala ya kukisia.

Mahali ambapo kitambulisho cha shirika lako huwekwa

Sehemu hii ya mwisho inachukua org_id kama uwanja katika mwili wa JSON.

Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.

Jaribu

Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.

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> }'

Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API

Maelezo

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.

Mwili wa ombi

JinaAinaInayohitajikaKilicho hiki
client_idstringNdiyo
currencystringNdiyo
untilstringHapanaBill work up to and including this date — "everything to the end of last month".
notesstringHapana
org_idstringHapana

Majibu

JinaAinaInayohitajikaKilicho hiki
idstringNdiyo
client_idstringHapana
currencystringNdiyo
period_startstringHapana
period_endstringHapana
triggerstring<manual, on_log, day_of_month, threshold>Ndiyo
statusstring<claimed, invoiced, failed, released>Ndiyo`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_minorintegerNdiyoOur own exact arithmetic, before tax. What the invoice is reconciled against.
minutes_totalintegerNdiyo
duration_labelstringHapana
entry_countintegerHapana
fixed_line_countintegerHapana
invoice_idstringHapana
invoice_numberstringHapana
invoice_createdbooleanHapanaFALSE 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>HapanaWhether 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_detailstringHapana
invoiced_atstringHapana
released_atstringHapana
last_errorstringHapana
created_atstringNdiyo
actualobjectHapanaWhat 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.

Hitilafu ambazo mwisho huu unaweza kurudisha

401 · 403 · 422