Get

[POST] .../v1/docinvoice/get

Returns invoice documents. Use this method to list invoice documents before opening a header, reading InvoiceOperation lines, locking for edits, posting, sending through EDI or importing related provider data. The response returns paged DocInvoice records with next_offset and total; filters are id, contract_id, firm_id, partner_id, attached_user_id, invoice_type, external_code, vat_calculation_type, performed, blocked, deleted_mark, date and search. date GreaterOrEqual maps to the start boundary and date LessOrEqual maps to the end boundary. Typical workflow is DocInvoice/Get -> DocInvoice/Lock -> InvoiceOperation/Get or Add/Edit/Delete -> DocInvoice/Perform -> DocInvoice/Send. The current request user must have invoice select permission; missing body, denied access, invalid filters or sort_orders, tariff restrictions, database failures or persistent lookup errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.
limit Int32 Optional Maximum number of records to return. Values above the configured query limit are replaced by the server query limit.
offset Int32 Optional Offset from the beginning of the result set. Negative values are treated as 0.
search String Optional Search by invoice code, partner name or TIN, firm name or TIN, contract code and responsible user full name. Search is applied only when the trimmed term is longer than the server search threshold.
sort_orders Array of DocInvoiceColumn Optional Output parameter sorting.

Filterable Fields

Field Type Description
attached_user_id int Responsible user IDs.
blocked bool Indicates whether the document is locked: true - locked, false - not locked.
contract_id int Contract IDs.
date int
deleted_mark bool Indicates whether the document is marked for deletion: true - marked for deletion, false - not marked.
end_date int Period end date as Unix time in seconds. The tariff display-period filter validates the requested and returned period.
external_code string External document code or ID.
firm_id int Company IDs.
id int Invoice ID array.
invoice_type string Invoice document type: Income - incoming invoice, Outcome - outgoing invoice, Corrective - corrective invoice.
partner_id int Partner IDs.
performed bool Indicates whether the document is posted: true - posted, false - not posted.
start_date int Period start date as Unix time in seconds. The tariff display-period filter can clamp a missing start date for broad queries.
vat_calculation_type string VAT calculation mode: No - do not accrue, Exclude - included in the amount, Include - added on top.

Sortable Fields

Field
amount
attached_user.name
blocked
code
contract.name
currency.name
date
deleted_mark
firm.name
id
last_update
partner.name
performed
price_type.name
vat_calculation_type

Request Example

{
  "filters": [
    {
      "field": "firm_id",
      "operator": "In",
      "value": "1"
    },
    {
      "field": "partner_id",
      "operator": "In",
      "value": "301"
    },
    {
      "field": "invoice_type",
      "operator": "Equal",
      "value": "Outcome"
    },
    {
      "field": "deleted_mark",
      "operator": "Equal",
      "value": "false"
    },
    {
      "field": "date",
      "operator": "GreaterOrEqual",
      "value": "1764547200"
    },
    {
      "field": "date",
      "operator": "LessOrEqual",
      "value": "1767225600"
    }
  ],
  "sort_orders": [
    {
      "column": "date",
      "direction": "DESC"
    }
  ],
  "limit": 50,
  "offset": 0
}

Response Parameters

Name Type Description
next_offset Int32 Offset for the next data page.
ok Boolean Indicates whether the request completed successfully.
result Array of DocInvoice Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 9101,
      "date": 1767225600,
      "code": "INV-0009101",
      "invoice_type": "Outcome",
      "corrected_date": 1767139200,
      "corrected_code": "WS-0005601",
      "contract": {
        "id": 701,
        "name": "Wholesale contract"
      },
      "firm": {
        "id": 1,
        "name": "Regos Demo LLC"
      },
      "partner": {
        "id": 301,
        "name": "Coffee Partner LLC"
      },
      "currency": {
        "id": 1,
        "name": "UZS"
      },
      "exchange_rate": 1,
      "amount": 150000,
      "vat_calculation_type": "Exclude",
      "attached_user": {
        "id": 5,
        "name": "John Smith"
      },
      "base_document_id": 49,
      "document_type": 5601,
      "description": "Invoice for wholesale shipment",
      "uuid": "4e6ecf18-94ef-44fd-9039-f4b731437953",
      "external_code": "FAKTURA-RESP-123",
      "status": "New",
      "error": "",
      "blocked": true,
      "current_user_blocked": true,
      "performed": false,
      "deleted_mark": false,
      "last_update": 1767225600
    }
  ],
  "next_offset": 0,
  "total": 1
}