Invoice API

Managing outgoing invoices — retrieval, creation, modification, closing and NAV integration

Base URL

https://{tenant}.logzi.com/api/invoice/

The invoice endpoint manages outgoing invoices, advance invoices, manual invoices and payment requests. Every request returns a JSON response. On success result.code == 1, on error result.code == 0.

GET /api/invoice/get

Retrieves a single outgoing invoice by ID, with full details (items, partner, totals).

Query parameters

Parameter Type Required Description
id int Unique identifier of the invoice
identify string Can also be looked up by identifier (e.g. SZ-2024-0042)

Example request

GET /api/invoice/get?id=42
X-API-KEY: {your_api_key}

Example response

{
  "result": { "code": 1, "message": "success" },
  "data": {
    "id": 42,
    "identify": "SZ-2024-0042",
    "date_create": "2024-05-01 10:00:00",
    "date_perform": "2024-05-10",
    "date_pay": "2024-05-24",
    "status_id": 1,
    "partner_company_name": "Minta Kft.",
    "price_brutto": 127000,
    "price_netto": 100000,
    "price_tax": 27000,
    "currency_name": "HUF",
    "item": [
      {
        "product_id": 5,
        "quantity": 2,
        "price": 50000,
        "price_brutto": 63500
      }
    ]
  }
}
GET /api/invoice/list

Retrieves a paginated list of outgoing invoices, with filtering and sorting options.

Query parameters

Parameter Type Required Description
list_offset int Pagination offset (default: 0)
list_count int Number of results per page (default: 10)
list_sort[field] string Name of the field to sort by
list_sort[sort] string ASC or DESC
list_condition[identify] string Filter by identifier (LIKE)
list_condition[company_name] string Filter by partner name (LIKE)
list_condition[status_id] int Filter by status (1=open, 2=closed)
list_condition[date_create_from] date Creation date — from (YYYY-MM-DD)
list_condition[date_create_to] date Creation date — to (YYYY-MM-DD)
list_condition[partner_id] int Filter by partner ID

Example request

GET /api/invoice/list?list_offset=0&list_condition[status_id]=1
X-API-KEY: {your_api_key}

Example response

{
  "result": { "code": 1, "message": "success" },
  "data": [
    {
      "id": 42,
      "identify": "SZ-2024-0042",
      "date_create": "2024-05-01",
      "date_pay": "2024-05-24",
      "status_name": "Nyitott",
      "partner_company_name": "Minta Kft.",
      "price_brutto": 127000
    }
  ],
  "params": {
    "list_count": 10,
    "list_offset": 0,
    "list_all": 156
  }
}
POST /api/invoice/save

Creates or updates an outgoing invoice. For a new invoice use data[id] = 0, for an update provide the existing ID.

POST fields — data object

Field Type Required Description
id int 0 = new invoice, >0 = update
company_id int Company identifier
company_user_id int ID of the responsible staff member
company_address_id int Company site ID
currency_id int Currency identifier
date_perform date Performance date (YYYY-MM-DD)
partner_id int Partner/customer identifier
partner_shipping_id int Partner shipping address ID
date_pay date Payment due date (YYYY-MM-DD)
paymod_id int Payment method identifier
comment_top string Header comment shown on the invoice
comment_bottom string Footer comment shown on the invoice
jobnumber_id int Job number identifier
project_id int Project identifier
item array Array of line items — at least one item is required (see below)

Item fields — data[item][]

Field Type Required Description
product_id int Product identifier
quantity float Quantity
price float Net unit price
tax_id int VAT rate identifier
price_discount float Discount percentage
remove int 1 = remove the item when updating

POST fields — params object (optional)

Field Type Required Description
close int 1 = automatically close after saving
download int 1 = generate PDF after saving

Example request

POST /api/invoice/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "company_id": 1,
    "company_user_id": 3,
    "company_address_id": 1,
    "currency_id": 1,
    "partner_id": 12,
    "date_perform": "2024-06-15",
    "date_pay": "2024-06-29",
    "paymod_id": 2,
    "comment_top": "Köszönjük a megrendelést!",
    "item": [
      {
        "product_id": 5,
        "quantity": 2,
        "price": 50000,
        "tax_id": 2
      }
    ]
  },
  "params": {
    "close": 0,
    "download": 0
  }
}

Example response

{
  "result": { "code": 1, "message": "success" },
  "data": {
    "id": 43,
    "identify": "SZ-2024-0043"
  }
}
POST /api/invoice/delete

Deletes an outgoing invoice. Only an open invoice (status_id = 1) can be deleted.

POST fields — data object

Field Type Required Description
receipt_id int Identifier of the invoice to delete

Example request

POST /api/invoice/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "receipt_id": 42
  }
}

Example response

{
  "result": { "code": 1, "message": "success" },
  "data": {}
}
POST /api/invoice/close

Closes an open outgoing invoice. Closing finalizes the invoice and it may be reported to NAV (Online Invoice). Only an invoice with status_id = 1 (open) can be closed.

POST fields — data object

Field Type Required Description
receipt_id int Identifier of the invoice to close

Example request

POST /api/invoice/close
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "receipt_id": 42
  }
}

Example response

{
  "result": { "code": 1, "message": "success" },
  "data": {}
}
GET /api/invoice/download

Downloads/generates the invoice document in various formats (PDF, base64 string, stream).

Query parameters

Parameter Type Required Description
receipt_id int Identifier of the invoice
file_type string Output format (see below)
language string Name of the template language folder (e.g. hungarian)
language_id int Language identifier (for ID-based lookup)
template_id int Custom print template ID

file_type possible values

Value Description
pdf Returns a base64-encoded PDF with metadata
pdf-string Same as pdf — base64 string + metadata
pdf-string-sample Generates a preview PDF
stream Direct file stream (browser download)

Example request

GET /api/invoice/download?receipt_id=42&file_type=pdf
X-API-KEY: {your_api_key}

Example response (file_type=pdf)

{
  "result": { "code": 1, "message": "success" },
  "data": {
    "name": "SZ-2024-0042.pdf",
    "content": "JVBERi0xLjQK...",
    "receipt": { ... }
  }
}

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!