agency-invoicing

PATCH /v1/agency-invoicing/invoices/{invoiceId}

Edit a draft invoice.

Све agency-invoicing крајње тачке

Сва документација за програмере →

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

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу agency.invoicing.manage; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.

Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли

Детаљи

⛔ A 409 means the invoice has been issued and its figures are frozen. A sent invoice is a document your client is holding — void it and issue a replacement rather than restating it. 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…

Тело захтева

НазивТипОбавезноШта је ово
currencystringНе—
issue_datestringНе—
due_datestringНе—
referencestringНе—
notesstringНе—
footerstringНе—
linesAgencyInvoiceLineWrite[]Не—

Одговор

НазивТипОбавезноШта је ово
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 has…
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 · 409 · 422 · 429