Everything the app's Settings › Document Design screen holds, through one API family: the business's logo and the header and footer every document prints, each document type's own texts and fields, its print views, the line sections, and a preview to check the result before a customer sees it. A typical use: an onboarding tool that sets a new company's documents up in one go, or a branding sync from your own system.
https://app.linet.org.il/api/v2 with
Authorization: Bearer <login_id>.<secret> and
login-company: <company id>. Reading needs settings:read, writing
settings:write, and the key's user needs the right to edit document types (the
business texts, logo and sections also accept the Business Details right). The v2 print design and
the raw template layers are Pro and above (403 plan_required below
it); everything else is on every plan with API access.
GET https://app.linet.org.il/api/v2/document-design Full reference →
One read for the whole picture: the business part, the line sections and every document type with whether it has a header or footer of its own and the ids of its print views.
{
"company": {
"template": "classic", "default_engine": "v2",
"header": "", "footer": "<p>Bank Leumi 10-800-12345</p>",
"item_picture_rect": false,
"logo_url": "https://app.linet.org.il/site/largethumbnail/…",
"templates": ["classic", "newclassic", "cleanvoice", …],
"design": { "font": "sans", "color_accent": "#0b5cad", … }
},
"sections": [ { "id": 1, "label": "Parts" } ],
"types": [ { "id": 3, "name": "Invoice", "has_own_header": false, "has_own_footer": false, "print_views": [41] }, … ]
}
design is there only on Pro and above. templates lists what
template may be set to.
PATCH https://app.linet.org.il/api/v2/document-design/company Full reference →
Only the fields you send change. header and footer are HTML and
print on every document type that has none of its own, on both print
engines -- the place for bank details, terms or a registration line.
PATCH /api/v2/document-design/company
{
"footer": "<p>Bank transfer: Bank Leumi, branch 800, account 12345</p>",
"item_picture_rect": true,
"default_engine": "v2"
}
| Field | Means |
|---|---|
| template | The template a print view with none of its own prints in (one of templates). |
| default_engine | classic or v2: what a print view with no engine of its own prints with. A till slip stays classic. |
| header, footer | The default header and footer text, HTML. Placeholders such as %company_name% or %doc_docnum% are filled in. |
| item_picture_rect | true: item pictures print uncropped instead of square. |
| design | Pro and above: the v2 design's fields (page, font, colours, columns, totals…). See step 5. |
The logo has its own call, the image as base64 (PNG, JPEG, GIF or WebP, at most 2 MB):
PUT /api/v2/document-design/company/logo
{ "content": "iVBORw0KGgoAAAANSUhEUgAA…" }
DELETE /api/v2/document-design/company/logo # no logo
A field that is wrong is a 422 naming it, and nothing is saved:
{ "error": { "code": "validation_failed", "fields": { "default_engine": ["classic or v2"] } } }
PATCH https://app.linet.org.il/api/v2/document-design/types/{id} Full reference →
A receipt that should say thanks instead of showing bank details:
PATCH /api/v2/document-design/types/8
{
"footer": "<p>Thank you for your payment.</p>",
"custom_fields": { "order_ref": "not_printed" }
}
{
"id": 8, "name": "Receipt",
"header": null, "footer": "<p>Thank you for your payment.</p>",
"effective_header": null, "effective_footer": "<p>Thank you for your payment.</p>",
"custom_fields": { "order_ref": "not_printed" },
"print_views": [ { "id": 44, "name": "default", "engine": "v2", "default": true } ],
"mail_templates": [12], "sms_templates": []
}
null (or "") means "the company's": send
"footer": null to go back to the business footer. effective_*
is what actually prints.custom_fields is each document custom field (keys from
GET /documents/custom-fields) on this type: hidden,
shown, or not_printed (on the form, not on paper).POST https://app.linet.org.il/api/v2/document-design/types/{id}/print-views Full reference →
A print view is one way a type prints; every type has a default one and can
have more. Read a view first to see its column ids, then send the whole column list in the
order you want, each shown or not:
GET /api/v2/document-design/print-views/44
{ … "classic": { "copies": 1, "show_balance": false, …,
"line_columns": [ { "id": "det_name", "shown": true, "label": "Name" },
{ "id": "det_qty", "shown": true },
{ "id": "det_iItem", "shown": true }, … ] } }
POST /api/v2/document-design/types/2/print-views
{
"name": "no prices",
"classic": {
"copies": 2,
"line_columns": [ { "id": "det_name", "shown": true }, { "id": "det_qty", "shown": true },
{ "id": "det_iItem", "shown": false }, { "id": "det_iTotal", "shown": false } ]
}
}
PATCH /document-design/print-views/{id} changes name,
engine (classic / v2; v2 is Pro and above) and
classic -- only what you send. A name is unique within its type.DELETE removes a view; the type's default view is what it
prints with, so it answers 409 and keeps its name.On the v2 engine the look -- page, font, colours, line columns, totals -- is a template in the linet.print/1 spec, in layers: the built-in one, the company's, then each print view's. The common fields are on the company part:
PATCH /api/v2/document-design/company
{ "design": { "color_accent": "#7c3aed", "table_style": "zebra", "font": "serif" } }
For anything else, write the layers themselves. A PATCH is a JSON Merge Patch;
blocks merge by id. Send the hash you read as If-Match so you don't
overwrite a change made in the meantime (412 if one was):
GET /api/v2/document-design/company/layer # {layer, effective, hash}; ETag = hash PATCH /api/v2/document-design/company/layer If-Match: "3f2a9c0d1e8b7a65" { "blocks": [ { "id": "code", "remove": true } ] } PATCH /api/v2/document-design/print-views/45/layer # one view only, over the company's { "blocks": [ { "id": "totals", "remove": true } ] }
The header and footer text is never the layer's. It is the company's or
the type's (steps 2 and 3), the same text on both engines; a layer that sets
header.text or footer.text is a 422 invalid_template.
The layer still decides the footer's place: with footer.show_on: "every" the
type's footer prints at the bottom of every page.
These layer routes replaced /print-templates/* (2026-11-29).
PUT https://app.linet.org.il/api/v2/document-design/sections Full reference →
The groups a document's lines can be printed in -- "Parts" and "Labour" on a repair invoice. The whole list, in print order:
PUT /api/v2/document-design/sections
{ "data": [ { "id": 1, "label": "Parts" }, { "id": 2, "label": "Labour" } ] }
An id is a whole number from 1, unique in the list. Keep an id once lines use
it: changing it leaves those lines in no section.
A document line names its section in section, on
POST / PATCH /documents; lines without one print
first, in a table of their own:
POST /api/v2/documents
{ "type_id": 3, "account_id": 1042,
"lines": [ { "item_id": 17, "qty": 1, "unit_price": "80.00", "section": 1 },
{ "item_id": 1, "name": "Fitting, 2 hours", "qty": 2, "unit_price": "150.00", "section": 2 } ] }
POST https://app.linet.org.il/api/v2/document-design/preview Full reference →
POST /api/v2/document-design/preview
{ "type_id": 2, "print_view_id": 45 }
{ "html": "<!doctype html>…", "document_id": 9921, "number": "20417", "warnings": [] }
The type's latest document (or document_id) printed the way it would print now,
with the view you name. Nothing is stored, sent or counted as printed. A type with no
document yet answers {"empty": true}. Show the HTML in a sandboxed frame.
GET /document-design/types/{id} lists the ids of the type's
mail_templates and sms_templates. The templates themselves are their
own family, because they also serve payment requests and service calls:
/mail-templates and /sms-templates, each with an
entity_type_id -- 10 a document, 11 its payment
request (the pay link mailed on issue), 80 a service call -- and an
entity_id (the document type, or the service call's status).
Placeholders and previews: Message templates.
Every route, field and answer: API v2 › Document design.