{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spendesk/json-schema/spendesk-accounting-export-query-schema.json",
  "title": "accountingExportQuery",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spendesk-accounting-exports-api-openapi.yml#/components/schemas/accountingExportQuery",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Period start date"
    },
    "to": {
      "type": "string",
      "format": "date",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Period end date, no more than 31 days from `from`"
    },
    "userLanguage": {
      "type": "string",
      "enum": [
        "en-GB",
        "fr",
        "de"
      ],
      "default": "en-GB"
    },
    "includeAlreadyExportedPayables": {
      "default": false,
      "type": "boolean",
      "description": "Whether to include payables that have already been exported to accounting in the export results. When set to `false` (default), only payables not yet exported are included."
    },
    "markEntriesAsExported": {
      "default": false,
      "type": "boolean",
      "description": "Whether the entries included in the export should be marked as exported after the export is generated. When set to `false` (default), the export is generated without updating the bookkeeping status of the entries"
    },
    "templates": {
      "type": "object",
      "description": "Accounting templates to use for the export",
      "properties": {
        "purchaseJournalTemplateId": {
          "type": "string",
          "description": "The ID of the template to use for the purchase journal"
        },
        "bankJournalTemplateId": {
          "type": "string",
          "description": "The ID of the template to use for the bank journal"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "from",
    "to"
  ],
  "additionalProperties": false
}