Accounting Exports Queries

Query accounting export configurations and history.

AccountingExport — Returns a single accounting export based on the id provided

query GetAccountingExport($id: ID) {
  AccountingExport(id: $id) {
    id
    label
    date_from
    date_to
    manual
    attachment { id }
    created_at
  }
}
{
  "id": 100012
}

AccountingExports — Returns a list of accounting exports with ordering, filters, and search

query AccountingExports(
  $where: QueryAccountingExportsWhereWhereConditions,
  $orderBy: [QueryAccountingExportsOrderByOrderByClause!],
  $search: String
) {
  AccountingExports(
    where: $where
    orderBy: $orderBy
    search: $search
  ) {
    id
    label
    date_from
    date_to
    manual
    created_at
  }
}
{
  "where": {
    "AND": [
      { "column": "MANUAL", "operator": "EQ", "value": true }
    ]
  },
  "orderBy": [
    { "column": "CREATED_AT", "order": "DESC" }
  ],
  "search": "export name"
}

Available fields

FieldTypeDescription
idIntUnique identifier of the accounting export.
labelStringLabel of the accounting export.
date_fromDateStart date of the export period.
date_toDateEnd date of the export period.
manualBooleanWhether the export was created manually.
attachmentFileLinked file attachment.
created_atDateTimeCreation date.

Filters

You can create filters based on following fields

id - Int
Example: { "column": "ID", "operator": "EQ", "value": 100012 }
label - String
Example: { "column": "LABEL", "operator": "LIKE", "value": "%export%" }
date_from - Date
Example: { "column": "DATE_FROM", "operator": "GTE", "value": "2025-01-01" }
date_to - Date
Example: { "column": "DATE_TO", "operator": "LTE", "value": "2025-12-31" }
company_id - ID
Example: { "column": "COMPANY_ID", "operator": "EQ", "value": 100001 }
manual - Boolean
Example: { "column": "MANUAL", "operator": "EQ", "value": true }
created_at - DateTime
Example: { "column": "CREATED_AT", "operator": "GT", "value": "2025-01-01T00:00:00Z" }

Sorting

You can sort data based on following fields: id, label, date_from, date_to, created_at

query SortAccountingExports(
  $where: QueryAccountingExportsWhereWhereConditions
) {
  AccountingExports(
    where: $where
    orderBy: [{ column: CREATED_AT, order: DESC }]
  ) {
    id
    label
    date_from
    date_to
    manual
    created_at
  }
}

Example of data returned

{
  "data": {
    "AccountingExports": [
      {
        "id": 100001,
        "label": "Export Q1 2025",
        "date_from": "2025-01-01",
        "date_to": "2025-03-31",
        "manual": true,
        "created_at": "2025-03-31T10:30:00Z"
      },
      {
        "id": 100002,
        "label": "Export Q2 2025",
        "date_from": "2025-04-01",
        "date_to": "2025-06-30",
        "manual": false,
        "created_at": "2025-06-30T15:45:00Z"
      }
    ]
  }
}