agency-time

POST /v1/agency/time/billing-runs

Bill now — turn unbilled time into a draft invoice.

Tous les points de terminaison agency-time

Authentification

Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.

Où insérer l'ID de votre organisation

Cet endpoint prend org_id comme champ dans le corps JSON.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
client_idstringOui
currencystringOui
untilstringNonBill work up to and including this date — "everything to the end of last month".
notesstringNon
org_idstringNon

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
client_idstringNon
currencystringOui
period_startstringNon
period_endstringNon
triggerstring<manual, on_log, day_of_month, threshold>Oui
statusstring<claimed, invoiced, failed, released>Oui`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_minorintegerOuiOur own exact arithmetic, before tax. What the invoice is reconciled against.
minutes_totalintegerOui
duration_labelstringNon
entry_countintegerNon
fixed_line_countintegerNon
invoice_idstringNon
invoice_numberstringNon
invoice_createdbooleanNonFALSE 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>NonWhether 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_detailstringNon
invoiced_atstringNon
released_atstringNon
last_errorstringNon
created_atstringOui
actualobjectNonWhat 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.

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422