agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग agency.invoicing.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
तपाईंको संस्थाको आइडी राख्ने ठाउँ
यो इन्डपोइन्टले org_id लाई क्वेरी प्यारामिटरको रूपमा लिन्छ। यसलाई छुटाउनुभयो भने कलले तपाईंको सम्पूर्ण टेनेन्सी सबट्रीलाई समेट्छ; यसलाई एउटा संस्थामा मात्र सीमित गर्न पठाउनुहोस्।
तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. Requires `agency.invoicing.manage`.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
invoiceId (path) | Uuid | हुन्छ | — |
org_id (query) | Uuid | हैन | Which of your organizations is invoicing. Required only when you belong to more than one — otherwise it is inferred from your DIRECT membership, never from the subtree-expanded… |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
to | string | हैन | Where to send it. Defaults to the client's stored email. |
locale | string | हैन | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | हैन | A covering line to put above the amount. |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | हैन | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | हुन्छ | — |
is_overdue | boolean | हैन | ⭐ DERIVED from the due date and the status, never stored — so there is no sweep to maintain a flag and nothing to go stale. A draft is never overdue however old it is: nobody ha… |
client_id | Uuid | हैन | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | हैन | — |
currency | string | हुन्छ | — |
issue_date | string | हुन्छ | — |
due_date | string | हैन | — |
reference | string | हैन | — |
notes | string | हैन | — |
footer | string | हैन | — |
subtotal_minor | integer | हैन | — |
discount_minor | integer | हैन | — |
tax_minor | integer | हैन | — |
total_minor | integer | हुन्छ | — |
amount_paid_minor | integer | हैन | — |
amount_due_minor | integer | हैन | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | हैन | — |
source | string | हैन | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | हैन | — |
last_sent_to | string | हैन | — |
paid_at | string | हैन | — |
void_reason | string | हैन | — |
created_at | string | हैन | — |
lines | AgencyInvoiceLine[] | हैन | — |
payments | AgencyInvoicePayment[] | हैन | — |
portal_url | string | हैन | The payment link to send to the client. ⛔ Returned on a SINGLE-invoice read only, never in a list: a list is the thing that gets logged, cached and pasted into a support ticket,… |
sent_to | string | हैन | — |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 404 · 409 · 422 · 429 · 503