agency-time

POST /v1/agency/time/billing-runs

Bill now — turn unbilled time into a draft invoice.

ਸਾਰੇ agency-time ਐਂਡਪੁਆਇੰਟ

ਪ੍ਰਮਾਣੀਕਰਨ

ਇੱਕ API ਕੁੰਜੀ ਨੂੰ ਬੀਅਰ ਟੋਕਨ ਵਜੋਂ ਭੇਜੋ। ਇਹ ਐਂਡਪੁਆਇੰਟ ਸਪੈਸੀਫਿਕੇਸ਼ਨ ਵਿੱਚ ਕਿਸੇ ਖਾਸ ਇਜਾਜ਼ਤ ਨੂੰ ਨਹੀਂ ਦਰਸਾਉਂਦਾ, ਇਸ ਲਈ ਆਪਣੀ ਕੁੰਜੀ ਨੂੰ ਘੱਟੋ-ਘੱਟ ਲੋੜੀਂਦੀਆਂ ਇਜਾਜ਼ਤਾਂ ਦਿਓ ਅਤੇ ਮੰਨਣ ਦੀ ਬਜਾਏ ਜਵਾਬ ਦੀ ਜਾਂਚ ਕਰੋ।

ਜਿੱਥੇ ਤੁਹਾਡੀ ਸੰਸਥਾ ਦੀ ਆਈਡੀ ਆਉਂਦੀ ਹੈ

ਇਹ ਐਂਡਪੁਆਇੰਟ JSON ਬਾਡੀ ਵਿੱਚ ਇੱਕ ਫੀਲਡ ਵਜੋਂ org_id ਲੈਂਦਾ ਹੈ।

ਤੁਹਾਡੀ ਸੰਸਥਾ ਦੀ ਆਈਡੀ ਤੁਹਾਡੇ ਡੈਸ਼ਬੋਰਡ 'ਤੇ API ਕੁੰਜੀਆਂ ਵਾਲੀ ਸਕ੍ਰੀਨ 'ਤੇ, ਕੁੰਜੀ ਦੇ ਬਿਲਕੁਲ ਨਾਲ ਮੌਜੂਦ ਹੈ। ਇਹ ਤੁਹਾਡੇ ਵੱਲੋਂ ਕੀਤੀ ਜਾਣ ਵਾਲੀ ਹਰ ਕਾਲ ਵਿੱਚ ਉਹੀ ਆਈਡੀ ਹੁੰਦੀ ਹੈ।

ਕੋਸ਼ਿਸ਼ ਕਰੋ

ਕੋਈ ਵੀ ਚੀਜ਼ ਜੋ ਕੋਣ ਵਾਲੇ ਬਰੈਕਟਾਂ ਵਿੱਚ ਹੈ ਉਸਨੂੰ ਆਪਣੇ ਖੁਦ ਦੇ ਮੁੱਲਾਂ ਨਾਲ ਬਦਲੋ, ਅਤੇ ਕੁੰਜੀ ਪਲੇਸਹੋਲਡਰ ਨੂੰ ਆਪਣੇ ਡੈਸ਼ਬੋਰਡ ਦੀ ਇੱਕ ਕੁੰਜੀ ਨਾਲ ਬਦਲੋ।

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

ਲੌਗ ਇਨ ਕੀਤਾ ਹੋਇਆ ਹੈ? ਤੁਹਾਡੇ ਡੈਸ਼ਬੋਰਡ ਵਿੱਚ API ਕੰਸੋਲ ਤੁਹਾਡੀ ਅਸਲ ਸੰਸਥਾ ਆਈਡੀ (organisation id) ਅਤੇ ਤੁਹਾਡੀ ਆਪਣੀ ਕੁੰਜੀ ਨੂੰ ਭਰਦਾ ਹੈ, ਅਤੇ ਲਾਈਵ API ਦੇ ਵਿਰੁੱਧ ਬੇਨਤੀ ਚਲਾਉਂਦਾ ਹੈ ਤਾਂ ਜੋ ਤੁਸੀਂ ਅਸਲ ਜਵਾਬ ਦੇਖ ਸਕੋ। API ਕੰਸੋਲ ਵਿੱਚ ਇਸ ਐਂਡਪੁਆਇੰਟ ਨੂੰ ਖੋਲ੍ਹੋ

ਵੇਰਵੇ

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.

ਬੇਨਤੀ ਬਾਡੀ

ਨਾਮਕਿਸਮਲਾਜ਼ਮੀਕੀ ਹੈ ਇਹ
client_idstringਹਾਂ
currencystringਹਾਂ
untilstringਨਹੀਂBill work up to and including this date — "everything to the end of last month".
notesstringਨਹੀਂ
org_idstringਨਹੀਂ

ਜਵਾਬ

ਨਾਮਕਿਸਮਲਾਜ਼ਮੀਕੀ ਹੈ ਇਹ
idstringਹਾਂ
client_idstringਨਹੀਂ
currencystringਹਾਂ
period_startstringਨਹੀਂ
period_endstringਨਹੀਂ
triggerstring<manual, on_log, day_of_month, threshold>ਹਾਂ
statusstring<claimed, invoiced, failed, released>ਹਾਂ`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_minorintegerਹਾਂOur own exact arithmetic, before tax. What the invoice is reconciled against.
minutes_totalintegerਹਾਂ
duration_labelstringਨਹੀਂ
entry_countintegerਨਹੀਂ
fixed_line_countintegerਨਹੀਂ
invoice_idstringਨਹੀਂ
invoice_numberstringਨਹੀਂ
invoice_createdbooleanਨਹੀਂ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>ਨਹੀਂ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_detailstringਨਹੀਂ
invoiced_atstringਨਹੀਂ
released_atstringਨਹੀਂ
last_errorstringਨਹੀਂ
created_atstringਹਾਂ
actualobjectਨਹੀਂ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.

ਇਹ ਐਂਡਪੁਆਇੰਟ ਜੋ ਗਲਤੀਆਂ ਵਾਪਸ ਕਰ ਸਕਦਾ ਹੈ

401 · 403 · 422