РазделСоздать счёт из сметы
На странице
Версия API v1

Справочник методов

POST /projects/{id}/invoices

Создать счёт из сметы

Scope: invoices:write

Авторизация — Authorization: Bearer rv_live_…; подробнее в аутентификации.

Запрос

curl -X POST "https://api.rentevio.ru/api/public/v1/projects/00000000-0000-0000-0000-000000000000/invoices" \
  -H "Authorization: Bearer rv_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: …" \
  -d '{
  "estimate_tab_id": "00000000-0000-0000-0000-000000000000",
  "client_id": "00000000-0000-0000-0000-000000000000",
  "firm_id": "00000000-0000-0000-0000-000000000000",
  "counterparty_id": "00000000-0000-0000-0000-000000000000",
  "due_date": "2026-10-01",
  "currency": "RUB",
  "notes": "string"
}'

Параметры

ПараметрТипОбязательныйОписание
idstringда—

Тело запроса

ПолеТипОбязательныйОписание
estimate_tab_idstringда—
client_idstringнет—
firm_idstringнет—
counterparty_idstringнет—
due_datestringнет—
currencystringнет—
notesstringнет—
{
  "estimate_tab_id": "00000000-0000-0000-0000-000000000000",
  "client_id": "00000000-0000-0000-0000-000000000000",
  "firm_id": "00000000-0000-0000-0000-000000000000",
  "counterparty_id": "00000000-0000-0000-0000-000000000000",
  "due_date": "2026-10-01",
  "currency": "RUB",
  "notes": "string"
}

Ответ

{
  "success": true,
  "data": {
    "id": "7c1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
    "project_id": "4fb49e36-d48d-419a-a13c-a805a5f02b8e",
    "estimate_tab_id": "",
    "number": "INV-2026-0042",
    "issue_date": "2026-11-01",
    "due_date": "2026-11-15",
    "client_id": "",
    "firm_id": "",
    "counterparty_id": "",
    "total_amount": 48000,
    "tax_amount": 8000,
    "amount_paid": 48000,
    "status": "paid",
    "currency": "RUB",
    "notes": "",
    "items": [],
    "created_at": "2026-11-01T10:00:00Z",
    "updated_at": "2026-11-05T12:00:00Z"
  }
}

Ошибки

КодHTTPКогда
VALIDATION400Некорректные параметры запроса
UNAUTHORIZED401Невалидный, отсутствующий, отозванный или истёкший API-ключ
FORBIDDEN403У ключа нет нужного scope
ДальшеСоздать документ проекта
Статья помогла?