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.
The Accounting object
Attributes
{
"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
/employeesCreate an employee
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Slovenian tax number (davcna stevilka), 8 digits. An optional SI prefix is stripped.
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);Returns
{
"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
/fixed-assetsAdds 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
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"
Date the asset was acquired.
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).
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);Returns
{
"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
/payroll/runsComputes 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Payroll period, YYYY-MM.
Date the salaries are paid (REK-O F012). Not before the first day of the period.
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);Returns
{
"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
/vat-returnsComputes 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Year for the VAT return period.
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
{
"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
/journal-entriesBalanced 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
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
Space Invoices resource identifier (format: {prefix}_{hex24})
{
"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
/employeesList employees
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
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.
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.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
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
Pagination metadata including cursors and result counts
{
"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
/fixed-assetsCursor-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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
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.
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.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
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"
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"
Only assets linked to this expense. Omit or null for every asset. Must not be empty.
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
Pagination metadata including cursors and result counts
{
"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
/fixed-assets/registerRegister (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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
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
{
"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
/fixed-assets/register/exportNon-mutating: the register of the year as a CSV or Excel (xlsx) file named osnovna-sredstva-
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Calendar year of the register (2000-2100).
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
/payroll/parametersGet resolved payroll parameters effective on a date
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Default: "SI"
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_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
/payroll/parameters/historyReturns 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Default: "SI"
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
{
"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
/payroll/runsList payroll runs, newest period first
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
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.
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.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
Payroll period, YYYY-MM.
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
Pagination metadata including cursors and result counts
{
"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
/vat-returnsList VAT return filing records, newest period first
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
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.
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.
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
Pagination metadata including cursors and result counts
{
"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
/filingsMaterialises 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Range start (inclusive), YYYY-MM-DD.
Range end (inclusive), YYYY-MM-DD.
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
{
"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
/accounting/filings-calendarAccount-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 Id on which the request is made. Optional if user is part of only one account.
Query parameters
Range start (inclusive), YYYY-MM-DD.
Range end (inclusive), YYYY-MM-DD.
Filter to a single entity id.
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
{
"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
/ledger/accountsList the US chart of accounts
Header parameters
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
{
"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
/ledger/trial-balanceDerived 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Range start (inclusive), YYYY-MM-DD.
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_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
/ledger/profit-and-lossProfit and loss for a period within one calendar year
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Range start (inclusive), YYYY-MM-DD.
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_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
/ledger/balance-sheetEquity includes retained earnings (3200) with the earnings of prior calendar years rolled in, and the current year's earnings to date.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
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_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
/ledger/entriesPostings in date order for ranges of up to 400 days. With account_code, each entry carries the account's running balance.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Range start (inclusive), YYYY-MM-DD.
Range end (inclusive), YYYY-MM-DD.
Only entries on this account; adds a running balance to each entry.
Entries per page (1-500).
Default: 100
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
Pagination metadata including cursors and result counts
{
"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
/ledger/reconciliationsOne 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).
Possible values: "1000", "1050"
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
{
"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
/journal-entriesList manual journal entries in a date range
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Range start (inclusive), YYYY-MM-DD.
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
{
"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
/vendor-tax-profilesContacts that have a tax profile (US classification, W-9/W-8 on file, related-party flag).
Header parameters
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
{
"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
/employees/{id}Get an employee
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/fixed-assets/{id}Get a fixed asset
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.
Query parameters
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
{
"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
/payroll/runs/{id}Get a payroll run with its items
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/vat-returns/{id}Get a VAT return filing record
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/journal-entries/{id}Get a journal entry
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
Space Invoices resource identifier (format: {prefix}_{hex24})
{
"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)
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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.modifyEmployee('ACCOUNTING_ID', {
gross_salary_monthly: 1600
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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
/employees/{id}/attendanceReplace an employee's stored attendance days for a month
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.
Query parameters
Body parameters
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_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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Employee identifier (emp_ prefix).
Compensation record identifier (empc_ prefix).
Body parameters
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
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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);Returns
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Dotted payroll parameter key.
Query parameters
Default: "SI"
Body parameters
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
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).
Possible values: "1000", "1050"
Last day of the month being reconciled, YYYY-MM-DD.
Body parameters
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.
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
{
"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
/journal-entries/{id}Omitted fields stay unchanged; lines replaces the whole set and must still balance.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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.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
Space Invoices resource identifier (format: {prefix}_{hex24})
{
"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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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_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
/employees/{id}Delete (soft) an employee
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Employee identifier (emp_ prefix).
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
/fixed-assets/{id}Delete (soft) a fixed asset
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/payroll/runs/{id}Delete (soft) a draft payroll run
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/ledger/reconciliations/{account_code}/{period_end}Removes the sign-off. Reopening a month that is not reconciled succeeds as well.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Cash account being reconciled: 1000 (bank) or 1050 (payment processor clearing).
Possible values: "1000", "1050"
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
/journal-entries/{id}Delete (soft) a journal entry
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/vat-returns/previewNon-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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Year for the VAT return period (e.g. 2026).
Month (1-12) for a monthly period. Cannot be used with quarter.
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": {
"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
/employees/{id}/attendanceGet an employee's attendance calendar for a month
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.
Query parameters
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_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
/employees/{id}/compensationPay 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/employees/{id}/compensationAdds 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.
Body parameters
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.
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
{
"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
/fixed-assets/{id}/disposeRecords 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.
Body parameters
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.
How the asset left the register: sold (with proceeds) or written_off (no proceeds).
Possible values: "sold", "written_off"
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);Returns
{
"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
/fixed-assets/{id}/undo-disposalRemoves the disposal so the asset depreciates on. Refused with 422 when the asset is not disposed of.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/fixed-assets/{id}/scheduleFull-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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/payroll/runs/{id}/recomputeRecalculates 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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);Returns
{
"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)
/payroll/runs/{id}/approveApprove a draft payroll run (accounting access)
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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)
/payroll/runs/{id}/reopenReopen an approved payroll run back to draft (accounting access)
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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)
/payroll/runs/{id}/mark-paidMarks 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Space Invoices resource identifier (format: {prefix}_{hex24})
Body parameters
Returns
{
"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)
/payroll/runs/{id}/exportNon-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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/vat-returns/{id}/recomputeRecomputes 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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)
/vat-returns/{id}/approveApprove a draft VAT return (accounting access)
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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)
/vat-returns/{id}/submitMarks 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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.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
{
"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)
/vat-returns/{id}/reopenReopen an approved VAT return back to draft (accounting access)
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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)
/vat-returns/{id}/exportNon-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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Space Invoices resource identifier (format: {prefix}_{hex24})
Query parameters
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"
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.
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
/filings/{id}/completeMark a filing obligation as done
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/filings/{id}/reopenReopen a done or dismissed filing obligation back to upcoming
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/filings/{id}/dismissDismiss a filing obligation that does not apply this period
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/us-tax-years/{year}/exportThe 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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');