Skip to content

Accounting

Accounting

Internal accounting module: filings calendar, Slovenian VAT returns and payroll, US ledger, journal entries and tax-year worksheets. Available to verified internal users only.

Endpoints
IntroductionPOST/employeesPOST/fixed-assetsPOST/payroll/runsPOST/vat-returnsPOST/journal-entriesGET/employeesGET/fixed-assetsGET/fixed-assets/registerGET/fixed-assets/register/exportGET/payroll/parametersGET/payroll/parameters/historyGET/payroll/runsGET/vat-returnsGET/filingsGET/accounting/filings-calendarGET/ledger/accountsGET/ledger/trial-balanceGET/ledger/profit-and-lossGET/ledger/balance-sheetGET/ledger/entriesGET/ledger/reconciliationsGET/journal-entriesGET/vendor-tax-profilesGET/employees/{id}GET/fixed-assets/{id}GET/payroll/runs/{id}GET/vat-returns/{id}GET/journal-entries/{id}GET/us-tax-years/{year}PATCH/employees/{id}PUT/employees/{id}/attendancePATCH/employees/{id}/compensation/{compensation_id}PATCH/fixed-assets/{id}PUT/payroll/parameters/{key}PATCH/vat-returns/{id}PUT/ledger/reconciliations/{account_code}/{period_end}PATCH/journal-entries/{id}PUT/vendor-tax-profiles/{contact_id}DELETE/employees/{id}DELETE/employees/{id}/compensation/{compensation_id}DELETE/fixed-assets/{id}DELETE/payroll/runs/{id}DELETE/ledger/reconciliations/{account_code}/{period_end}DELETE/journal-entries/{id}GET/vat-returns/previewGET/employees/{id}/attendanceGET/employees/{id}/compensationPOST/employees/{id}/compensationPOST/fixed-assets/{id}/disposePOST/fixed-assets/{id}/undo-disposalGET/fixed-assets/{id}/schedulePOST/payroll/runs/{id}/recomputePOST/payroll/runs/{id}/approvePOST/payroll/runs/{id}/reopenPOST/payroll/runs/{id}/mark-paidGET/payroll/runs/{id}/exportPOST/vat-returns/{id}/recomputePOST/vat-returns/{id}/approvePOST/vat-returns/{id}/submitPOST/vat-returns/{id}/reopenGET/vat-returns/{id}/exportPOST/filings/{id}/completePOST/filings/{id}/reopenPOST/filings/{id}/dismissGET/us-tax-years/{year}/export

The Accounting object

object

Attributes

idstring
Other attributes
entity_idstring
statusstring
first_namestring
last_namestring
emailstringnullable
tax_numberstring
personal_idstringnullable
addressstringnullable
post_codestringnullable
citystringnullable
country_codestringnullable
ibanstringnullable
employment_startstring
employment_endstringnullable
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
tax_residencystring
general_allowance_modestring
metadatastringnullable
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "emp_abc123",
  "entity_id": "ent_abc123",
  "status": "active",
  "first_name": "Ana",
  "last_name": "Novak",
  "email": "ana.novak@example.com",
  "tax_number": "12345678",
  "personal_id": null,
  "address": "Dunajska cesta 1",
  "post_code": "1000",
  "city": "Ljubljana",
  "country_code": "SI",
  "iban": "SI56191000000123438",
  "employment_start": "2024-03-01",
  "employment_end": null,
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1541.16,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": null,
  "commute_mode": "per_km",
  "commute_km_one_way": 30,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "tax_residency": "resident",
  "general_allowance_mode": "standard",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T10:00:00.000Z"
}

Create an employee

POST/employees

Create an employee

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

first_namestringrequired
last_namestringrequired
tax_numberstringrequired

Slovenian tax number (davcna stevilka), 8 digits. An optional SI prefix is stripped.

employment_startstringrequired
gross_salary_monthlynumberrequired
Other parameters
emailstringoptionalnullable
addressstringoptionalnullable
post_codestringoptionalnullable
citystringoptionalnullable
country_codestringoptionalnullable
ibanstringoptionalnullable
employment_endstringoptionalnullable
weekly_hoursnumberoptionalnullable
seniority_bonus_percentnumberoptionalnullable
meal_allowance_per_daynumberoptionalnullable
commute_km_one_waynumberoptionalnullable
commute_amount_monthlynumberoptionalnullable
works_remotelybooleanoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.registerEmployee({
  first_name: "Ana",
  last_name: "Novak",
  tax_number: "12345678",
  employment_start: "2024-03-01",
  gross_salary_monthly: 1541.16
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
statusstring
first_namestring
last_namestring
emailstringnullable
tax_numberstring
personal_idstringnullable
addressstringnullable
post_codestringnullable
citystringnullable
country_codestringnullable
ibanstringnullable
employment_startstring
employment_endstringnullable
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
tax_residencystring
general_allowance_modestring
metadatastringnullable
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "emp_abc123",
  "entity_id": "ent_abc123",
  "status": "active",
  "first_name": "Ana",
  "last_name": "Novak",
  "email": "ana.novak@example.com",
  "tax_number": "12345678",
  "personal_id": null,
  "address": "Dunajska cesta 1",
  "post_code": "1000",
  "city": "Ljubljana",
  "country_code": "SI",
  "iban": "SI56191000000123438",
  "employment_start": "2024-03-01",
  "employment_end": null,
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1541.16,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": null,
  "commute_mode": "per_km",
  "commute_km_one_way": 30,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "tax_residency": "resident",
  "general_allowance_mode": "standard",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T10:00:00.000Z"
}

Create a fixed asset

POST/fixed-assets

Adds an asset to the register. Straight-line depreciation per asset (ZDDPO-2 Art. 33): it starts on the first day of the month after the asset is available for use. Without depreciation_rate the statutory maximum of the category applies.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

namestringrequired
categorystringrequired

Asset group. The first eight are the groups of ZDDPO-2 Art. 33 para. 5 with their maximum annual straight-line rates: buildings 3 %, building_parts 6 %, equipment_vehicles 20 %, equipment_parts_research 33.3 %, computer_equipment 50 %, perennial_plantations 10 %, breeding_herd 20 %, other_investments 10 %. intangible has no statutory cap (the rate follows useful life or contract term and the tax maximum equals the booked rate). land is never depreciated.

Possible values: "buildings", "building_parts", "equipment_vehicles", "equipment_parts_research", "computer_equipment", "perennial_plantations", "breeding_herd", "other_investments", "intangible", "land"

acquisition_datestringrequired

Date the asset was acquired.

acquisition_costnumberrequired

EUR value at which the asset is capitalised (net of deductible VAT), in currency major units. At most 2 decimals. Greater than 0 and at most 1,000,000,000. Depending on the rest of the asset (otherwise 422): must be greater than residual_value; at most 500 when small_value_write_off is true. Unless the asset is land or a small-value write-off, the depreciable amount (acquisition_cost minus residual_value) must also give a booked monthly amount of at least 0.01 EUR at depreciation_rate and at the category's statutory maximum rate (a tiny cost such as 0.10 is rejected), and depreciate within 1,200 months (100 years).

Other parameters
notesstringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.registerFixedAsset({
  name: "Laptop Dell XPS 15",
  category: "computer_equipment",
  acquisition_date: "2026-03-15",
  acquisition_cost: 1200
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
supplier_namestringnullable
notesstringnullable
metadataobject
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "fas_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
  "name": "Laptop Dell XPS 15",
  "inventory_number": "OS-0001",
  "category": "computer_equipment",
  "acquisition_date": "2026-03-15",
  "available_for_use_date": "2026-03-15",
  "acquisition_cost": 1200,
  "residual_value": 0,
  "depreciation_rate": 50,
  "small_value_write_off": false,
  "expense_id": null,
  "supplier_name": "Računalništvo d.o.o.",
  "opening_as_of": null,
  "opening_accumulated_depreciation": 0,
  "opening_tax_deferred": 0,
  "disposal_date": null,
  "disposal_type": null,
  "disposal_proceeds": null,
  "notes": null,
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-03-16T09:00:00.000Z",
  "updated_at": "2026-03-16T09:00:00.000Z",
  "as_of": "2026-12-31",
  "statutory_max_rate": 50,
  "tax_rate_basis": "statutory",
  "asset_class": "other",
  "accumulated_depreciation": 450,
  "net_book_value": 750,
  "tax_deferred_balance": 0,
  "fully_depreciated": false,
  "status": "active",
  "depreciation_start_month": "2026-04",
  "vat_correction_period_years": 5,
  "vat_correction_period_ends_on": "2030-12-31"
}

Create a draft Slovenian payroll run for a month

POST/payroll/runs

Computes the salary (REK-O 1001) of every active employee employed in the whole period from the employee's dated compensation record in effect on the first day of the period (a period before the first record is refused per employee with 422), the month's attendance and the payroll parameters effective on the first day of the period. Holiday compensation defaults to the ZDR-1 Art. 137 average of the three previous approved or paid months, falling back to the monthly base rate when fewer exist; each item records which method applied. Money amounts are euros as numbers with two decimals.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

periodstringrequired

Payroll period, YYYY-MM.

payout_datestringrequired

Date the salaries are paid (REK-O F012). Not before the first day of the period.

Other parameters
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.draftPayrollRun({
  period: "2026-10",
  payout_date: "2026-11-16"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "draft",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": null,
  "approved_at": null,
  "paid_by_user_id": null,
  "paid_at": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Create a draft VAT return filing record for a period

POST/vat-returns

Computes the boxes, the whole-euro form boxes and the payment block and stores them on the filing. request_refund (DDV-O box 04, default false) decides whether an excess is carried to the next period; opening_credit gives the credit brought in, used only when the previous period's carried credit is not available (no submitted return of the previous period is stored, or the stored one has no payment block); otherwise the previous filing's credit_carried_out is used.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

yearintegerrequired

Year for the VAT return period.

Other parameters
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.draftVatReturn({
  year: 2026,
  month: 8,
  quarter: 3,
  request_refund: false,
  opening_credit: 50
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Record a journal entry

POST/journal-entries

Balanced double-entry lines (2-100): each line has exactly one of debit/credit greater than zero with at most 2 decimals, and total debits equal total credits. The date may not precede the books start date.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

datestringrequired
linesarray of objectsrequired
Other parameters
memostringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.recordJournalEntry({
  date: "2027-01-01",
  kind: "opening_balance",
  memo: "Opening balances",
  lines: [
    {
      account_code: "1000",
      debit: 5000,
      description: "Cash at books start"
    },
    {
      account_code: "3000",
      credit: 5000,
      description: "Founder capital",
      related_party: true
    }
  ]
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring<resource-id>

Space Invoices resource identifier (format: {prefix}_{hex24})

Other parameters
entity_idstring
datestring
memostringnullable
created_by_user_idstringnullable
created_atstring
updated_atstring
json
{
  "id": "jou_ent_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "date": "2027-01-01",
  "kind": "opening_balance",
  "memo": "Opening balances",
  "lines": [
    {
      "account_code": "1000",
      "debit": "5000.00",
      "credit": "0.00",
      "description": "Cash at books start",
      "related_party": false
    },
    {
      "account_code": "3000",
      "debit": "0.00",
      "credit": "5000.00",
      "description": "Founder capital",
      "related_party": true
    }
  ],
  "total": "5000.00",
  "created_by_user_id": "usr_6595a27b5d35015c3ef0c3fd",
  "created_at": "2027-01-02T10:00:00.000Z",
  "updated_at": "2027-01-02T10:00:00.000Z"
}

List employees

GET/employees

List employees

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

statusstringoptionalnullable

Filter by employee status. Omit to return both active and inactive employees.

Possible values: "active", "inactive", "null"

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listEmployees(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "emp_abc123",
      "entity_id": "ent_abc123",
      "status": "active",
      "first_name": "Ana",
      "last_name": "Novak",
      "email": "ana.novak@example.com",
      "tax_number": "12345678",
      "personal_id": null,
      "address": "Dunajska cesta 1",
      "post_code": "1000",
      "city": "Ljubljana",
      "country_code": "SI",
      "iban": "SI56191000000123438",
      "employment_start": "2024-03-01",
      "employment_end": null,
      "employment_type": "full_time",
      "weekly_hours": 40,
      "gross_salary_monthly": 1541.16,
      "seniority_bonus_percent": 4,
      "meal_allowance_per_day": null,
      "commute_mode": "per_km",
      "commute_km_one_way": 30,
      "commute_amount_monthly": null,
      "works_remotely": false,
      "tax_residency": "resident",
      "general_allowance_mode": "standard",
      "metadata": {},
      "deleted_at": null,
      "created_at": "2026-04-15T10:00:00.000Z",
      "updated_at": "2026-04-15T10:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

List fixed assets

GET/fixed-assets

Cursor-paginated list of the entity's fixed assets (osnovna sredstva) with depreciation, net book value and tax-deferred balance computed as of as_of (default: today in the entity's timezone). Assets acquired after as_of are left out for an as_of before today and listed (not depreciating yet) for today or later.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

statusstringoptionalnullable

active (default): acquired on or before as_of and not disposed as of it; disposed: disposal_date on or before as_of; all: every asset acquired on or before as_of, disposed or not. An asset acquired after as_of is listed for active and all only when as_of is today or later (it is not depreciating yet); for an earlier as_of it is left out. Null is treated as omitted.

Possible values: "active", "disposed", "all", "null"

categorystringoptionalnullable

Filter by category. Omit or null for every category.

Possible values: "buildings", "building_parts", "equipment_vehicles", "equipment_parts_research", "computer_equipment", "perennial_plantations", "breeding_herd", "other_investments", "intangible", "land", "null"

expense_idstringoptionalnullable

Only assets linked to this expense. Omit or null for every asset. Must not be empty.

as_ofstringoptionalnullable

Date the computed fields refer to (YYYY-MM-DD); the month that contains it is included. Defaults to today in the entity's timezone. Null is treated as omitted. For active and all, assets acquired after as_of are left out when as_of is before today, and included (not depreciating yet) when as_of is today or later.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listFixedAssets(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "fas_6595a27b5d35015c3ef0c3fd",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
      "name": "Laptop Dell XPS 15",
      "inventory_number": "OS-0001",
      "category": "computer_equipment",
      "acquisition_date": "2026-03-15",
      "available_for_use_date": "2026-03-15",
      "acquisition_cost": 1200,
      "residual_value": 0,
      "depreciation_rate": 50,
      "small_value_write_off": false,
      "expense_id": null,
      "supplier_name": "Računalništvo d.o.o.",
      "opening_as_of": null,
      "opening_accumulated_depreciation": 0,
      "opening_tax_deferred": 0,
      "disposal_date": null,
      "disposal_type": null,
      "disposal_proceeds": null,
      "notes": null,
      "metadata": {},
      "deleted_at": null,
      "created_at": "2026-03-16T09:00:00.000Z",
      "updated_at": "2026-03-16T09:00:00.000Z",
      "as_of": "2026-12-31",
      "statutory_max_rate": 50,
      "tax_rate_basis": "statutory",
      "asset_class": "other",
      "accumulated_depreciation": 450,
      "net_book_value": 750,
      "tax_deferred_balance": 0,
      "fully_depreciated": false,
      "status": "active",
      "depreciation_start_month": "2026-04",
      "vat_correction_period_years": 5,
      "vat_correction_period_ends_on": "2030-12-31"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get the fixed-asset register for a year

GET/fixed-assets/register

Register (register osnovnih sredstev) for a calendar year: every asset acquired by 31 December and not disposed of before 1 January, each with its roll-forward (accumulated depreciation 1.1. and 31.12., depreciation of the year, net book value, tax-deductible and deferred amounts, disposal gain or loss), plus totals and per-category totals.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

yearintegerrequired

Calendar year of the register (2000-2100).

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getFixedAssetRegister({
  year: 2026
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

yearinteger
json
{
  "year": 2026,
  "rows": [
    {
      "id": "fas_6595a27b5d35015c3ef0c3fd",
      "inventory_number": "OS-0001",
      "name": "Laptop Dell XPS 15",
      "category": "computer_equipment",
      "asset_class": "other",
      "acquisition_date": "2026-03-15",
      "available_for_use_date": "2026-03-15",
      "depreciation_rate": 50,
      "statutory_max_rate": 50,
      "disposal_date": null,
      "disposal_type": null,
      "disposal_proceeds": null,
      "cost": 1200,
      "accumulated_opening": 0,
      "depreciation": 450,
      "accumulated_closing": 450,
      "net_book_value_closing": 750,
      "tax_deductible": 450,
      "tax_non_deductible_deferred": 0,
      "tax_deferred_closing": 0,
      "disposal_gain_loss": 0,
      "disposed_in_year": false
    }
  ],
  "totals": {
    "cost": 1200,
    "accumulated_opening": 0,
    "depreciation": 450,
    "accumulated_closing": 450,
    "net_book_value_closing": 750,
    "tax_deductible": 450,
    "tax_non_deductible_deferred": 0,
    "tax_deferred_closing": 0,
    "disposal_gain_loss": 0
  },
  "by_category": [
    {
      "category": "computer_equipment",
      "cost": 1200,
      "accumulated_opening": 0,
      "depreciation": 450,
      "accumulated_closing": 450,
      "net_book_value_closing": 750,
      "tax_deductible": 450,
      "tax_non_deductible_deferred": 0,
      "tax_deferred_closing": 0,
      "disposal_gain_loss": 0
    }
  ]
}

Export the fixed-asset register for a year

GET/fixed-assets/register/export

Non-mutating: the register of the year as a CSV or Excel (xlsx) file named osnovna-sredstva-., with Slovenian column headers and a totals row.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

yearintegerrequired

Calendar year of the register (2000-2100).

formatstringrequired

File format: csv or xlsx.

Possible values: "csv", "xlsx"

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const blob = await sdk.accounting.exportFixedAssetRegister({
  year: 2026,
  format: "xlsx"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

const arrayBuffer = await blob.arrayBuffer();
const { writeFile } = await import('node:fs/promises');
await writeFile('download.bin', Buffer.from(arrayBuffer));
console.log('Saved download.bin');

Get resolved payroll parameters effective on a date

GET/payroll/parameters

Get resolved payroll parameters effective on a date

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

country_codestringoptional

Default: "SI"

as_ofstringoptional

Resolve parameters effective on this date. Defaults to today.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.resolvePayrollParameters(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

country_codestring
as_ofstring
parametersobject
json
{
  "country_code": "SI",
  "as_of": "2026-08-01",
  "parameters": {
    "employee_contributions.piz": {
      "value": 15.5,
      "unit": "percent_of_gross",
      "effective_from": "1999-01-01",
      "effective_to": null,
      "verified": true,
      "source_url": "https://www.fu.gov.si/fileadmin/Internet/Davki_in_druge_dajatve/Podrocja/Prispevki_za_socialno_varnost/Opis/Brosura_o_placevanju_prispevkov_za_socialno_varnost.doc",
      "source_title": "FURS - Brošura o plačevanju prispevkov za socialno varnost",
      "is_override": false
    },
    "ozp_monthly": {
      "value": 39.36,
      "unit": "eur_flat_per_month",
      "effective_from": "2026-03-01",
      "effective_to": "2027-02-28",
      "verified": false,
      "source_url": "https://www.domzale-ooz.si/2026/03/02/povisanje-obveznega-zdravstvenega-prispevka-od-1-marca-2026/",
      "source_title": "OOZ Domžale, citing ZZZS",
      "is_override": false
    }
  }
}

Get the full effective-dated history for a payroll parameter key

GET/payroll/parameters/history

Returns the shared statutory rows for the key and the current entity's own override rows (another entity's overrides are never returned). Every row carries scope: statutory (entity_id null) or entity (an override owned by the caller). Rows are ordered by effective_from, oldest first; when a statutory and an entity row share the same effective_from, both are listed, statutory first. While an entity override is effective it takes precedence over statutory rows when parameters are resolved (see is_override on the resolve endpoint). Pass scope to return only one kind.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

country_codestringoptional

Default: "SI"

keystringrequired
scopestringoptional

Return only statutory rows or only the calling entity's entity overrides. Omit to return both.

Possible values: "statutory", "entity"

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getPayrollParameterHistory({
  key: "employee_contributions.piz"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "ppar_abc123",
      "country_code": "SI",
      "key": "ozp_monthly",
      "value_numeric": 39.36,
      "value_json": null,
      "unit": "eur_flat_per_month",
      "effective_from": "2026-03-01",
      "effective_to": "2027-02-28",
      "source_url": "https://www.domzale-ooz.si/2026/03/02/povisanje-obveznega-zdravstvenega-prispevka-od-1-marca-2026/",
      "source_title": "OOZ Domžale, citing ZZZS",
      "verified": false,
      "note": null,
      "entity_id": null,
      "scope": "statutory",
      "created_at": "2026-09-16T10:00:00.000Z",
      "updated_at": "2026-09-16T10:00:00.000Z"
    },
    {
      "id": "ppar_def456",
      "country_code": "SI",
      "key": "ozp_monthly",
      "value_numeric": 41,
      "value_json": null,
      "unit": "eur_flat_per_month",
      "effective_from": "2026-03-01",
      "effective_to": null,
      "source_url": null,
      "source_title": "Internal decision",
      "verified": true,
      "note": null,
      "entity_id": "ent_abc123",
      "scope": "entity",
      "created_at": "2026-09-20T10:00:00.000Z",
      "updated_at": "2026-09-20T10:00:00.000Z"
    }
  ]
}

List payroll runs, newest period first

GET/payroll/runs

List payroll runs, newest period first

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

periodstringoptional

Payroll period, YYYY-MM.

statusoptional
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listPayrollRuns(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "prun_6595a27b5d35015c3ef0c3ff",
      "entity_id": "ent_507f1f77bcf86cd799439011",
      "period": "2026-10",
      "furs": {
        "rek_income_type": "1001"
      },
      "payout_date": "2026-11-16",
      "status": "draft",
      "employee_count": 1,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "payout": 1414.89,
      "parameter_snapshot": {
        "country_code": "SI",
        "as_of": "2026-10-01",
        "parameters": {}
      },
      "engine_version": "si-payroll-2026.1",
      "status_history": [
        {
          "status": "draft",
          "at": "2026-11-01T09:00:00.000Z",
          "by_user_id": "usr_507f1f77bcf86cd799439099"
        }
      ],
      "computed_at": "2026-11-01T09:00:00.000Z",
      "created_by_user_id": "usr_507f1f77bcf86cd799439099",
      "approved_by_user_id": null,
      "approved_at": null,
      "paid_by_user_id": null,
      "paid_at": null,
      "created_at": "2026-11-01T09:00:00.000Z",
      "updated_at": "2026-11-01T09:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

List VAT return filing records, newest period first

GET/vat-returns

List VAT return filing records, newest period first

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listVatReturns(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "id",
      "entity_id": "entity-id",
      "period": {
        "year": 2026,
        "month": 8,
        "quarter": null,
        "from": "2026-08-01",
        "to": "2026-08-31",
        "label": "2026-08"
      },
      "vat_period_setting": "monthly",
      "period_matches_setting": true,
      "status": "draft",
      "boxes": {
        "11": "1234.56",
        "12": "0.00",
        "13": "0.00",
        "14": "0.00",
        "15": "0.00",
        "21": "271.60",
        "22": "0.00",
        "23": "0.00",
        "24": "0.00",
        "25": "0.00",
        "26": "0.00",
        "31": "412.30",
        "32": "0.00",
        "33": "0.00",
        "34": "0.00",
        "35": "0.00",
        "41": "90.71",
        "42": "0.00",
        "43": "0.00",
        "51": "180.89",
        "52": "0.00",
        "11a": "0.00",
        "22a": "0.00",
        "23a": "0.00",
        "24a": "0.00",
        "24b": "0.00",
        "24c": "0.00",
        "25a": "0.00",
        "25b": "0.00",
        "31a": "0.00",
        "32a": "0.00",
        "42a": "0.00"
      },
      "form_boxes": {
        "11": "1235",
        "12": "0",
        "13": "0",
        "14": "0",
        "15": "0",
        "21": "272",
        "22": "0",
        "23": "0",
        "24": "0",
        "25": "0",
        "26": "0",
        "31": "412",
        "32": "0",
        "33": "0",
        "34": "0",
        "35": "0",
        "41": "91",
        "42": "0",
        "43": "0",
        "51": "181",
        "52": "0",
        "11a": "0",
        "22a": "0",
        "23a": "0",
        "24a": "0",
        "24b": "0",
        "24c": "0",
        "25a": "0",
        "25b": "0",
        "31a": "0",
        "32a": "0",
        "42a": "0"
      },
      "request_refund": false,
      "opening_credit": 50,
      "payment": {
        "vat_due": "181",
        "excess": "0",
        "carried_forward_credit": "50",
        "amount_due": "131",
        "credit_carried_out": "0",
        "due_date": "2026-09-30",
        "recipient_name": "PDP - PRORAČUN DRŽAVE",
        "iban": "SI56011008881000030",
        "reference": "SI19 12345678-62006",
        "purpose_code": "TAXS",
        "purpose": "DDV-O 8/2026",
        "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
        "notes": []
      },
      "late_filing": {
        "is_late": false,
        "self_report": false,
        "interest": "0.00"
      },
      "furs": {
        "ddv_o_edp_number": "ddv-o-edp-number",
        "rp_o_edp_number": "rp-o-edp-number",
        "evidence_id": "KR-123456"
      },
      "recapitulative_statement": {
        "due_date": "2026-11-20",
        "section_a": [
          {
            "country_code": "DE",
            "vat_number": "123456789",
            "goods": "1234",
            "triangular": "1234",
            "services": "1234"
          }
        ],
        "section_b": [
          {
            "year": 2026,
            "month": 9,
            "country_code": "DE",
            "vat_number": "123456789",
            "goods": "1234",
            "triangular": "1234",
            "services": "1234",
            "previous_value_source": "filing"
          }
        ],
        "totals": {
          "a13": "1234",
          "a14": "1234",
          "a15": "1234",
          "a16": "1234",
          "a17": "1234"
        },
        "reconciliation": {
          "ddv_o_box_12": "1500.40",
          "section_a_total": "1234",
          "differences": [
            {
              "reason": "rounding",
              "amount": "-120.00",
              "document_numbers": [
                "document-numbers"
              ]
            }
          ],
          "unexplained": "0"
        },
        "warnings": [
          "warnings"
        ],
        "blocking_issues": [
          "blocking-issues"
        ]
      },
      "record_counts": {
        "kir": 0,
        "kpr": 0
      },
      "warnings": [
        "warnings"
      ],
      "computed_at": "2025-01-15T10:30:00.000Z",
      "approved_by_user_id": "approved-by-user-id",
      "approved_at": "2025-01-15T10:30:00.000Z",
      "submitted_by_user_id": "submitted-by-user-id",
      "submitted_at": "2025-01-15T10:30:00.000Z",
      "notes": "notes",
      "metadata": {},
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_at": "2025-01-15T10:30:00.000Z"
    }
  ],
  "pagination": {
    "total": 0,
    "next_cursor": "next-cursor",
    "prev_cursor": "prev-cursor",
    "has_more": true
  }
}

List filing-calendar obligations for a date range, with computed status

GET/filings

Materialises any missing obligations for the requested range from the entity's Slovenian tax profile, then returns them with a computed state (upcoming/due_soon/overdue/done/dismissed). The ddv_o obligation's status follows its linked vat_filings row.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

fromstringrequired

Range start (inclusive), YYYY-MM-DD.

tostringrequired

Range end (inclusive), YYYY-MM-DD.

statusoptional

Filter by computed state.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listFilings({
  from: "2026-09-01",
  to: "2026-12-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
Other parameters
json
{
  "data": [
    {
      "id": "id",
      "entity_id": "entity-id",
      "type": "ddv_o",
      "period_start": "period-start",
      "period_end": "period-end",
      "due_date": "due-date",
      "kind": "filing",
      "verification": "verified",
      "source": "source",
      "related_resource": {
        "type": "vat_filing",
        "period_key": "period-key",
        "id": "id"
      },
      "status": "upcoming",
      "state": "upcoming",
      "done_at": "2025-01-15T10:30:00.000Z",
      "done_by": "done-by",
      "dismissed_at": "2025-01-15T10:30:00.000Z",
      "dismissed_by": "dismissed-by",
      "notes": "notes",
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_at": "2025-01-15T10:30:00.000Z"
    }
  ],
  "summary": {
    "overdue": 0,
    "due_this_week": 0,
    "upcoming": 0
  }
}

List filing-calendar obligations across the account's entities

GET/accounting/filings-calendar

Account-level view for accountants managing more than one entity: returns the filing obligations of the account's entities where the caller is the company's accountant and the accounting module is available, each tagged with its entity id and name; other entities are left out. Scoped to one environment (environment query param; omitted means the API key's own environment, or live for a signed-in user), so live and sandbox entities are not mixed in one response. An API key cannot request an environment other than its own (403).

Header parameters

account_idstringoptional

Account Id on which the request is made. Optional if user is part of only one account.

Query parameters

fromstringrequired

Range start (inclusive), YYYY-MM-DD.

tostringrequired

Range end (inclusive), YYYY-MM-DD.

entity_idstringoptional

Filter to a single entity id.

environmentstringoptionalnullable

Environment to scope entities to. When omitted, an API key uses its own environment and a signed-in user gets live. An API key cannot ask for a different environment than its own (403).

Possible values: "live", "sandbox", "null"

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listAccountFilingsCalendar({
  from: "2026-09-01",
  to: "2026-12-31"
}, {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "id",
      "entity_id": "entity-id",
      "type": "ddv_o",
      "period_start": "period-start",
      "period_end": "period-end",
      "due_date": "due-date",
      "kind": "filing",
      "verification": "verified",
      "source": "source",
      "related_resource": {
        "type": "vat_filing",
        "period_key": "period-key",
        "id": "id"
      },
      "status": "upcoming",
      "state": "upcoming",
      "done_at": "2025-01-15T10:30:00.000Z",
      "done_by": "done-by",
      "dismissed_at": "2025-01-15T10:30:00.000Z",
      "dismissed_by": "dismissed-by",
      "notes": "notes",
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_at": "2025-01-15T10:30:00.000Z",
      "entity_name": "entity-name"
    }
  ]
}

List the US chart of accounts

GET/ledger/accounts

List the US chart of accounts

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listLedgerAccounts({
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "code": "1100",
      "name": "Accounts receivable",
      "type": "asset",
      "form_1120_line": null,
      "schedule_l_line": "2a",
      "deductibility": "none",
      "related_party": false
    },
    {
      "code": "6850",
      "name": "Meals",
      "type": "expense",
      "form_1120_line": "26",
      "schedule_l_line": null,
      "deductibility": "half",
      "related_party": false
    }
  ]
}

Trial balance for a period within one calendar year

GET/ledger/trial-balance

Derived on read from invoices, credit notes, advance invoices, expenses, payments, categorized bank transactions and manual journal entries (accrual basis). Balances are in each account's normal direction; totals.debit always equals totals.credit.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

date_fromstringrequired

Range start (inclusive), YYYY-MM-DD.

date_tostringrequired

Range end (inclusive), YYYY-MM-DD.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getTrialBalance({
  date_from: "2027-01-01",
  date_to: "2027-03-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

date_fromstring
date_tostring
json
{
  "date_from": "2027-03-01",
  "date_to": "2027-03-31",
  "accounts": [
    {
      "code": "1000",
      "name": "Cash - checking",
      "type": "asset",
      "opening_balance": "0.00",
      "debit": "400.00",
      "credit": "0.00",
      "closing_balance": "400.00"
    },
    {
      "code": "1100",
      "name": "Accounts receivable",
      "type": "asset",
      "opening_balance": "0.00",
      "debit": "1100.00",
      "credit": "400.00",
      "closing_balance": "700.00"
    },
    {
      "code": "2200",
      "name": "Sales tax payable",
      "type": "liability",
      "opening_balance": "0.00",
      "debit": "0.00",
      "credit": "100.00",
      "closing_balance": "100.00"
    },
    {
      "code": "4000",
      "name": "Sales",
      "type": "revenue",
      "opening_balance": "0.00",
      "debit": "0.00",
      "credit": "1000.00",
      "closing_balance": "1000.00"
    }
  ],
  "totals": {
    "debit": "1500.00",
    "credit": "1500.00"
  }
}

Profit and loss for a period within one calendar year

GET/ledger/profit-and-loss

Profit and loss for a period within one calendar year

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

date_fromstringrequired

Range start (inclusive), YYYY-MM-DD.

date_tostringrequired

Range end (inclusive), YYYY-MM-DD.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getProfitAndLossReport({
  date_from: "2027-01-01",
  date_to: "2027-03-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

date_fromstring
date_tostring
json
{
  "date_from": "2027-01-01",
  "date_to": "2027-03-31",
  "income": {
    "accounts": [
      {
        "code": "4000",
        "name": "Sales",
        "amount": "1000.00"
      }
    ],
    "total": "1000.00"
  },
  "cost_of_revenue": {
    "accounts": [],
    "total": "0.00"
  },
  "expenses": {
    "accounts": [
      {
        "code": "6800",
        "name": "Software and hosting",
        "amount": "250.00"
      }
    ],
    "total": "250.00"
  },
  "income_tax": {
    "accounts": [],
    "total": "0.00"
  },
  "gross_profit": "1000.00",
  "net_income_before_tax": "750.00",
  "net_income": "750.00"
}

Balance sheet as of a date

GET/ledger/balance-sheet

Equity includes retained earnings (3200) with the earnings of prior calendar years rolled in, and the current year's earnings to date.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

as_ofstringrequired

Balance sheet date, YYYY-MM-DD.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getBalanceSheet({
  as_of: "2027-12-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

as_ofstring
json
{
  "as_of": "2027-03-31",
  "assets": {
    "accounts": [
      {
        "code": "1000",
        "name": "Cash - checking",
        "amount": "750.00"
      }
    ],
    "total": "750.00"
  },
  "liabilities": {
    "accounts": [],
    "total": "0.00"
  },
  "equity": {
    "accounts": [
      {
        "code": "3000",
        "name": "Common stock",
        "amount": "0.00"
      }
    ],
    "current_year_earnings": "750.00",
    "total": "750.00"
  },
  "total_liabilities_and_equity": "750.00",
  "balanced": true
}

General-ledger detail

GET/ledger/entries

Postings in date order for ranges of up to 400 days. With account_code, each entry carries the account's running balance.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

date_fromstringrequired

Range start (inclusive), YYYY-MM-DD.

date_tostringrequired

Range end (inclusive), YYYY-MM-DD.

account_codeoptional

Only entries on this account; adds a running balance to each entry.

limitintegeroptional

Entries per page (1-500).

Default: 100

cursorstringoptional

Opaque cursor from pagination.next_cursor / pagination.prev_cursor of a previous response.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listLedgerEntries({
  date_from: "2027-01-01",
  date_to: "2027-03-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "date": "2027-03-10",
      "account_code": "1100",
      "debit": "1100.00",
      "credit": "0.00",
      "source": {
        "type": "invoice",
        "id": "inv_6595a27b5d35015c3ef0c3fd",
        "number": "2027-0001"
      },
      "description": "Invoice 2027-0001",
      "related_party": false,
      "contact_id": "cus_6595a27b5d35015c3ef0c3fd",
      "financial_category_id": null,
      "running_balance": "1100.00"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Monthly bank reconciliation status of a cash account

GET/ledger/reconciliations

One entry per month of the year, from the books start month to the current month. Compares the derived ledger balance of account 1000 or 1050 at each month end with the statement balance: the one marked reconciled, else the closing balance of the latest imported statement of that month.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

account_codestringrequired

Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).

Possible values: "1000", "1050"

yearintegeroptional

Calendar year to list (default: the current year).

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listBankReconciliations({
  account_code: "1000"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

yearinteger
json
{
  "account_code": "1000",
  "year": 2026,
  "months": [
    {
      "period_end": "2026-03-31",
      "ledger_balance": "14047.46",
      "statement_balance": "14047.46",
      "statement_balance_source": "reconciliation",
      "statement_balance_date": "2026-03-31",
      "difference": "0.00",
      "unreviewed_count": 0,
      "status": "reconciled",
      "reconciliation": {
        "statement_balance": "14047.46",
        "ledger_balance": "14047.46",
        "note": "Matched to the March Chase statement",
        "reconciled_at": "2026-04-03T09:12:44.000Z",
        "changed_since": false
      }
    },
    {
      "period_end": "2026-04-30",
      "ledger_balance": "15210.00",
      "statement_balance": "15250.00",
      "statement_balance_source": "import",
      "statement_balance_date": "2026-04-29",
      "difference": "40.00",
      "unreviewed_count": 3,
      "status": "difference",
      "reconciliation": null
    },
    {
      "period_end": "2026-05-31",
      "ledger_balance": "15890.25",
      "statement_balance": null,
      "statement_balance_source": null,
      "statement_balance_date": null,
      "difference": null,
      "unreviewed_count": 0,
      "status": "no_statement",
      "reconciliation": null
    }
  ]
}

List manual journal entries in a date range

GET/journal-entries

List manual journal entries in a date range

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

date_fromstringrequired

Range start (inclusive), YYYY-MM-DD.

date_tostringrequired

Range end (inclusive), YYYY-MM-DD.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listJournalEntries({
  date_from: "2027-01-01",
  date_to: "2027-03-31"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "jou_ent_6595a27b5d35015c3ef0c3fd",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "date": "2027-01-01",
      "kind": "opening_balance",
      "memo": "Opening balances",
      "lines": [
        {
          "account_code": "1000",
          "debit": "5000.00",
          "credit": "0.00",
          "description": "Cash at books start",
          "related_party": false
        },
        {
          "account_code": "3000",
          "debit": "0.00",
          "credit": "5000.00",
          "description": "Founder capital",
          "related_party": true
        }
      ],
      "total": "5000.00",
      "created_by_user_id": "usr_6595a27b5d35015c3ef0c3fd",
      "created_at": "2027-01-02T10:00:00.000Z",
      "updated_at": "2027-01-02T10:00:00.000Z"
    }
  ]
}

List vendor tax profiles

GET/vendor-tax-profiles

Contacts that have a tax profile (US classification, W-9/W-8 on file, related-party flag).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listVendorTaxProfiles({
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "contact_id": "cus_6595a27b5d35015c3ef0c3fd",
      "contact_name": "Founder Consulting LLC",
      "contact_country_code": "US",
      "classification": "us_individual_or_llc",
      "tax_form_on_file": true,
      "is_related_party": false,
      "updated_at": "2027-03-02T10:15:00.000Z"
    }
  ]
}

Get an employee

GET/employees/{id}

Get an employee

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getEmployee('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
statusstring
first_namestring
last_namestring
emailstringnullable
tax_numberstring
personal_idstringnullable
addressstringnullable
post_codestringnullable
citystringnullable
country_codestringnullable
ibanstringnullable
employment_startstring
employment_endstringnullable
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
tax_residencystring
general_allowance_modestring
metadatastringnullable
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "emp_abc123",
  "entity_id": "ent_abc123",
  "status": "active",
  "first_name": "Ana",
  "last_name": "Novak",
  "email": "ana.novak@example.com",
  "tax_number": "12345678",
  "personal_id": null,
  "address": "Dunajska cesta 1",
  "post_code": "1000",
  "city": "Ljubljana",
  "country_code": "SI",
  "iban": "SI56191000000123438",
  "employment_start": "2024-03-01",
  "employment_end": null,
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1541.16,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": null,
  "commute_mode": "per_km",
  "commute_km_one_way": 30,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "tax_residency": "resident",
  "general_allowance_mode": "standard",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T10:00:00.000Z"
}

Get a fixed asset

GET/fixed-assets/{id}

Get a fixed asset

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Query parameters

as_ofstringoptionalnullable

Date the computed fields refer to (YYYY-MM-DD); the month that contains it is included. Defaults to today in the entity's timezone. Null is treated as omitted.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getFixedAsset('ACCOUNTING_ID', undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
namestring
supplier_namestringnullable
notesstringnullable
metadataobject
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "fas_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
  "name": "Laptop Dell XPS 15",
  "inventory_number": "OS-0001",
  "category": "computer_equipment",
  "acquisition_date": "2026-03-15",
  "available_for_use_date": "2026-03-15",
  "acquisition_cost": 1200,
  "residual_value": 0,
  "depreciation_rate": 50,
  "small_value_write_off": false,
  "expense_id": null,
  "supplier_name": "Računalništvo d.o.o.",
  "opening_as_of": null,
  "opening_accumulated_depreciation": 0,
  "opening_tax_deferred": 0,
  "disposal_date": null,
  "disposal_type": null,
  "disposal_proceeds": null,
  "notes": null,
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-03-16T09:00:00.000Z",
  "updated_at": "2026-03-16T09:00:00.000Z",
  "as_of": "2026-12-31",
  "statutory_max_rate": 50,
  "tax_rate_basis": "statutory",
  "asset_class": "other",
  "accumulated_depreciation": 450,
  "net_book_value": 750,
  "tax_deferred_balance": 0,
  "fully_depreciated": false,
  "status": "active",
  "depreciation_start_month": "2026-04",
  "vat_correction_period_years": 5,
  "vat_correction_period_ends_on": "2030-12-31"
}

Get a payroll run with its items

GET/payroll/runs/{id}

Get a payroll run with its items

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getPayrollRun("prun_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "draft",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": null,
  "approved_at": null,
  "paid_by_user_id": null,
  "paid_at": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Get a VAT return filing record

GET/vat-returns/{id}

Get a VAT return filing record

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Get a journal entry

GET/journal-entries/{id}

Get a journal entry

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getJournalEntry("jou_ent_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring<resource-id>

Space Invoices resource identifier (format: {prefix}_{hex24})

Other parameters
entity_idstring
datestring
memostringnullable
created_by_user_idstringnullable
created_atstring
updated_atstring
json
{
  "id": "jou_ent_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "date": "2027-01-01",
  "kind": "opening_balance",
  "memo": "Opening balances",
  "lines": [
    {
      "account_code": "1000",
      "debit": "5000.00",
      "credit": "0.00",
      "description": "Cash at books start",
      "related_party": false
    },
    {
      "account_code": "3000",
      "debit": "0.00",
      "credit": "5000.00",
      "description": "Founder capital",
      "related_party": true
    }
  ],
  "total": "5000.00",
  "created_by_user_id": "usr_6595a27b5d35015c3ef0c3fd",
  "created_at": "2027-01-02T10:00:00.000Z",
  "updated_at": "2027-01-02T10:00:00.000Z"
}

US tax-year worksheet (Form 1120, Schedules L/M-1/M-2, Form 5472, Delaware, 1099-NEC)

GET/us-tax-years/{year}

A worksheet for the company's own tax preparer, computed from the accrual ledger for the calendar year: Form 1120 page 1 lines, line 26 statement, Schedules L, M-1 and M-2, a Form 5472 Part IV summary, the Delaware franchise tax under both methods, and the Form 1099-NEC recipient list. It is not an e-file. Line 29a applies the net operating loss carryforward (the pre-2018 pool first, then post-2017 losses capped at 80% of line 28), starting from the amounts in the accounting settings and the losses the ledger generated; form_1120.nol_schedule shows the roll-forward. Equity flows with the related party are left to the preparer; warnings lists what needs attention.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

yearintegerrequired

Tax year (calendar year, 2000 through next year).

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getUsTaxYearWorksheet(2027, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

yearinteger
json
{
  "year": 2027,
  "company": {
    "name": "Acme Inc.",
    "ein": "12-3456789",
    "address": "8 The Green, Dover DE 19901, United States",
    "state_of_incorporation": "DE",
    "business_activity_code": "518210"
  },
  "form_1120": {
    "lines": [
      {
        "line": "1a",
        "label": "Gross receipts or sales",
        "amount": "1000.00"
      },
      {
        "line": "26",
        "label": "Other deductions (see statement)",
        "amount": "120.00"
      },
      {
        "line": "28",
        "label": "Taxable income before NOL and special deductions",
        "amount": "880.00"
      },
      {
        "line": "29a",
        "label": "Net operating loss deduction",
        "amount": "0.00"
      },
      {
        "line": "29c",
        "label": "Add lines 29a and 29b",
        "amount": "0.00"
      },
      {
        "line": "30",
        "label": "Taxable income",
        "amount": "880.00"
      },
      {
        "line": "31",
        "label": "Total tax (21% of line 30)",
        "amount": "184.80"
      }
    ],
    "other_deductions_statement": [
      {
        "label": "Software",
        "financial_category_id": "fcat_6a44700764c334f34ad63f1d",
        "account_code": "6800",
        "amount": "120.00"
      }
    ],
    "nol_schedule": {
      "available_start": {
        "pre_2018": "0.00",
        "post_2017": "0.00"
      },
      "generated": "0.00",
      "used": {
        "pre_2018": "0.00",
        "post_2017": "0.00"
      },
      "available_end": {
        "pre_2018": "0.00",
        "post_2017": "0.00"
      }
    },
    "small_corporation_exemption": {
      "total_receipts": "1000.00",
      "total_assets": "5980.00",
      "schedules_l_m1_m2_required": false
    }
  },
  "schedule_l": {
    "lines": [
      {
        "line": "1",
        "label": "Cash",
        "beginning": "5000.00",
        "end": "5980.00"
      },
      {
        "line": "15",
        "label": "Total assets",
        "beginning": "5000.00",
        "end": "5980.00"
      },
      {
        "line": "25",
        "label": "Retained earnings - unappropriated",
        "beginning": "0.00",
        "end": "880.00"
      },
      {
        "line": "28",
        "label": "Total liabilities and shareholders' equity",
        "beginning": "5000.00",
        "end": "5980.00"
      }
    ],
    "balanced": true
  },
  "schedule_m1": {
    "lines": [
      {
        "line": "10",
        "label": "Income (page 1, line 28): line 6 less line 9",
        "amount": "880.00"
      }
    ]
  },
  "schedule_m2": {
    "lines": [
      {
        "line": "8",
        "label": "Balance at end of year",
        "amount": "880.00"
      }
    ]
  },
  "form_5472": {
    "required": false,
    "reporting_corporation": {
      "name": "Acme Inc.",
      "ein": "12-3456789",
      "total_assets": "5980.00",
      "business_activity_code": "518210",
      "country_of_incorporation": "US"
    },
    "foreign_shareholder": null,
    "related_parties": [],
    "forms_required": 0
  },
  "delaware_franchise_tax": {
    "inputs": {
      "share_classes": [
        {
          "name": "Common",
          "authorized_shares": 10000000,
          "par_value": "0.00001"
        }
      ],
      "authorized_shares": 10000000,
      "issued_shares": 8000000,
      "total_gross_assets": "10000.00"
    },
    "missing_inputs": [],
    "authorized_shares_method": {
      "tax": "85165.00"
    },
    "assumed_par_value_method": {
      "assumed_par": "0.00125",
      "assumed_par_value_capital": "12500.00",
      "classes": [
        {
          "name": "Common",
          "authorized_shares": 10000000,
          "par_value": "0.00001",
          "applied_par": "0.00125",
          "capital": "12500.00"
        }
      ],
      "tax": "400.00"
    },
    "tax": "400.00",
    "annual_report_fee": "50.00",
    "total_due": "450.00",
    "installments_required": false,
    "due_date": "2028-03-01"
  },
  "form_1099_nec": {
    "threshold": "2000.00",
    "threshold_verified": false,
    "due_date": "2028-01-31",
    "recipients": []
  },
  "warnings": [
    {
      "code": "nol_carryforward_missing",
      "message": "No net operating loss carryforward is recorded in the accounting settings, so line 29a only uses losses the ledger generated. Confirm prior-year losses with the preparer and enter them as the NOL carryforward.",
      "amount": "880.00"
    }
  ]
}

Update an employee

PATCH/employees/{id}

Pay fields (employment type, weekly hours, gross salary, seniority, meal allowance, commute, remote work) edit the dated compensation record in effect today, in place, and the response shows the values in effect today. Refused with 409 when that record governs a period that already has an approved or paid payroll run for the employee: reopen the run first, or add a dated record with the compensation endpoints. Repeating the stored values changes nothing. A 409 is also returned for a duplicate tax number.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Body parameters

emailstringoptionalnullable
addressstringoptionalnullable
post_codestringoptionalnullable
citystringoptionalnullable
country_codestringoptionalnullable
ibanstringoptionalnullable
employment_endstringoptionalnullable
meal_allowance_per_daynumberoptionalnullable
commute_km_one_waynumberoptionalnullable
commute_amount_monthlynumberoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.modifyEmployee('ACCOUNTING_ID', {
  gross_salary_monthly: 1600
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
statusstring
first_namestring
last_namestring
emailstringnullable
tax_numberstring
personal_idstringnullable
addressstringnullable
post_codestringnullable
citystringnullable
country_codestringnullable
ibanstringnullable
employment_startstring
employment_endstringnullable
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
tax_residencystring
general_allowance_modestring
metadatastringnullable
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "emp_abc123",
  "entity_id": "ent_abc123",
  "status": "active",
  "first_name": "Ana",
  "last_name": "Novak",
  "email": "ana.novak@example.com",
  "tax_number": "12345678",
  "personal_id": null,
  "address": "Dunajska cesta 1",
  "post_code": "1000",
  "city": "Ljubljana",
  "country_code": "SI",
  "iban": "SI56191000000123438",
  "employment_start": "2024-03-01",
  "employment_end": null,
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1600,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": null,
  "commute_mode": "per_km",
  "commute_km_one_way": 30,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "tax_residency": "resident",
  "general_allowance_mode": "standard",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T12:00:00.000Z"
}

Replace an employee's stored attendance days for a month

PUT/employees/{id}/attendance

Replace an employee's stored attendance days for a month

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Query parameters

yearintegerrequired
monthintegerrequired

Body parameters

daysarray of objectsrequired
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.replaceEmployeeAttendance('ACCOUNTING_ID', {
  days: [
    {
      date: "2026-08-18",
      kind: "sick",
      sick_reason: "illness"
    },
    {
      date: "2026-08-19",
      kind: "sick",
      sick_reason: "illness"
    },
    {
      date: "2026-08-20",
      kind: "sick",
      sick_reason: "illness"
    }
  ]
}, {
  year: 2026,
  month: 8
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

employee_idstring
yearnumber
monthnumber
json
{
  "employee_id": "emp_abc123",
  "year": 2026,
  "month": 8,
  "days": [
    {
      "date": "2026-08-01",
      "kind": "weekend",
      "hours": 0,
      "sick_reason": null,
      "note": null,
      "stored": false
    },
    {
      "date": "2026-08-03",
      "kind": "worked",
      "hours": 8,
      "sick_reason": null,
      "note": null,
      "stored": false
    },
    {
      "date": "2026-08-15",
      "kind": "public_holiday",
      "hours": 0,
      "sick_reason": null,
      "note": null,
      "stored": false
    }
  ],
  "summary": {
    "working_days": 21,
    "worked": 18,
    "sick": 3,
    "vacation": 0,
    "public_holiday": 0,
    "paid_leave": 0,
    "unpaid": 0,
    "other": 0,
    "weekend": 10
  }
}

Update a dated compensation record

PATCH/employees/{id}/compensation/{compensation_id}

Changes the pay inputs and/or effective_from of one record. Refused with 409 when the periods it governs, before or after the change, include an approved or paid payroll run for the employee: reopen that run first.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Employee identifier (emp_ prefix).

compensation_idstring<resource-id>required

Compensation record identifier (empc_ prefix).

Body parameters

meal_allowance_per_daynumberoptionalnullable
commute_km_one_waynumberoptionalnullable
commute_amount_monthlynumberoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.modifyEmployeeCompensation('ACCOUNTING_ID', 'COMPENSATION_ID', {
  commute_km_one_way: 22
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
employee_idstring
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "empc_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_abc123",
  "employee_id": "emp_abc123",
  "effective_from": "2026-02-01",
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1481.88,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": 7.96,
  "commute_mode": "per_km",
  "commute_km_one_way": 22,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T10:00:00.000Z"
}

Update a fixed asset

PATCH/fixed-assets/{id}

Omitted fields are unchanged; null clears only the clearable fields (inventory_number, expense_id, supplier_name, opening_as_of, notes). The merged result is validated again. Disposal fields cannot be changed here.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.modifyFixedAsset('ACCOUNTING_ID', {
  name: "Laptop Dell XPS 15 (zamenjan zaslon)",
  notes: "Zaslon zamenjan v garanciji."
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
supplier_namestringnullable
notesstringnullable
metadataobject
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "fas_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
  "name": "Laptop Dell XPS 15 (zamenjan zaslon)",
  "inventory_number": "OS-0001",
  "category": "computer_equipment",
  "acquisition_date": "2026-03-15",
  "available_for_use_date": "2026-03-15",
  "acquisition_cost": 1200,
  "residual_value": 0,
  "depreciation_rate": 50,
  "small_value_write_off": false,
  "expense_id": null,
  "supplier_name": "Računalništvo d.o.o.",
  "opening_as_of": null,
  "opening_accumulated_depreciation": 0,
  "opening_tax_deferred": 0,
  "disposal_date": null,
  "disposal_type": null,
  "disposal_proceeds": null,
  "notes": "Zaslon zamenjan v garanciji.",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-03-16T09:00:00.000Z",
  "updated_at": "2026-03-17T12:00:00.000Z",
  "as_of": "2026-12-31",
  "statutory_max_rate": 50,
  "tax_rate_basis": "statutory",
  "asset_class": "other",
  "accumulated_depreciation": 450,
  "net_book_value": 750,
  "tax_deferred_balance": 0,
  "fully_depreciated": false,
  "status": "active",
  "depreciation_start_month": "2026-04",
  "vat_correction_period_years": 5,
  "vat_correction_period_ends_on": "2030-12-31"
}

Set an entity-specific override for a payroll parameter

PUT/payroll/parameters/{key}

Requires accounting access (accountant or admin role, or account owner/admin). Creates an effective-dated override row for the current entity.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

keystringrequired

Dotted payroll parameter key.

Query parameters

country_codestringoptional

Default: "SI"

Body parameters

effective_fromstringrequired
Other parameters
valuenumberoptionalnullable
value_jsonobjectoptionalnullable
unitstringoptionalnullable
effective_tostringoptionalnullable
source_urlstringoptionalnullable
source_titlestringoptionalnullable
notestringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.setPayrollParameterOverride("employee_contributions.piz", {
  value: 8.5,
  unit: "eur_per_working_day",
  effective_from: "2026-09-01",
  source_title: "Internal decision: higher meal allowance for this entity"
}, undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
country_codestring
keystring
value_numericnumbernullable
value_jsonstringnullable
unitstringnullable
effective_fromstring
effective_tostringnullable
source_urlstringnullable
source_titlestringnullable
verifiedboolean
notestringnullable
entity_idstringnullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ppar_def456",
  "country_code": "SI",
  "key": "meal_allowance_tax_free_per_day",
  "value_numeric": 8.5,
  "value_json": null,
  "unit": "eur_per_working_day",
  "effective_from": "2026-09-01",
  "effective_to": null,
  "source_url": null,
  "source_title": "Internal decision: higher meal allowance for this entity",
  "verified": true,
  "note": null,
  "entity_id": "ent_abc123",
  "scope": "entity",
  "created_at": "2026-09-16T10:00:00.000Z",
  "updated_at": "2026-09-16T10:00:00.000Z"
}

Change the refund request or opening credit of a draft VAT return

PATCH/vat-returns/{id}

Draft only. Stores request_refund (DDV-O box 04) and/or opening_credit and recomputes only the stored payment block (amount due, credit carried out, UPN QR) from the stored boxes and a fresh lookup of the previous period's credit. It does not recompute the KIR/KPR boxes; use recompute for that. A field that is null or omitted leaves the stored value unchanged (there is no operation that clears the opening credit).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.update("vatf_6595a27b5d35015c3ef0c3fd", {
  request_refund: false,
  opening_credit: 100
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Mark a month of a cash account as reconciled

PUT/ledger/reconciliations/{account_code}/{period_end}

Records the sign-off for the month ending period_end. Refused with 422 when period_end is not a month end, the month has not started, or statement_balance differs from the current ledger balance at period_end (the message states the difference). Repeating the call refreshes the sign-off and its ledger snapshot.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

account_codestringrequired

Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).

Possible values: "1000", "1050"

period_endstringrequired

Last day of the month being reconciled, YYYY-MM-DD.

Body parameters

statement_balancenumberrequired

Closing balance on the bank statement (at most 2 decimals; negative for an overdraft). Must equal the ledger balance at period_end, otherwise the request is refused with 422.

Other parameters
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.markBankReconciled("1000", "2026-03-31", {
  statement_balance: 14047.46,
  note: "Matched to the March Chase statement"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

json
{
  "period_end": "2026-03-31",
  "ledger_balance": "14047.46",
  "statement_balance": "14047.46",
  "statement_balance_source": "reconciliation",
  "statement_balance_date": "2026-03-31",
  "difference": "0.00",
  "unreviewed_count": 0,
  "status": "reconciled",
  "reconciliation": {
    "statement_balance": "14047.46",
    "ledger_balance": "14047.46",
    "note": "Matched to the March Chase statement",
    "reconciled_at": "2026-04-03T09:12:44.000Z",
    "changed_since": false
  }
}

Revise a journal entry

PATCH/journal-entries/{id}

Omitted fields stay unchanged; lines replaces the whole set and must still balance.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

datestringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.reviseJournalEntry("jou_ent_6595a27b5d35015c3ef0c3fd", {
  memo: "Corrected opening balances",
  lines: [
    {
      account_code: "1000",
      debit: 5500
    },
    {
      account_code: "3000",
      credit: 5500,
      related_party: true
    }
  ]
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring<resource-id>

Space Invoices resource identifier (format: {prefix}_{hex24})

Other parameters
entity_idstring
datestring
memostringnullable
created_by_user_idstringnullable
created_atstring
updated_atstring
json
{
  "id": "jou_ent_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "date": "2027-01-01",
  "kind": "opening_balance",
  "memo": "Opening balances",
  "lines": [
    {
      "account_code": "1000",
      "debit": "5000.00",
      "credit": "0.00",
      "description": "Cash at books start",
      "related_party": false
    },
    {
      "account_code": "3000",
      "debit": "0.00",
      "credit": "5000.00",
      "description": "Founder capital",
      "related_party": true
    }
  ],
  "total": "5000.00",
  "created_by_user_id": "usr_6595a27b5d35015c3ef0c3fd",
  "created_at": "2027-01-02T10:00:00.000Z",
  "updated_at": "2027-01-02T10:00:00.000Z"
}

Set a vendor tax profile

PUT/vendor-tax-profiles/{contact_id}

Creates or updates the profile of a contact. Omitted fields stay unchanged (false on first save); classification: null clears the classification. 404 when the contact does not exist in the entity or is deleted.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

contact_idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.setVendorTaxProfile("cus_6595a27b5d35015c3ef0c3fd", {
  classification: "us_individual_or_llc",
  tax_form_on_file: true
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

contact_namestring
contact_country_codestringnullable
updated_atstring<date-time>
json
{
  "contact_id": "cus_6595a27b5d35015c3ef0c3fd",
  "contact_name": "Founder Consulting LLC",
  "contact_country_code": "US",
  "classification": "us_individual_or_llc",
  "tax_form_on_file": true,
  "is_related_party": false,
  "updated_at": "2027-03-02T10:15:00.000Z"
}

Delete (soft) an employee

DELETE/employees/{id}

Delete (soft) an employee

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.archiveEmployee('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Delete a dated compensation record

DELETE/employees/{id}/compensation/{compensation_id}

Soft-deletes the record; its periods fall back to the previous record. Refused with 409 for the employee's only record, for the earliest record once the employee has payroll runs, and when an approved or paid payroll run covers the periods it governs.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Employee identifier (emp_ prefix).

compensation_idstring<resource-id>required

Compensation record identifier (empc_ prefix).

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.removeEmployeeCompensation('ACCOUNTING_ID', 'COMPENSATION_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Delete (soft) a fixed asset

DELETE/fixed-assets/{id}

Delete (soft) a fixed asset

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.archiveFixedAsset('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Delete (soft) a draft payroll run

DELETE/payroll/runs/{id}

Delete (soft) a draft payroll run

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.discardPayrollRun("prun_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Reopen a reconciled month

DELETE/ledger/reconciliations/{account_code}/{period_end}

Removes the sign-off. Reopening a month that is not reconciled succeeds as well.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

account_codestringrequired

Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).

Possible values: "1000", "1050"

period_endstringrequired

Last day of the month being reconciled, YYYY-MM-DD.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.reopenBankReconciliation("1000", "2026-03-31", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Delete (soft) a journal entry

DELETE/journal-entries/{id}

Delete (soft) a journal entry

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.accounting.archiveJournalEntry("jou_ent_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Preview DDV-O box totals for a period

GET/vat-returns/preview

Non-mutating: aggregates the existing KIR/KPR classifier output into DDV-O box totals. Does not persist a filing record. It also returns form_boxes (the same boxes in whole euros as the eDavki form takes them), payment (amount due after the credit carried from the previous submitted filing, due date, IBAN, reference and UPN QR) and late_filing (whether filing now is late, with the Samoprijava interest). For a monthly period with an RP-O obligation it also returns recapitulative_statement, the RP-O (VIES-KP) built from the same intra-EU supplies (sections A and B, the A13-A17 totals, the reconciliation with DDV-O box 12, warnings and blocking issues); it is null for a quarterly period or when no RP-O is owed.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

yearstringrequired

Year for the VAT return period (e.g. 2026).

monthstringoptional

Month (1-12) for a monthly period. Cannot be used with quarter.

quarterstringoptional

Quarter (1-4) for a quarterly period. Cannot be used with month.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.preview({
  year: "2026"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

period_matches_settingboolean
warningsarray of strings
json
{
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "deadline": {
    "due_date": "2026-09-30",
    "kir_kpr_prefill_cutoff": "2026-09-25"
  },
  "rpo_required": true,
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ]
}

Get an employee's attendance calendar for a month

GET/employees/{id}/attendance

Get an employee's attendance calendar for a month

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Query parameters

yearintegerrequired
monthintegerrequired
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getEmployeeAttendance('ACCOUNTING_ID', {
  year: 2026,
  month: 8
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

employee_idstring
yearnumber
monthnumber
json
{
  "employee_id": "emp_abc123",
  "year": 2026,
  "month": 8,
  "days": [
    {
      "date": "2026-08-01",
      "kind": "weekend",
      "hours": 0,
      "sick_reason": null,
      "note": null,
      "stored": false
    },
    {
      "date": "2026-08-03",
      "kind": "worked",
      "hours": 8,
      "sick_reason": null,
      "note": null,
      "stored": false
    },
    {
      "date": "2026-08-15",
      "kind": "public_holiday",
      "hours": 0,
      "sick_reason": null,
      "note": null,
      "stored": false
    }
  ],
  "summary": {
    "working_days": 21,
    "worked": 18,
    "sick": 3,
    "vacation": 0,
    "public_holiday": 0,
    "paid_leave": 0,
    "unpaid": 0,
    "other": 0,
    "weekend": 10
  }
}

List an employee's dated compensation records

GET/employees/{id}/compensation

Pay inputs that apply from a month on, ascending by effective_from. A payroll run uses the record in effect on the first day of its period.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.listEmployeeCompensation('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "empc_6595a27b5d35015c3ef0c401",
      "entity_id": "ent_abc123",
      "employee_id": "emp_abc123",
      "effective_from": "2024-03-01",
      "employment_type": "full_time",
      "weekly_hours": 40,
      "gross_salary_monthly": 1390.6,
      "seniority_bonus_percent": 4,
      "meal_allowance_per_day": 7.96,
      "commute_mode": "per_km",
      "commute_km_one_way": 30,
      "commute_amount_monthly": null,
      "works_remotely": false,
      "created_at": "2026-04-15T10:00:00.000Z",
      "updated_at": "2026-04-15T10:00:00.000Z"
    },
    {
      "id": "empc_6595a27b5d35015c3ef0c402",
      "entity_id": "ent_abc123",
      "employee_id": "emp_abc123",
      "effective_from": "2026-02-01",
      "employment_type": "full_time",
      "weekly_hours": 40,
      "gross_salary_monthly": 1481.88,
      "seniority_bonus_percent": 4,
      "meal_allowance_per_day": 7.96,
      "commute_mode": "per_km",
      "commute_km_one_way": 30,
      "commute_amount_monthly": null,
      "works_remotely": false,
      "created_at": "2026-04-15T10:00:00.000Z",
      "updated_at": "2026-04-15T10:00:00.000Z"
    }
  ]
}

Add a dated compensation record

POST/employees/{id}/compensation

Adds pay inputs that apply from effective_from (the first day of a month) until the next record. Refused with 409 when the change reaches a period that already has an approved or paid payroll run for the employee: reopen that run first. Draft runs are allowed; recompute them afterwards.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Body parameters

effective_fromstringrequired

First day of the month (YYYY-MM-01) from which these values apply, until the next record's effective_from. Mid-month changes are not supported.

gross_salary_monthlynumberrequired
Other parameters
weekly_hoursnumberoptionalnullable
seniority_bonus_percentnumberoptionalnullable
meal_allowance_per_daynumberoptionalnullable
commute_km_one_waynumberoptionalnullable
commute_amount_monthlynumberoptionalnullable
works_remotelybooleanoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.registerEmployeeCompensation('ACCOUNTING_ID', {
  effective_from: "2026-02-01",
  gross_salary_monthly: 1481.88,
  seniority_bonus_percent: 4,
  meal_allowance_per_day: 7.96,
  commute_mode: "per_km",
  commute_km_one_way: 30
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
employee_idstring
employment_typestring
weekly_hoursnumber
gross_salary_monthlynumber
seniority_bonus_percentnumber
meal_allowance_per_daynumbernullable
commute_modestring
commute_km_one_waynumbernullable
commute_amount_monthlynumbernullable
works_remotelyboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "empc_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_abc123",
  "employee_id": "emp_abc123",
  "effective_from": "2026-02-01",
  "employment_type": "full_time",
  "weekly_hours": 40,
  "gross_salary_monthly": 1481.88,
  "seniority_bonus_percent": 4,
  "meal_allowance_per_day": 7.96,
  "commute_mode": "per_km",
  "commute_km_one_way": 30,
  "commute_amount_monthly": null,
  "works_remotely": false,
  "created_at": "2026-04-15T10:00:00.000Z",
  "updated_at": "2026-04-15T10:00:00.000Z"
}

Dispose of a fixed asset

POST/fixed-assets/{id}/dispose

Records a sale or write-off. Depreciation runs through the month of disposal (inclusive) and any deferred tax excess becomes deductible in that month; no schedule rows follow. A second disposal is refused with 422.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

Body parameters

disposal_datestringrequired

Date the asset was sold or written off; not before available_for_use_date (or opening_as_of). Depreciation runs through this month, and any deferred tax excess becomes deductible in it.

disposal_typestringrequired

How the asset left the register: sold (with proceeds) or written_off (no proceeds).

Possible values: "sold", "written_off"

Other parameters
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.disposeFixedAsset('ACCOUNTING_ID', {
  disposal_date: "2027-06-20",
  disposal_type: "sold",
  disposal_proceeds: 20000
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
supplier_namestringnullable
notesstringnullable
metadataobject
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "fas_6595a27b5d35015c3ef0c3fe",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
  "name": "Osebni avtomobil",
  "inventory_number": "OS-0002",
  "category": "equipment_vehicles",
  "acquisition_date": "2026-01-10",
  "available_for_use_date": "2026-01-10",
  "acquisition_cost": 30000,
  "residual_value": 0,
  "depreciation_rate": 25,
  "small_value_write_off": false,
  "expense_id": null,
  "supplier_name": "Računalništvo d.o.o.",
  "opening_as_of": null,
  "opening_accumulated_depreciation": 0,
  "opening_tax_deferred": 0,
  "disposal_date": "2027-06-20",
  "disposal_type": "sold",
  "disposal_proceeds": 20000,
  "notes": null,
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-03-16T09:00:00.000Z",
  "updated_at": "2026-03-16T09:00:00.000Z",
  "as_of": "2027-12-31",
  "statutory_max_rate": 20,
  "tax_rate_basis": "statutory",
  "asset_class": "other",
  "accumulated_depreciation": 10625,
  "net_book_value": 0,
  "tax_deferred_balance": 0,
  "fully_depreciated": false,
  "status": "disposed",
  "depreciation_start_month": "2026-02",
  "vat_correction_period_years": 5,
  "vat_correction_period_ends_on": "2030-12-31"
}

Undo the disposal of a fixed asset

POST/fixed-assets/{id}/undo-disposal

Removes the disposal so the asset depreciates on. Refused with 422 when the asset is not disposed of.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.undoFixedAssetDisposal('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
namestring
supplier_namestringnullable
notesstringnullable
metadataobject
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "fas_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fb",
  "name": "Laptop Dell XPS 15",
  "inventory_number": "OS-0001",
  "category": "computer_equipment",
  "acquisition_date": "2026-03-15",
  "available_for_use_date": "2026-03-15",
  "acquisition_cost": 1200,
  "residual_value": 0,
  "depreciation_rate": 50,
  "small_value_write_off": false,
  "expense_id": null,
  "supplier_name": "Računalništvo d.o.o.",
  "opening_as_of": null,
  "opening_accumulated_depreciation": 0,
  "opening_tax_deferred": 0,
  "disposal_date": null,
  "disposal_type": null,
  "disposal_proceeds": null,
  "notes": null,
  "metadata": {},
  "deleted_at": null,
  "created_at": "2026-03-16T09:00:00.000Z",
  "updated_at": "2026-03-16T09:00:00.000Z",
  "as_of": "2026-12-31",
  "statutory_max_rate": 50,
  "tax_rate_basis": "statutory",
  "asset_class": "other",
  "accumulated_depreciation": 450,
  "net_book_value": 750,
  "tax_deferred_balance": 0,
  "fully_depreciated": false,
  "status": "active",
  "depreciation_start_month": "2026-04",
  "vat_correction_period_years": 5,
  "vat_correction_period_ends_on": "2030-12-31"
}

Get the depreciation schedule of a fixed asset

GET/fixed-assets/{id}/schedule

Full-life monthly schedule (booked depreciation, accumulated, tax allowance, tax-deductible, deferred balance, disposal release) and the same life summarised per calendar year.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.getFixedAssetSchedule('ACCOUNTING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

json
{
  "months": [
    {
      "month": "2026-04",
      "depreciation": 50,
      "accumulated": 50,
      "tax_allowance": 50,
      "tax_deductible": 50,
      "tax_deferred_balance": 0,
      "disposal_release": 0
    },
    {
      "month": "2026-05",
      "depreciation": 50,
      "accumulated": 100,
      "tax_allowance": 50,
      "tax_deductible": 50,
      "tax_deferred_balance": 0,
      "disposal_release": 0
    }
  ],
  "years": [
    {
      "year": 2026,
      "cost": 1200,
      "accumulated_opening": 0,
      "depreciation": 450,
      "accumulated_closing": 450,
      "net_book_value_closing": 750,
      "tax_deductible": 450,
      "tax_non_deductible_deferred": 0,
      "tax_deferred_closing": 0,
      "disposal_gain_loss": 0,
      "disposed_in_year": false
    }
  ]
}

Recompute a draft payroll run

POST/payroll/runs/{id}/recompute

Recalculates every item from the compensation records in effect on the first day of the period, the attendance and the parameters. The optional body replaces the run's payout date, holiday compensation overrides or general allowance override.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.recomputePayrollRun("prun_6595a27b5d35015c3ef0c3fd", {}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "draft",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": null,
  "approved_at": null,
  "paid_by_user_id": null,
  "paid_at": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Approve a draft payroll run (accounting access)

POST/payroll/runs/{id}/approve

Approve a draft payroll run (accounting access)

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.approvePayrollRun("prun_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "approved",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_at": "2026-11-02T09:00:00.000Z",
  "paid_by_user_id": null,
  "paid_at": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Reopen an approved payroll run back to draft (accounting access)

POST/payroll/runs/{id}/reopen

Reopen an approved payroll run back to draft (accounting access)

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.reopenPayrollRun("prun_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "draft",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": null,
  "approved_at": null,
  "paid_by_user_id": null,
  "paid_at": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Record an approved payroll run as paid (accounting access)

POST/payroll/runs/{id}/mark-paid

Marks an approved run as paid. The optional body paid_at (YYYY-MM-DD) records the real payout date instead of today; it must not be in the future (entity time zone) or before the first day of the run period.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

Returns

idstring
Other parameters
entity_idstring
periodstring
payout_datestring
employee_countinteger
grossnumber
employee_contributionsnumber
employer_contributionsnumber
taxnumber
netnumber
engine_versionstring
computed_atstring<date-time>
created_by_user_idstringnullable
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
paid_by_user_idstringnullable
paid_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "prun_6595a27b5d35015c3ef0c3ff",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "period": "2026-10",
  "furs": {
    "rek_income_type": "1001"
  },
  "payout_date": "2026-11-16",
  "status": "paid",
  "employee_count": 1,
  "gross": 1541.16,
  "employee_contributions": 395.37,
  "employer_contributions": 263.53,
  "tax": 109.3,
  "net": 1036.49,
  "payout": 1414.89,
  "parameter_snapshot": {
    "country_code": "SI",
    "as_of": "2026-10-01",
    "parameters": {}
  },
  "engine_version": "si-payroll-2026.1",
  "status_history": [
    {
      "status": "draft",
      "at": "2026-11-01T09:00:00.000Z",
      "by_user_id": "usr_507f1f77bcf86cd799439099"
    }
  ],
  "computed_at": "2026-11-01T09:00:00.000Z",
  "created_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_by_user_id": "usr_507f1f77bcf86cd799439099",
  "approved_at": "2026-11-02T09:00:00.000Z",
  "paid_by_user_id": "usr_507f1f77bcf86cd799439099",
  "paid_at": "2026-11-16T00:00:00.000Z",
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-01T09:00:00.000Z",
  "items": [
    {
      "id": "prit_6595a27b5d35015c3ef0c400",
      "employee_id": "emp_6595a27b5d35015c3ef0c3fd",
      "hours": 176,
      "holiday_hours": 0,
      "base_for_hours_worked": 1481.88,
      "seniority": 59.28,
      "holiday_compensation": 0,
      "holiday_compensation_method": null,
      "holiday_average_hourly_rate": null,
      "gross": 1541.16,
      "employee_contributions": 395.37,
      "employer_contributions": 263.53,
      "tax": 109.3,
      "net": 1036.49,
      "meals_tax_free": 175.12,
      "commute_tax_free": 203.28,
      "payout": 1414.89,
      "furs": {
        "rek_o_fields": {
          "A052": 1541.16,
          "A062": 1541.16,
          "A075O": 395.37,
          "A086O": 263.53,
          "A091": 109.3,
          "S08": 1036.49
        }
      },
      "warnings": []
    }
  ]
}

Export a payroll run as eDavki REK-O XML (accounting access)

GET/payroll/runs/{id}/export

Non-mutating: serializes the run's stored items into the eDavki 'Uvoz dokumenta' REK-O XML (validates against the committed REK-O XSD), with the payment accounts and references of the withheld tax and contributions. Only available once a run is approved or paid; a draft run returns 409. The eDavki business rules (A028 month flags, the A072aO OZP amount, header totals equal to the analytic sums) are checked before the XML is returned. Sole traders (taxpayer type SP) are exported with the same payment accounts as legal entities, because the official FURS list does not distinguish them; the SP XML has not been compared with an accepted eDavki filing.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const blob = await sdk.accounting.exportPayrollRun("prun_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

const arrayBuffer = await blob.arrayBuffer();
const { writeFile } = await import('node:fs/promises');
await writeFile('download.bin', Buffer.from(arrayBuffer));
console.log('Saved download.bin');

Recompute a draft VAT return's DDV-O box snapshot

POST/vat-returns/{id}/recompute

Recomputes the boxes, form boxes, payment block and filing deadline of a draft from the current documents, keeping the stored request_refund and opening_credit.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.recomputeVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Approve a draft VAT return (accounting access)

POST/vat-returns/{id}/approve

Approve a draft VAT return (accounting access)

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.approveVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Record a VAT return as submitted to eDavki (accounting access)

POST/vat-returns/{id}/submit

Marks an approved filing as submitted. The optional furs object records the EDP numbers eDavki assigned and the KIR/KPR evidence id; they are returned in the response furs object and the evidence id is used as idEvidenc in the DDV-O export. A blank or longer than 255 characters furs value is refused with 422. Submit never recomputes the boxes, the payment block or the deadline.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

Country-specific parameters
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.submitVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  submitted_at: "2026-09-25T10:15:00.000Z",
  notes: "notes",
  furs: {
    ddv_o_edp_number: "ddv-o-edp-number",
    rp_o_edp_number: "rp-o-edp-number",
    evidence_id: "KR-123456"
  }
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Reopen an approved VAT return back to draft (accounting access)

POST/vat-returns/{id}/reopen

Reopen an approved VAT return back to draft (accounting access)

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.reopenVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_matches_settingboolean
warningsarray of strings
computed_atstring<date-time>
approved_by_user_idstringnullable
approved_atstring<date-time>nullable
submitted_by_user_idstringnullable
submitted_atstring<date-time>nullable
notesstringnullable
metadataobject
created_atstring<date-time>
updated_atstring<date-time>
Country-specific parameters
json
{
  "id": "id",
  "entity_id": "entity-id",
  "period": {
    "year": 2026,
    "month": 8,
    "quarter": null,
    "from": "2026-08-01",
    "to": "2026-08-31",
    "label": "2026-08"
  },
  "vat_period_setting": "monthly",
  "period_matches_setting": true,
  "status": "draft",
  "boxes": {
    "11": "1234.56",
    "12": "0.00",
    "13": "0.00",
    "14": "0.00",
    "15": "0.00",
    "21": "271.60",
    "22": "0.00",
    "23": "0.00",
    "24": "0.00",
    "25": "0.00",
    "26": "0.00",
    "31": "412.30",
    "32": "0.00",
    "33": "0.00",
    "34": "0.00",
    "35": "0.00",
    "41": "90.71",
    "42": "0.00",
    "43": "0.00",
    "51": "180.89",
    "52": "0.00",
    "11a": "0.00",
    "22a": "0.00",
    "23a": "0.00",
    "24a": "0.00",
    "24b": "0.00",
    "24c": "0.00",
    "25a": "0.00",
    "25b": "0.00",
    "31a": "0.00",
    "32a": "0.00",
    "42a": "0.00"
  },
  "form_boxes": {
    "11": "1235",
    "12": "0",
    "13": "0",
    "14": "0",
    "15": "0",
    "21": "272",
    "22": "0",
    "23": "0",
    "24": "0",
    "25": "0",
    "26": "0",
    "31": "412",
    "32": "0",
    "33": "0",
    "34": "0",
    "35": "0",
    "41": "91",
    "42": "0",
    "43": "0",
    "51": "181",
    "52": "0",
    "11a": "0",
    "22a": "0",
    "23a": "0",
    "24a": "0",
    "24b": "0",
    "24c": "0",
    "25a": "0",
    "25b": "0",
    "31a": "0",
    "32a": "0",
    "42a": "0"
  },
  "request_refund": false,
  "opening_credit": 50,
  "payment": {
    "vat_due": "181",
    "excess": "0",
    "carried_forward_credit": "50",
    "amount_due": "131",
    "credit_carried_out": "0",
    "due_date": "2026-09-30",
    "recipient_name": "PDP - PRORAČUN DRŽAVE",
    "iban": "SI56011008881000030",
    "reference": "SI19 12345678-62006",
    "purpose_code": "TAXS",
    "purpose": "DDV-O 8/2026",
    "upn_qr": "UPNQR\n\n\n\n\n\n\n\n00000013100\n\n\nTAXS\nDDV-O 8/2026\n\nSI56011008881000030\nSI1912345678-62006\nPDP - PRORAČUN DRŽAVE\nGregorčičeva ulica 020\n1000 Ljubljana\n145\n",
    "notes": []
  },
  "late_filing": {
    "is_late": false,
    "self_report": false,
    "interest": "0.00"
  },
  "furs": {
    "ddv_o_edp_number": "ddv-o-edp-number",
    "rp_o_edp_number": "rp-o-edp-number",
    "evidence_id": "KR-123456"
  },
  "recapitulative_statement": {
    "due_date": "2026-11-20",
    "section_a": [
      {
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234"
      }
    ],
    "section_b": [
      {
        "year": 2026,
        "month": 9,
        "country_code": "DE",
        "vat_number": "123456789",
        "goods": "1234",
        "triangular": "1234",
        "services": "1234",
        "previous_value_source": "filing"
      }
    ],
    "totals": {
      "a13": "1234",
      "a14": "1234",
      "a15": "1234",
      "a16": "1234",
      "a17": "1234"
    },
    "reconciliation": {
      "ddv_o_box_12": "1500.40",
      "section_a_total": "1234",
      "differences": [
        {
          "reason": "rounding",
          "amount": "-120.00",
          "document_numbers": [
            "document-numbers"
          ]
        }
      ],
      "unexplained": "0"
    },
    "warnings": [
      "warnings"
    ],
    "blocking_issues": [
      "blocking-issues"
    ]
  },
  "record_counts": {
    "kir": 0,
    "kpr": 0
  },
  "warnings": [
    "warnings"
  ],
  "computed_at": "2025-01-15T10:30:00.000Z",
  "approved_by_user_id": "approved-by-user-id",
  "approved_at": "2025-01-15T10:30:00.000Z",
  "submitted_by_user_id": "submitted-by-user-id",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "notes": "notes",
  "metadata": {},
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Export a VAT return filing as eDavki XML (DDV-O or RP-O)

GET/vat-returns/{id}/export

Non-mutating: serializes a snapshot stored with the filing into the eDavki 'Uvoz dokumenta' XML. With format=ddv_o_xml it exports the DDV-O: the whole-euro form boxes as integers, f03 (always false) and f04 (the stored refund request), idEvidenc from the evidence_id query or the id stored at submit, and, when the entity's today is after the DDV-O filing deadline stored with the filing, selfReport with one selfReportOrCorrection row (period, VAT due and the 3 % interest). self_report overrides that decision. It validates against the committed DDV-O XSD. The evidence_id and self_report query parameters apply to format=ddv_o_xml and are ignored for rp_o_xml. With format=rp_o_xml it exports the RP-O (VIES-KP recapitulative statement) snapshot stored with the filing (validates against the committed VIES_KP XSD), as VIES-KP_YYYY-MM.xml. Neither format recomputes anything. Only available once a filing is approved or submitted; a draft filing returns 409, and so does format=rp_o_xml when the filing has no RP-O (a quarterly period, or no RP-O obligation). format=rp_o_xml returns 422 while the stored RP-O has blocking issues.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Query parameters

formatstringrequired

Export format for a VAT return filing. ddv_o_xml is the DDV-O (VAT return). rp_o_xml is the RP-O (VIES-KP recapitulative statement) stored with the filing; it exists only for a monthly period with an RP-O obligation.

Possible values: "ddv_o_xml", "rp_o_xml"

evidence_idstringoptional

Applies to format=ddv_o_xml and is ignored for rp_o_xml: the KIR/KPR evidence submission id ("KR-..."), written as idEvidenc. Falls back to the evidence id stored on the filing at submit; omitted from the XML when neither exists.

self_reportstringoptional

Applies to format=ddv_o_xml and is ignored for rp_o_xml: overrides the automatic Samoprijava decision. By default the export marks the return as a self-report (ZDDV-1 88.c) with the interest when the entity's today is after the DDV-O filing deadline. Pass true or false when filing on a different day than the export.

Possible values: "true", "false"

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const blob = await sdk.accounting.exportVatReturn("vatf_6595a27b5d35015c3ef0c3fd", {
  format: "ddv_o_xml"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

const arrayBuffer = await blob.arrayBuffer();
const { writeFile } = await import('node:fs/promises');
await writeFile('download.bin', Buffer.from(arrayBuffer));
console.log('Saved download.bin');

Mark a filing obligation as done

POST/filings/{id}/complete

Mark a filing obligation as done

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.completeFiling("flg_6595a27b5d35015c3ef0c3fd", {
  note: "note"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_startstring
period_endstring
due_datestring
sourcestring
done_atstring<date-time>nullable
done_bystringnullable
dismissed_atstring<date-time>nullable
dismissed_bystringnullable
notesstringnullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "type": "ddv_o",
  "period_start": "period-start",
  "period_end": "period-end",
  "due_date": "due-date",
  "kind": "filing",
  "verification": "verified",
  "source": "source",
  "related_resource": {
    "type": "vat_filing",
    "period_key": "period-key",
    "id": "id"
  },
  "status": "upcoming",
  "state": "upcoming",
  "done_at": "2025-01-15T10:30:00.000Z",
  "done_by": "done-by",
  "dismissed_at": "2025-01-15T10:30:00.000Z",
  "dismissed_by": "dismissed-by",
  "notes": "notes",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Reopen a done or dismissed filing obligation back to upcoming

POST/filings/{id}/reopen

Reopen a done or dismissed filing obligation back to upcoming

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.reopenFiling("flg_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_startstring
period_endstring
due_datestring
sourcestring
done_atstring<date-time>nullable
done_bystringnullable
dismissed_atstring<date-time>nullable
dismissed_bystringnullable
notesstringnullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "type": "ddv_o",
  "period_start": "period-start",
  "period_end": "period-end",
  "due_date": "due-date",
  "kind": "filing",
  "verification": "verified",
  "source": "source",
  "related_resource": {
    "type": "vat_filing",
    "period_key": "period-key",
    "id": "id"
  },
  "status": "upcoming",
  "state": "upcoming",
  "done_at": "2025-01-15T10:30:00.000Z",
  "done_by": "done-by",
  "dismissed_at": "2025-01-15T10:30:00.000Z",
  "dismissed_by": "dismissed-by",
  "notes": "notes",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Dismiss a filing obligation that does not apply this period

POST/filings/{id}/dismiss

Dismiss a filing obligation that does not apply this period

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Space Invoices resource identifier (format: {prefix}_{hex24})

Body parameters

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.accounting.dismissFiling("flg_6595a27b5d35015c3ef0c3fd", {
  reason: "reason"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
period_startstring
period_endstring
due_datestring
sourcestring
done_atstring<date-time>nullable
done_bystringnullable
dismissed_atstring<date-time>nullable
dismissed_bystringnullable
notesstringnullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "type": "ddv_o",
  "period_start": "period-start",
  "period_end": "period-end",
  "due_date": "due-date",
  "kind": "filing",
  "verification": "verified",
  "source": "source",
  "related_resource": {
    "type": "vat_filing",
    "period_key": "period-key",
    "id": "id"
  },
  "status": "upcoming",
  "state": "upcoming",
  "done_at": "2025-01-15T10:30:00.000Z",
  "done_by": "done-by",
  "dismissed_at": "2025-01-15T10:30:00.000Z",
  "dismissed_by": "dismissed-by",
  "notes": "notes",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Export the US tax-year worksheet to Excel

GET/us-tax-years/{year}/export

The same worksheet as an Excel workbook (Summary, Form 1120, Line 26 statement, Schedule L, Schedule M-1, Schedule M-2, Form 5472, Delaware franchise tax, 1099-NEC) followed by the supporting profit and loss, balance sheet, trial balance and general ledger for the year. Amounts are numeric cells.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

yearintegerrequired

Tax year (calendar year, 2000 through next year).

import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const blob = await sdk.accounting.exportUsTaxYearWorksheet(2027, {
  entity_id: "YOUR_ENTITY_ID"
});

const arrayBuffer = await blob.arrayBuffer();
const { writeFile } = await import('node:fs/promises');
await writeFile('download.bin', Buffer.from(arrayBuffer));
console.log('Saved download.bin');