agency-invoicing
PATCH /v1/agency-invoicing/profile
Change your invoicing identity or defaults.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение agency.invoicing.manage; ключ без него отклоняется с кодом 403, а не 404.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
⛔ `next_number` is deliberately NOT settable. Rewinding a sequence would mint a duplicate number for a document already in a client's hands; advancing it leaves a gap a tax authority will ask about. 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… |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
business_name | string | Нет | — |
address | string | Нет | — |
email | string | Нет | — |
phone | string | Нет | — |
website | string | Нет | — |
tax_number_label | string | Нет | — |
tax_number | string | Нет | — |
payment_instructions | string | Нет | — |
logo_sha256 | string | Нет | — |
accent_colour | string | Нет | — |
default_currency | string | Нет | — |
default_payment_terms_days | integer | Нет | — |
default_footer | string | Нет | — |
default_notes | string | Нет | — |
number_prefix | string | Нет | — |
number_padding | integer | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
business_name | string | Нет | — |
address | string | Нет | The registered address, one line per newline. Free-form because address shape is a property of a country, not of our schema. |
email | string | Нет | — |
phone | string | Нет | — |
website | string | Нет | — |
tax_number_label | string | Нет | What the agency calls its tax registration — "VAT number", "ABN", "GSTIN", "EIN". ⛔ Printed only when the number is set too: a label with no number is an empty row, and a number… |
tax_number | string | Нет | — |
payment_instructions | string | Нет | Bank details or a "PayPal me at …" line, printed on the document verbatim and shown on the payment page. ⭐ Never translated — translating a payment instruction is not a safe act. |
logo_sha256 | string | Нет | A digest into the content-addressed logo store, never a URL. That is what lets the PDF inline the mark with no network call at render time. |
accent_colour | string | Нет | — |
default_currency | string | Да | — |
default_payment_terms_days | integer | Нет | — |
default_footer | string | Нет | — |
default_notes | string | Нет | — |
number_prefix | string | Да | — |
number_padding | integer | Нет | — |
next_number | integer | Да | The next sequence number. ⛔ Read-only. Rewinding it would mint a duplicate number for a document already in a client's hands. |
next_number_preview | string | Нет | What the next invoice will be called, e.g. `INV-0042`. |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422 · 429