Skip to content

API – Price quotes and delivery notes

Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() function is in the chapter API. Permissions and licence are the same as for outgoing invoices.

Document type doc_type: 1 price quote, 2 delivery note. Status doc_status: 1 draft, 2 sent, 3 accepted (quote) / delivered (delivery note), 4 rejected; the response also has status, where 5 means an expired quote (sent, past valid_until). If you do not send a number, the system fills it in (CP… / DL…).

GET /api/sales-documents

Parameter Type Required Description
doc_type integer no 1 or 2, default 1
page, limit integer no default 1 and 20
search string no number, customer, subject, company ID
status integer no 1–5
customer_id, project_id, order_id, contract_id integer no
year integer no by issue date
sort_by, sort_order string no doc_number, customer_company, issue_date, doc_total_with_vat, … / ASC, DESC

Without the "View all" permission the list and all other reads return only your own documents.

$res = innovanet('GET', '/api/sales-documents?doc_type=1&status=2');

Response 200: data.documents[] (doc_id, doc_number, status, customer_company, issue_date, valid_until, doc_total, doc_total_with_vat, …), data.counts (number of documents per status) and data.pagination.

GET /api/sales-documents/{id}

Document detail: header (document), items (with row totals), vat_details, totals, company, links (project, order, contract, parent, children, invoice), history, attachments, allowed_actions.

POST /api/sales-documents

$res = innovanet('POST', '/api/sales-documents', [
    'doc_type' => 1,
    'customer_id' => 120,                 // company_id from the address book; address and IDs are copied into the document
    'issue_date' => '2026-11-16',
    'valid_until' => '2026-12-16',        // for a delivery note use delivery_date instead
    'doc_subject' => 'Website',
    'items' => [
        ['item_subject' => 'Design', 'item_pcs' => 8, 'item_unit' => 'h', 'item_unitprice' => 60, 'item_discount' => 10, 'item_vat' => 23],
    ],
]);

Optional fields: doc_number, currency_id, project_id, order_id, contract_id (only records you may see), doc_note (opening text), doc_closing_text, doc_reference1, doc_reference2 and overrides of the customer snapshot (customer_company, customer_address_1, …). Item: item_subject (required), item_desc, item_pcs, item_unit, item_unitprice, item_discount (%), item_vat (%). The server calculates the totals; each row is rounded to cents as with invoices.

Response 201: {"success": true, "data": {"doc_id": 12, "doc_number": "CP20260001"}}. A duplicate number returns 409, invalid input 422.

Changes and actions

Path Description
PUT /api/sales-documents/{id} edit (same fields as on create; items replaces all items); only a draft or sent document without an invoice
PUT /api/sales-documents/{id}/links project_id, order_id, contract_id – linking also on a closed document; a quote only refers to an order, nothing is rewritten
DELETE /api/sales-documents/{id} delete a draft
POST /api/sales-documents/{id}/action {"action": "send" \| "accept" \| "reject" \| "deliver" \| "reopen", "comment": "…"} as listed in allowed_actions
POST /api/sales-documents/{id}/delivery-note creates a delivery note with a copy of the items from a sent or accepted quote
POST /api/sales-documents/{id}/invoice {"invoice_type": 1 \| 2, "invoice_date": "…", "due_date": "…"} issues an invoice or a proforma invoice; once per document; needs the right to issue invoices
GET /api/sales-documents/{id}/pdf?language=sk\|cs\|en PDF (/pdf/download downloads it)
POST /api/sales-documents/{id}/send-email {"emails": ["a@b.com"], "language": "en", "subject": "…", "body": "…"} sends the PDF by e-mail (at most 10 addresses)
POST /api/sales-documents/{id}/attachments attachment (multipart, field file); GET / DELETE /api/sales-documents/{id}/attachments/{attachmentId}
GET /api/sales-documents/next-number?doc_type=1 suggested next number
GET /api/sales-documents/permissions can_view_all, can_create, …
GET /api/sales-documents/available-years?doc_type=1 years (by issue date) with documents you can see

E-mail template: GET /api/sales-documents/email-template?doc_type=1&language=en; change (PUT, administrator or financial manager only, not with an API token).