agency-invoicing
POST /v1/agency-invoicing/invoices
Start a draft invoice.
ప్రమాణీకరణ
బీయర్ టోకెన్గా API కీని పంపండి. కీ తప్పనిసరిగా agency.invoicing.manage అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.
మీ సంస్థ ఐడీ ఎక్కడ ఉందో అక్కడ
ఈ ఎండ్పాయింట్ క్వరీ పారామీటర్గా org_idని తీసుకుంటుంది. దీనిని వదిలేస్తే కాల్ మీ మొత్తం టెనెన్సీ సబ్ట్రీని కవర్ చేస్తుంది; ఒకే సంస్థకు కాల్ని పరిమితం చేయడానికి దీన్ని పంపండి.
మీ సంస్థ ఐడి (organisation id) మీ డాష్బోర్డ్లోని API కీస్ స్క్రీన్పై, కీ పక్కనే ఉంటుంది. మీరు చేసే ప్రతి కాల్లోనూ ఇదే ఐడి ఉపయోగించబడుతుంది.
ప్రయత్నించండి
కోణీయ బ్రాకెట్లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్హోల్డర్ను మీ డాష్బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'సైన్ ఇన్ చేశారా? మీ డ్యాష్బోర్డ్లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ API ద్వారా ఆభ్యర్థనను రన్ చేస్తుంది. ఈ ఎండ్పాయింట్ను API కన్సోల్లో తెరిచండి
వివరాలు
Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.
పారామీటర్లు
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
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… |
అభ్యర్థన బాడీ
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
client_id | Uuid | కాదు | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client | AgencyClientWrite | కాదు | — |
currency | string | కాదు | — |
issue_date | string | కాదు | — |
due_date | string | కాదు | — |
reference | string | కాదు | — |
notes | string | కాదు | — |
footer | string | కాదు | — |
lines | AgencyInvoiceLineWrite[] | కాదు | — |
స్పందన
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
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,… |
ఈ ఎండ్పాయింట్ తిరిగి ఇవ్వగల లోపాలు
401 · 403 · 404 · 422 · 429