agency-time

POST /v1/agency/time/billing-runs

Bill now — turn unbilled time into a draft invoice.

सबै agency-time इन्डपइन्टहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।

तपाईंको संस्थाको आइडी राख्ने ठाउँ

यो इन्डपोटले JSON बडीमा एक फिल्डको रूपमा org_id लिन्छ।

तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

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 कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ 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