agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

Барлық agency-invoicing соңғы нүктелері

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Кілтте agency.invoicing.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Ұйымыңыздың идентификаторы орналасатын жер

Бұл соңғы нүкте сұрау параметрі ретінде org_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 консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған 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`.

Параметрлер

АтыTүріМіндеттіМазмұны
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…

Сұрау денесі

АтыTүріМіндеттіМазмұны
client_idUuidЖоқUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteЖоқ
currencystringЖоқ
issue_datestringЖоқ
due_datestringЖоқ
referencestringЖоқ
notesstringЖоқ
footerstringЖоқ
linesAgencyInvoiceLineWrite[]Жоқ

Жауап

АтыTүріМіндеттіМазмұны
idUuidИәUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringЖоқThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Иә
is_overduebooleanЖоқ⭐ 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_idUuidЖоқUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringЖоқ
currencystringИә
issue_datestringИә
due_datestringЖоқ
referencestringЖоқ
notesstringЖоқ
footerstringЖоқ
subtotal_minorintegerЖоқ
discount_minorintegerЖоқ
tax_minorintegerЖоқ
total_minorintegerИә
amount_paid_minorintegerЖоқ
amount_due_minorintegerЖоқ
tax_breakdownAgencyInvoiceTaxGroup[]Жоқ
sourcestringЖоқWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringЖоқ
last_sent_tostringЖоқ
paid_atstringЖоқ
void_reasonstringЖоқ
created_atstringЖоқ
linesAgencyInvoiceLine[]Жоқ
paymentsAgencyInvoicePayment[]Жоқ
portal_urlstringЖоқ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