Skip to content

Entities

The Entity object

object

Attributes

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other attributes
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "ent_7595a27b5d35015c3ef0c3fe",
  "name": "Orbital Systems GmbH",
  "address": "Musterstraße 123",
  "address_2": "Building A",
  "post_code": "10115",
  "city": "Berlin",
  "state": null,
  "country": "Germany",
  "country_code": "DE",
  "currency_code": "EUR",
  "locale": "de-DE",
  "tax_number": "DE123456789",
  "tax_number_2": "12/345/67890",
  "company_number": "HRB 12345",
  "email": null,
  "website": null,
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "number_formats": {
      "invoice": "{yyyy}-{nnnnn}",
      "estimate": "{yyyy}-{nnnnn}",
      "credit_note": "{yyyy}-{nnnnn}",
      "delivery_note": "{yyyy}-{nnnnn}",
      "purchase_order": "{yyyy}-{nnnnn}",
      "expense": "{yyyy}-{nnnnn}"
    },
    "email_defaults": {
      "invoice_subject": "Rechnung {document_number} von {entity_name}",
      "invoice_body": "Anbei finden Sie die Rechnung {document_number}.\nFälligkeitsdatum: {document_due_date}.",
      "estimate_subject": "Angebot {document_number} von {entity_name}",
      "estimate_body": "Anbei finden Sie das Angebot {document_number}.\nGültig bis: {document_valid_until}.",
      "credit_note_subject": "Rechnungskorrektur {document_number} von {entity_name}",
      "credit_note_body": "Anbei finden Sie die Rechnungskorrektur {document_number}.",
      "advance_invoice_subject": "Vorausrechnung {document_number} von {entity_name}",
      "advance_invoice_body": "Anbei finden Sie die Vorausrechnung {document_number}.",
      "delivery_note_subject": "Lieferschein {document_number} von {entity_name}",
      "delivery_note_body": "Anbei finden Sie den Lieferschein {document_number}.",
      "purchase_order_subject": "Bestellung {document_number} von {entity_name}",
      "purchase_order_body": "Anbei finden Sie die Bestellung {document_number}."
    },
    "default_invoice_due_days": 30,
    "default_invoice_payment_terms": null,
    "default_estimate_valid_days": 30,
    "document_footer": "{entity_name}",
    "default_document_signature": "{entity_name}",
    "overdue_notifications": {
      "enabled": false,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Zahlungserinnerung von {entity_name}",
      "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung."
    },
    "payment_reminders": {
      "email_subject": "Zahlungserinnerung von {entity_name}",
      "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung.",
      "payment_instructions": "Bitte verwenden Sie die auf dem Dokument angegebenen Bankdaten."
    },
    "tax_rules": {
      "eu": {
        "vies_validate_vat": true,
        "auto_reverse_charge": false,
        "auto_remove_tax_export": false,
        "auto_apply_destination_vat": false,
        "require_gross_prices": false
      }
    },
    "tax_clause_defaults": {
      "intra_eu_b2b": "§ 13b UStG (Reverse Charge)",
      "3w_b2b": "§ 4 Nr. 1a + § 6 UStG",
      "3w_b2c": "§ 4 Nr. 1a + § 6 UStG"
    },
    "translations": {
      "default_invoice_note": {
        "de-DE": "Vielen Dank fuer Ihren Auftrag."
      },
      "default_invoice_payment_terms": {
        "de-DE": "Zahlbar innerhalb von 30 Tagen."
      },
      "document_footer": {
        "de-DE": "Orbital Systems GmbH"
      },
      "default_document_signature": {
        "de-DE": "Orbital Systems Team"
      },
      "email_defaults": {
        "invoice_subject": {
          "de-DE": "Rechnung {document_number} von {entity_name}"
        },
        "invoice_body": {
          "de-DE": "Anbei finden Sie die Rechnung {document_number}."
        }
      },
      "tax_clause_defaults": {
        "intra_eu_b2b": {
          "de-DE": "Steuerschuldnerschaft des Leistungsempfaengers."
        }
      }
    }
  },
  "account_id": "acc_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "industry": "Technology",
    "size": "Medium"
  },
  "country_rules": {
    "capabilities": {
      "verifactu_setup": false,
      "native_ios": true,
      "native_android": true,
      "custom_document_create": true,
      "manual_document_recovery": false,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true,
      "document_types": [
        "invoice",
        "advance_invoice",
        "credit_note",
        "estimate",
        "delivery_note",
        "purchase_order"
      ]
    },
    "max_taxes_per_item": 1,
    "features": [
      "eu_tax_rules",
      "tax_clause_defaults",
      "tax_number_2",
      "epc_qr"
    ]
  },
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z"
}

Create a new entity

POST/entities

Create a new legal entity (business, organization, or sole proprietor). Entities are the core organizational unit that owns customers, invoices, and items. Each entity can have custom number formatting for invoices and other settings. The entity currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422 (crypto is only available as the currency_code of individual documents). For Czech entities (country_code: CZ) company_number (IČO, 8 digits with check digit) is required and tax_number must be a DIČ (CZ + 8–10 digits); invalid values respond 422 with code CZ_COMPANY_NUMBER_REQUIRED, CZ_INVALID_COMPANY_NUMBER or CZ_INVALID_TAX_NUMBER.

Header parameters

account_idstringoptional

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

Body parameters

namestringrequired
addressstringoptionalnullable
citystringoptionalnullable
countrystringrequired
country_codestringoptionalnullable
currency_codestringoptionalnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringoptionalnullable
emailstringoptionalnullable
settingsobjectoptional

Entity settings

metadataobjectoptionalnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringoptionalnullable
post_codestringoptionalnullable
statestringoptionalnullable
localestringoptionalnullable
tax_number_2stringoptionalnullable
company_numberstringoptionalnullable
phonestringoptionalnullable
websitestringoptionalnullable
fiscal_region_codestringoptionalnullable
starting_capitalnumberoptionalnullable
is_tax_subjectbooleanoptional
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.create({
  name: "Starward Equipment Co.",
  country: "United States"
}, {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);
Country:
Example:

Returns

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Starward Equipment Co.",
  "address": null,
  "address_2": null,
  "post_code": null,
  "city": null,
  "state": null,
  "country": "United States",
  "country_code": "US",
  "currency_code": "USD",
  "locale": "en-US",
  "tax_number": null,
  "tax_number_2": null,
  "company_number": null,
  "email": null,
  "website": null,
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "number_formats": {
      "invoice": "{yyyy}-{nnnnn}",
      "estimate": "{yyyy}-{nnnnn}",
      "credit_note": "{yyyy}-{nnnnn}",
      "delivery_note": "{yyyy}-{nnnnn}",
      "purchase_order": "{yyyy}-{nnnnn}",
      "expense": "{yyyy}-{nnnnn}"
    },
    "email_defaults": {
      "invoice_subject": "Invoice {document_number} from {entity_name}",
      "invoice_body": "Please find invoice {document_number} attached.\nDue date: {document_due_date}.\n\n[View document]({invoice_link})",
      "estimate_subject": "{document_label} {document_number} from {entity_name}",
      "estimate_body": "Please find {document_label} {document_number} attached.\nValid until: {document_valid_until}.\n\n[View document]({invoice_link})",
      "credit_note_subject": "Credit note {document_number} from {entity_name}",
      "credit_note_body": "Please find credit note {document_number} attached.\n\n[View document]({invoice_link})",
      "advance_invoice_subject": "Advance invoice {document_number} from {entity_name}",
      "advance_invoice_body": "Please find advance invoice {document_number} attached.\n\n[View document]({invoice_link})",
      "delivery_note_subject": "Delivery note {document_number} from {entity_name}",
      "delivery_note_body": "Please find delivery note {document_number} attached.\n\n[View document]({invoice_link})",
      "purchase_order_subject": "Purchase order {document_number} from {entity_name}",
      "purchase_order_body": "Please find purchase order {document_number} attached.\n\n[View document]({invoice_link})"
    },
    "default_invoice_due_days": 30,
    "default_invoice_payment_terms": null,
    "default_estimate_valid_days": 30,
    "document_footer": "{entity_name}",
    "default_document_signature": "{entity_name}",
    "overdue_notifications": {
      "enabled": false,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,"
    },
    "payment_reminders": {
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,",
      "payment_instructions": "Please remit payment using the bank details shown on the document."
    },
    "tax_rules": null
  },
  "account_id": "acc_6595a27b5d35015c3ef0c3fd",
  "metadata": {},
  "country_rules": {
    "capabilities": {
      "verifactu_setup": false,
      "native_ios": true,
      "native_android": true,
      "custom_document_create": true,
      "manual_document_recovery": false,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true,
      "document_types": [
        "invoice",
        "advance_invoice",
        "credit_note",
        "estimate",
        "delivery_note",
        "purchase_order"
      ]
    },
    "max_taxes_per_item": 3,
    "features": [
      "us_tax_rate_lookup",
      "e_invoicing",
      "accounting_module"
    ]
  },
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z"
}
Example:

List all entities

GET/entities

Retrieve a paginated list of entities with optional filtering and sorting. Supports cursor-based pagination for efficient navigation, flexible JSON querying with MongoDB-style operators, full-text search across entity names and countries, and sorting by various entity properties.

Header parameters

account_idstringoptional

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

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

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

prev_cursorstringoptional

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

include_total_countbooleanoptional

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

order_byoptional

Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with - for descending order. When paginating, reuse cursors only with the same effective ordering.

querystring<json>optional

JSON query object for filtering results. Supports MongoDB-style operators.

Array columns (such as an item's categories) compare as sets: a direct value asks whether the list contains it, contains takes an array and requires all of them, in matches any of them, and notIn matches none. Scalar operators such as gt do not apply and are ignored.

Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]

Allowed fields: id, name, country, currency_code, created_at, updated_at

Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range

searchstringoptional

Full-text search query to filter results across multiple fields.
Searches are case-insensitive and match partial strings.
Searches across all text fields including names, descriptions, addresses, and metadata values.

environmentstringoptional

Environment making queries on. Defaults to "live".

Possible values: "live", "sandbox"

Default: "live"

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.list({
  limit: 20,
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "ent_7595a27b5d35015c3ef0c3fe",
      "name": "Orbital Systems GmbH",
      "address": "Musterstraße 123",
      "address_2": "Building A",
      "post_code": "10115",
      "city": "Berlin",
      "state": null,
      "country": "Germany",
      "country_code": "DE",
      "currency_code": "EUR",
      "locale": "de-DE",
      "tax_number": "DE123456789",
      "tax_number_2": "12/345/67890",
      "company_number": "HRB 12345",
      "email": null,
      "website": null,
      "environment": "live",
      "is_tax_subject": true,
      "is_enabled": true,
      "settings": {
        "number_formats": {
          "invoice": "{yyyy}-{nnnnn}",
          "estimate": "{yyyy}-{nnnnn}",
          "credit_note": "{yyyy}-{nnnnn}",
          "delivery_note": "{yyyy}-{nnnnn}",
          "purchase_order": "{yyyy}-{nnnnn}",
          "expense": "{yyyy}-{nnnnn}"
        },
        "email_defaults": {
          "invoice_subject": "Rechnung {document_number} von {entity_name}",
          "invoice_body": "Anbei finden Sie die Rechnung {document_number}.\nFälligkeitsdatum: {document_due_date}.",
          "estimate_subject": "Angebot {document_number} von {entity_name}",
          "estimate_body": "Anbei finden Sie das Angebot {document_number}.\nGültig bis: {document_valid_until}.",
          "credit_note_subject": "Rechnungskorrektur {document_number} von {entity_name}",
          "credit_note_body": "Anbei finden Sie die Rechnungskorrektur {document_number}.",
          "advance_invoice_subject": "Vorausrechnung {document_number} von {entity_name}",
          "advance_invoice_body": "Anbei finden Sie die Vorausrechnung {document_number}.",
          "delivery_note_subject": "Lieferschein {document_number} von {entity_name}",
          "delivery_note_body": "Anbei finden Sie den Lieferschein {document_number}.",
          "purchase_order_subject": "Bestellung {document_number} von {entity_name}",
          "purchase_order_body": "Anbei finden Sie die Bestellung {document_number}."
        },
        "default_invoice_due_days": 30,
        "default_invoice_payment_terms": null,
        "default_estimate_valid_days": 30,
        "document_footer": "{entity_name}",
        "default_document_signature": "{entity_name}",
        "overdue_notifications": {
          "enabled": false,
          "threshold_days": [
            7,
            14,
            30
          ],
          "email_subject": "Zahlungserinnerung von {entity_name}",
          "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung."
        },
        "payment_reminders": {
          "email_subject": "Zahlungserinnerung von {entity_name}",
          "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung.",
          "payment_instructions": "Bitte verwenden Sie die auf dem Dokument angegebenen Bankdaten."
        },
        "tax_rules": {
          "eu": {
            "vies_validate_vat": true,
            "auto_reverse_charge": false,
            "auto_remove_tax_export": false,
            "auto_apply_destination_vat": false,
            "require_gross_prices": false
          }
        },
        "tax_clause_defaults": {
          "intra_eu_b2b": "§ 13b UStG (Reverse Charge)",
          "3w_b2b": "§ 4 Nr. 1a + § 6 UStG",
          "3w_b2c": "§ 4 Nr. 1a + § 6 UStG"
        },
        "translations": {
          "default_invoice_note": {
            "de-DE": "Vielen Dank fuer Ihren Auftrag."
          },
          "default_invoice_payment_terms": {
            "de-DE": "Zahlbar innerhalb von 30 Tagen."
          },
          "document_footer": {
            "de-DE": "Orbital Systems GmbH"
          },
          "default_document_signature": {
            "de-DE": "Orbital Systems Team"
          },
          "email_defaults": {
            "invoice_subject": {
              "de-DE": "Rechnung {document_number} von {entity_name}"
            },
            "invoice_body": {
              "de-DE": "Anbei finden Sie die Rechnung {document_number}."
            }
          },
          "tax_clause_defaults": {
            "intra_eu_b2b": {
              "de-DE": "Steuerschuldnerschaft des Leistungsempfaengers."
            }
          }
        }
      },
      "account_id": "acc_6595a27b5d35015c3ef0c3fd",
      "metadata": {
        "industry": "Technology",
        "size": "Medium"
      },
      "country_rules": {
        "capabilities": {
          "verifactu_setup": false,
          "native_ios": true,
          "native_android": true,
          "custom_document_create": true,
          "manual_document_recovery": false,
          "document_drafts": true,
          "issued_document_edit": true,
          "document_email": true,
          "credit_note_payments": true,
          "advance_invoice_application": true,
          "recurring_invoices": true,
          "pdf_templates": true,
          "pdf_languages": true,
          "e_invoicing": true,
          "order_reissue": true,
          "document_types": [
            "invoice",
            "advance_invoice",
            "credit_note",
            "estimate",
            "delivery_note",
            "purchase_order"
          ]
        },
        "max_taxes_per_item": 1,
        "features": [
          "eu_tax_rules",
          "tax_clause_defaults",
          "tax_number_2",
          "epc_qr"
        ]
      },
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-09-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get entity by ID

GET/entities/{id}

Retrieve a single legal entity by its unique identifier. Returns the full entity including settings, metadata, and computed country rules.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.get("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ent_7595a27b5d35015c3ef0c3fe",
  "name": "Orbital Systems GmbH",
  "address": "Musterstraße 123",
  "address_2": "Building A",
  "post_code": "10115",
  "city": "Berlin",
  "state": null,
  "country": "Germany",
  "country_code": "DE",
  "currency_code": "EUR",
  "locale": "de-DE",
  "tax_number": "DE123456789",
  "tax_number_2": "12/345/67890",
  "company_number": "HRB 12345",
  "email": null,
  "website": null,
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "number_formats": {
      "invoice": "{yyyy}-{nnnnn}",
      "estimate": "{yyyy}-{nnnnn}",
      "credit_note": "{yyyy}-{nnnnn}",
      "delivery_note": "{yyyy}-{nnnnn}",
      "purchase_order": "{yyyy}-{nnnnn}",
      "expense": "{yyyy}-{nnnnn}"
    },
    "email_defaults": {
      "invoice_subject": "Rechnung {document_number} von {entity_name}",
      "invoice_body": "Anbei finden Sie die Rechnung {document_number}.\nFälligkeitsdatum: {document_due_date}.",
      "estimate_subject": "Angebot {document_number} von {entity_name}",
      "estimate_body": "Anbei finden Sie das Angebot {document_number}.\nGültig bis: {document_valid_until}.",
      "credit_note_subject": "Rechnungskorrektur {document_number} von {entity_name}",
      "credit_note_body": "Anbei finden Sie die Rechnungskorrektur {document_number}.",
      "advance_invoice_subject": "Vorausrechnung {document_number} von {entity_name}",
      "advance_invoice_body": "Anbei finden Sie die Vorausrechnung {document_number}.",
      "delivery_note_subject": "Lieferschein {document_number} von {entity_name}",
      "delivery_note_body": "Anbei finden Sie den Lieferschein {document_number}.",
      "purchase_order_subject": "Bestellung {document_number} von {entity_name}",
      "purchase_order_body": "Anbei finden Sie die Bestellung {document_number}."
    },
    "default_invoice_due_days": 30,
    "default_invoice_payment_terms": null,
    "default_estimate_valid_days": 30,
    "document_footer": "{entity_name}",
    "default_document_signature": "{entity_name}",
    "overdue_notifications": {
      "enabled": false,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Zahlungserinnerung von {entity_name}",
      "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung."
    },
    "payment_reminders": {
      "email_subject": "Zahlungserinnerung von {entity_name}",
      "email_body": "Dies ist eine Erinnerung an überfällige Rechnungen von {entity_name}.\n\n{invoice_list}\n\nBitte prüfen Sie den offenen Betrag und veranlassen Sie die Zahlung.",
      "payment_instructions": "Bitte verwenden Sie die auf dem Dokument angegebenen Bankdaten."
    },
    "tax_rules": {
      "eu": {
        "vies_validate_vat": true,
        "auto_reverse_charge": false,
        "auto_remove_tax_export": false,
        "auto_apply_destination_vat": false,
        "require_gross_prices": false
      }
    },
    "tax_clause_defaults": {
      "intra_eu_b2b": "§ 13b UStG (Reverse Charge)",
      "3w_b2b": "§ 4 Nr. 1a + § 6 UStG",
      "3w_b2c": "§ 4 Nr. 1a + § 6 UStG"
    },
    "translations": {
      "default_invoice_note": {
        "de-DE": "Vielen Dank fuer Ihren Auftrag."
      },
      "default_invoice_payment_terms": {
        "de-DE": "Zahlbar innerhalb von 30 Tagen."
      },
      "document_footer": {
        "de-DE": "Orbital Systems GmbH"
      },
      "default_document_signature": {
        "de-DE": "Orbital Systems Team"
      },
      "email_defaults": {
        "invoice_subject": {
          "de-DE": "Rechnung {document_number} von {entity_name}"
        },
        "invoice_body": {
          "de-DE": "Anbei finden Sie die Rechnung {document_number}."
        }
      },
      "tax_clause_defaults": {
        "intra_eu_b2b": {
          "de-DE": "Steuerschuldnerschaft des Leistungsempfaengers."
        }
      }
    }
  },
  "account_id": "acc_6595a27b5d35015c3ef0c3fd",
  "metadata": {
    "industry": "Technology",
    "size": "Medium"
  },
  "country_rules": {
    "capabilities": {
      "verifactu_setup": false,
      "native_ios": true,
      "native_android": true,
      "custom_document_create": true,
      "manual_document_recovery": false,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true,
      "document_types": [
        "invoice",
        "advance_invoice",
        "credit_note",
        "estimate",
        "delivery_note",
        "purchase_order"
      ]
    },
    "max_taxes_per_item": 1,
    "features": [
      "eu_tax_rules",
      "tax_clause_defaults",
      "tax_number_2",
      "epc_qr"
    ]
  },
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z"
}

Update Hungarian NAV settings

PATCH/entities/{id}/nav

Partially update the entity's Hungarian NAV Online Számla settings. Omitted or null fields are left unchanged. Setting obligation to 'exempt' requires a reason; setting it to 'required' clears any stored reason; enabling dispatch requires verified NAV credentials to already be stored. Enabling (or staying enabled) also requires the entity's invoice, credit note and advance invoice number formats to be distinguishable from each other — NAV rejects a duplicate invoice number across those three document types for the same supplier, including a business-unit format for one type colliding with another type's format — otherwise responds 422 NAV_NUMBER_FORMATS_OVERLAP with a conflicts array describing the colliding document types; configure distinct number_formats/unit_number_formats via the entity settings endpoint first. Changing the cash accounting election responds 409 NAV_CASH_ACCOUNTING_LOCKED while a NAV submission is in flight for this entity. An entity whose environment is neither sandbox nor live responds 422 NAV_ENVIRONMENT_UNSUPPORTED.

Path parameters

idstringrequired

Entity ID

Body parameters

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.modifyEntityNavSettings("ent_abc123", {
  enabled: true
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);
Example:

Returns

json
{
  "obligation": "required",
  "exemption_reason": null,
  "enabled": true,
  "environment": "production",
  "taxpayer_id": "12345678",
  "credential_configured": true,
  "credential_verified_at": "2026-08-01T09:00:00.000Z",
  "credential_last_error_code": null,
  "ecb_exchange_rate_elected": false,
  "invoice_appearance": "ELECTRONIC",
  "cash_accounting": true,
  "dispatch_available": true,
  "submission_available": true
}

Store Hungarian NAV technical user credentials

PUT/entities/{id}/nav/credentials

Store (and, when NAV dispatch is available for the entity's environment, verify) Hungarian NAV Online Számla technical user credentials. All request fields are write-only and never echoed back. Responds with 422 NAV_CREDENTIALS_REJECTED only when NAV gives a definitive credential/permission rejection; every other NAV response (e.g. scheduled maintenance) or a transport/parse failure responds 503 NAV_VERIFICATION_UNAVAILABLE instead. The previously stored credential (if any) is left unchanged in either case. An entity whose environment is neither sandbox nor live responds 422 NAV_ENVIRONMENT_UNSUPPORTED.

Path parameters

idstringrequired

Entity ID

Body parameters

loginstringrequired

NAV technical user login (write-only; never returned by the API).

passwordstringrequired

NAV technical user password, cleartext in the request (write-only; never returned by the API).

signing_keystringrequired

NAV technical user signing key, used for request signature generation (write-only; never returned by the API).

exchange_keystringrequired

NAV technical user exchange (replacement) key: exactly 16 ASCII characters, used as an AES-128 key to decode encodedExchangeToken (write-only; never returned by the API).

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.storeEntityNavCredentials("ent_abc123", {
  login: "abc123XY",
  password: "correct-horse-battery-staple",
  signing_key: "synthetic-signing-key-value",
  exchange_key: "0123456789abcdef"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

json
{
  "obligation": "required",
  "exemption_reason": null,
  "enabled": false,
  "environment": "production",
  "taxpayer_id": "12345678",
  "credential_configured": true,
  "credential_verified_at": "2026-08-01T09:00:00.000Z",
  "credential_last_error_code": null,
  "ecb_exchange_rate_elected": false,
  "invoice_appearance": "ELECTRONIC",
  "cash_accounting": false,
  "dispatch_available": true,
  "submission_available": false
}

Update Poland KSeF setup

PUT/entities/{id}/ksef

Update protected KSeF settings for supported Polish standard invoices and credit notes. The obligation is required by default; an exemption needs a substantive reason of at least 10 characters. Enabling requires valid credentials and the matching environment release switch; the token must authenticate with InvoiceRead and InvoiceWrite permissions before enabling. Disabling KSeF does not bypass the obligation or unlock reserved submissions.

Path parameters

idstring<resource-id>required

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

Body parameters

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.putEntityKsefSettings("ent_6595a27b5d35015c3ef0c3fd", {
  enabled: false,
  obligation: "required",
  exemption_reason: "exemption-reason"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

tax_numberstringnullable

Normalized entity NIP, or null when no valid NIP is configured.

Other parameters
json
{
  "enabled": true,
  "environment": "test",
  "tax_number": "tax-number",
  "credential_configured": true,
  "credential_status": "verified",
  "last_verified_at": "2025-01-15T10:30:00.000Z",
  "last_error": {
    "code": "KSEF_AUTH_FAILED",
    "message": "message",
    "occurred_at": "2025-01-15T10:30:00.000Z"
  },
  "submission_available": true,
  "obligation": "required",
  "exemption_reason": "exemption-reason"
}

Store a Poland KSeF token

PUT/entities/{id}/ksef/credentials

Store or replace an encrypted token for the entity's immutable environment and current NIP. Storage alone does not enable submission. Replacement credentials are authenticated before saving when KSeF is enabled or has pending reserved submissions. Raw credentials are excluded from request-body logs and never returned.

Path parameters

idstring<resource-id>required

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

Body parameters

environmentstringrequired

Environment for which the token was issued. Must match the entity environment.

Possible values: "test", "production"

tokenstring<password>required

Write-only KSeF token. Encrypted at rest; never returned. Enabling KSeF authenticates this token; replacement credentials authenticate and verify InvoiceRead/InvoiceWrite permissions before saving while enabled or while reserved submissions remain pending.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.putEntityKsefCredential("ent_6595a27b5d35015c3ef0c3fd", {
  environment: "test",
  token: "token"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

tax_numberstringnullable

Normalized entity NIP, or null when no valid NIP is configured.

Other parameters
json
{
  "enabled": true,
  "environment": "test",
  "tax_number": "tax-number",
  "credential_configured": true,
  "credential_status": "verified",
  "last_verified_at": "2025-01-15T10:30:00.000Z",
  "last_error": {
    "code": "KSEF_AUTH_FAILED",
    "message": "message",
    "occurred_at": "2025-01-15T10:30:00.000Z"
  },
  "submission_available": true,
  "obligation": "required",
  "exemption_reason": "exemption-reason"
}

Update an entity

PUT/entities/{id}

Update an existing entity's details. All fields are optional; only provided fields will be updated. Use this to modify entity information, address, tax details, or custom settings. Settings are merged per top-level key: keys you omit keep their current value, so send only the keys you want to change. Two keys merge one level deeper: settings.translations merges per translation namespace, and settings.unit_number_sequence_starts merges per document type and business unit. Fiscalization and other dedicated-endpoint settings (settings.furs, settings.fina, settings.slovenia, settings.e_invoicing, settings.revenue_recognition) cannot be modified here and are silently ignored if sent — manage them via their dedicated endpoints (e.g. PUT /fiscalization/furs/settings, PUT /fiscalization/fina/settings). Note: Country and country_code cannot be changed after entity creation. currency_code must be a fiat ISO 4217 code; a crypto asset code is rejected with 422. A Hungarian entity's tax_number cannot be changed while NAV Online Számla dispatch is enabled (settings.nav.enabled) or a NAV submission is in flight for the entity — responds 409 NAV_TAX_NUMBER_LOCKED. While NAV dispatch is enabled, changing settings.number_formats/settings.unit_number_formats so that two of invoice, credit note and advance invoice would produce identical numbers responds 422 NAV_NUMBER_FORMATS_OVERLAP with a conflicts array describing the colliding document types. For Czech entities (country_code: CZ) company_number (IČO, 8 digits with check digit) cannot be cleared and tax_number must be a DIČ (CZ + 8–10 digits); invalid values respond 422 with code CZ_COMPANY_NUMBER_REQUIRED, CZ_INVALID_COMPANY_NUMBER or CZ_INVALID_TAX_NUMBER.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

Body parameters

namestringoptional
addressstringoptionalnullable
citystringoptionalnullable
currency_codestringoptionalnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringoptionalnullable
emailstringoptionalnullable
settingsobjectoptional
metadataobjectoptionalnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringoptionalnullable
post_codestringoptionalnullable
statestringoptionalnullable
localestringoptionalnullable
tax_number_2stringoptionalnullable
company_numberstringoptionalnullable
phonestringoptionalnullable
websitestringoptionalnullable
fiscal_region_codestringoptionalnullable
starting_capitalnumberoptionalnullable
is_tax_subjectbooleanoptional
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.update("inv_6595a27b5d35015c3ef0c3fd", {
  name: "Starward Equipment Co."
}, {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);
Example:

Returns

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "Starward Equipment Co.",
  "address": null,
  "address_2": null,
  "post_code": null,
  "city": null,
  "state": null,
  "country": "Slovenia",
  "country_code": "SI",
  "currency_code": "EUR",
  "locale": "en-US",
  "tax_number": null,
  "tax_number_2": null,
  "company_number": null,
  "email": null,
  "website": null,
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "number_formats": {
      "invoice": "{yyyy}-{nnnnn}",
      "estimate": "{yyyy}-{nnnnn}",
      "credit_note": "{yyyy}-{nnnnn}",
      "delivery_note": "{yyyy}-{nnnnn}",
      "purchase_order": "{yyyy}-{nnnnn}",
      "expense": "{yyyy}-{nnnnn}"
    },
    "email_defaults": {
      "invoice_subject": "Invoice {document_number} from {entity_name}",
      "invoice_body": "Please find invoice {document_number} attached.\nDue date: {document_due_date}.\n\n[View document]({invoice_link})",
      "estimate_subject": "{document_label} {document_number} from {entity_name}",
      "estimate_body": "Please find {document_label} {document_number} attached.\nValid until: {document_valid_until}.\n\n[View document]({invoice_link})",
      "credit_note_subject": "Credit note {document_number} from {entity_name}",
      "credit_note_body": "Please find credit note {document_number} attached.\n\n[View document]({invoice_link})",
      "advance_invoice_subject": "Advance invoice {document_number} from {entity_name}",
      "advance_invoice_body": "Please find advance invoice {document_number} attached.\n\n[View document]({invoice_link})",
      "delivery_note_subject": "Delivery note {document_number} from {entity_name}",
      "delivery_note_body": "Please find delivery note {document_number} attached.\n\n[View document]({invoice_link})",
      "purchase_order_subject": "Purchase order {document_number} from {entity_name}",
      "purchase_order_body": "Please find purchase order {document_number} attached.\n\n[View document]({invoice_link})"
    },
    "default_invoice_due_days": 30,
    "default_invoice_payment_terms": null,
    "default_estimate_valid_days": 30,
    "document_footer": "{entity_name}",
    "default_document_signature": "{entity_name}",
    "overdue_notifications": {
      "enabled": false,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,"
    },
    "payment_reminders": {
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,",
      "payment_instructions": "Please remit payment using the bank details shown on the document."
    },
    "tax_rules": {
      "eu": {
        "vies_validate_vat": true,
        "auto_reverse_charge": false,
        "auto_remove_tax_export": false,
        "auto_apply_destination_vat": false,
        "require_gross_prices": false
      },
      "slovenia": {
        "article_76a_enabled": false
      }
    },
    "tax_clause_defaults": {
      "intra_eu_b2b": "Obrnjena davčna obveznost, DDV ni obračunan po 1. odstavku 25. člena ZDDV-1",
      "intra_eu_b2b_goods": "46. člen ZDDV-1",
      "3w_b2b": "52. člen ZDDV-1",
      "3w_b2c": "52. člen ZDDV-1",
      "article_76a": "Obrnjena davčna obveznost po 76.a členu ZDDV-1."
    },
    "slovenia": {
      "tax_residency": "resident",
      "accounting_exports": {
        "preferred_format": "vod_xml",
        "konto_mappings": {
          "receivables": "1200",
          "payables": "2200",
          "advances_received": "2300",
          "advances_paid": "1300",
          "sales_vat_22": "26000",
          "sales_vat_95": "26001",
          "sales_vat_5": "26002",
          "purchase_vat_recoverable_22": "16000",
          "purchase_vat_recoverable_95": "16001",
          "purchase_vat_recoverable_5": "16002",
          "sales_revenue_22": "7600",
          "sales_revenue_95": "7601",
          "sales_revenue_5": "7602",
          "sales_revenue_exempt": "7680",
          "sales_revenue_eu_goods": "7600",
          "sales_revenue_eu_services": "7601",
          "sales_revenue_reverse_charge": "7600",
          "sales_revenue_third_country_goods": "7600",
          "sales_revenue_third_country_services": "7680",
          "purchase_expense_22": "4000",
          "purchase_expense_95": "4001",
          "purchase_expense_5": "4002",
          "purchase_expense_exempt": "4680",
          "purchase_expense_eu_goods": "4000",
          "purchase_expense_eu_services": "4680",
          "purchase_expense_reverse_charge": "4000",
          "purchase_expense_third_country_goods": "4000",
          "purchase_expense_third_country_services": "4680"
        }
      }
    }
  },
  "account_id": "acc_6595a27b5d35015c3ef0c3fd",
  "metadata": {},
  "country_rules": {
    "capabilities": {
      "verifactu_setup": false,
      "native_ios": true,
      "native_android": true,
      "custom_document_create": true,
      "manual_document_recovery": false,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true,
      "document_types": [
        "invoice",
        "advance_invoice",
        "credit_note",
        "estimate",
        "delivery_note",
        "purchase_order"
      ]
    },
    "max_taxes_per_item": 1,
    "features": [
      "eu_tax_rules",
      "eu_oss",
      "tax_clause_defaults",
      "epc_qr",
      "furs",
      "eslog",
      "upn_qr",
      "kir_report",
      "si_yearly_tax_report",
      "si_article_76a",
      "e_invoicing",
      "accounting_module"
    ]
  },
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z"
}
Example:

Set entity sender email

PUT/entities/{id}/email-sender

Sets or clears the entity-level custom From email for a production entity. Saving reserves the normalized address to the account and starts SES email/domain verification. Use null to clear the entity override; clearing does not release the account's SES identity ownership.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

Body parameters

emailstring<email>requirednullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.putEntityEmailSender("inv_6595a27b5d35015c3ef0c3fd", {
  email: "user@example.com"
}, {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

json
{
  "configured": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "inherited": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "effective": {
    "source": "entity",
    "email": "user@example.com",
    "verified": true
  }
}

Delete Hungarian NAV technical user credentials

DELETE/entities/{id}/nav/credentials

Delete the stored NAV technical user credentials for this entity. Blocked with 409 NAV_CREDENTIALS_IN_USE while NAV dispatch is enabled or a NAV submission is in flight. Available only for entities whose country supports NAV reporting (currently Hungary); other entities receive 422 NAV_NOT_SUPPORTED_FOR_COUNTRY. An entity whose environment is neither sandbox nor live responds 422 NAV_ENVIRONMENT_UNSUPPORTED.

Path parameters

idstringrequired

Entity ID

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.entities.removeEntityNavCredentials("ent_abc123", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Remove a Poland KSeF token

DELETE/entities/{id}/ksef/credentials

Idempotently remove the entity's configured KSeF credential after disabling KSeF and completing reserved submissions and UPO retrieval. Pending work returns 409. No request body.

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.entities.removeEntityKsefCredential("ent_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log('Deleted successfully');

Returns

tax_numberstringnullable

Normalized entity NIP, or null when no valid NIP is configured.

Other parameters
json
{
  "enabled": true,
  "environment": "test",
  "tax_number": "tax-number",
  "credential_configured": true,
  "credential_status": "verified",
  "last_verified_at": "2025-01-15T10:30:00.000Z",
  "last_error": {
    "code": "KSEF_AUTH_FAILED",
    "message": "message",
    "occurred_at": "2025-01-15T10:30:00.000Z"
  },
  "submission_available": true,
  "obligation": "required",
  "exemption_reason": "exemption-reason"
}

Clear entity sender email

DELETE/entities/{id}/email-sender

Clears the entity-level custom sender override. The entity may still inherit a verified white-label sender. Account ownership of the SES identity is intentionally retained.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.entities.deleteEntityEmailSender("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log('Deleted successfully');

Returns

json
{
  "configured": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "inherited": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "effective": {
    "source": "entity",
    "email": "user@example.com",
    "verified": true
  }
}

Get Hungarian NAV settings

GET/entities/{id}/nav

Retrieve the entity's Hungarian NAV Online Számla reporting settings, credential/verification state, and dispatch readiness. Available only for entities whose country supports NAV reporting (currently Hungary); other entities receive a 422 NAV_NOT_SUPPORTED_FOR_COUNTRY.

Path parameters

idstringrequired

Entity ID

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.retrieveEntityNavSettings("ent_abc123", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

json
{
  "obligation": "required",
  "exemption_reason": null,
  "enabled": false,
  "environment": "production",
  "taxpayer_id": "12345678",
  "credential_configured": false,
  "credential_verified_at": null,
  "credential_last_error_code": null,
  "ecb_exchange_rate_elected": false,
  "invoice_appearance": "ELECTRONIC",
  "cash_accounting": false,
  "dispatch_available": true,
  "submission_available": false
}

Re-verify stored Hungarian NAV technical user credentials

POST/entities/{id}/nav/credentials/verify

Re-verify the currently stored NAV technical user credentials against NAV. Bodyless. If verification fails while dispatch is enabled, dispatch is left enabled and the error is returned rather than silently disabling it. Responds 422 NAV_CREDENTIALS_REJECTED only for a definitive NAV credential/permission rejection (clearing verification), 422 NAV_CREDENTIALS_UNREADABLE if the stored credential cannot be decrypted (re-enter credentials to recover), 409 NAV_CREDENTIALS_CHANGED if the stored credentials were replaced or removed while verification was in progress (retry), and 503 NAV_VERIFICATION_UNAVAILABLE for every other NAV response or a transport/parse failure (verification state is preserved). An entity whose environment is neither sandbox nor live responds 422 NAV_ENVIRONMENT_UNSUPPORTED.

Path parameters

idstringrequired

Entity ID

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.verifyEntityNavCredentials("ent_abc123", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

json
{
  "obligation": "required",
  "exemption_reason": null,
  "enabled": false,
  "environment": "production",
  "taxpayer_id": "12345678",
  "credential_configured": true,
  "credential_verified_at": "2026-08-01T09:00:00.000Z",
  "credential_last_error_code": null,
  "ecb_exchange_rate_elected": false,
  "invoice_appearance": "ELECTRONIC",
  "cash_accounting": false,
  "dispatch_available": true,
  "submission_available": false
}

Get Poland KSeF setup

GET/entities/{id}/ksef

Read setup, release-switch and credential health for a Polish entity. credential_status, last_verified_at and last_error report whether KSeF accepts the stored token: a definitive rejection sets failed with code KSEF_AUTH_FAILED until the token is replaced or a login succeeds; transient KSeF outages never change it. Requires entity settings administration.

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.getEntityKsefSetup("ent_6595a27b5d35015c3ef0c3fd", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

tax_numberstringnullable

Normalized entity NIP, or null when no valid NIP is configured.

Other parameters
json
{
  "enabled": true,
  "environment": "test",
  "tax_number": "tax-number",
  "credential_configured": true,
  "credential_status": "verified",
  "last_verified_at": "2025-01-15T10:30:00.000Z",
  "last_error": {
    "code": "KSEF_AUTH_FAILED",
    "message": "message",
    "occurred_at": "2025-01-15T10:30:00.000Z"
  },
  "submission_available": true,
  "obligation": "required",
  "exemption_reason": "exemption-reason"
}

Enable an entity

POST/entities/{id}/enable

Re-enable a disabled entity. Enabled entities can create documents (invoices, estimates, credit notes, etc.). This operation is idempotent - enabling an already enabled entity has no effect.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.enableEntity("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "name": "name",
  "address": "address",
  "address_2": "address-2",
  "post_code": "post-code",
  "city": "city",
  "state": "state",
  "country": "country",
  "country_code": "country-code",
  "currency_code": "EUR",
  "locale": "locale",
  "timezone": "Europe/Ljubljana",
  "tax_number": "tax-number",
  "tax_number_2": "tax-number-2",
  "company_number": "company-number",
  "phone": "phone",
  "email": "user@example.com",
  "website": "https://example.com",
  "fiscal_region_code": "fiscal-region-code",
  "starting_capital": 0,
  "account_id": "account-id",
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "legal_details": {
      "legal_form": "sole_trader",
      "registration_office": "registration-office",
      "paid_up_capital": 0,
      "equity": 0,
      "in_liquidation": true
    },
    "pdf_template": "modern",
    "number_formats": {
      "invoice": "invoice",
      "estimate": "estimate",
      "credit_note": "credit-note",
      "advance_invoice": "advance-invoice",
      "delivery_note": "delivery-note",
      "purchase_order": "purchase-order",
      "expense": "expense"
    },
    "unit_number_formats": {
      "invoice": "invoice",
      "estimate": "estimate",
      "credit_note": "credit-note",
      "advance_invoice": "advance-invoice",
      "delivery_note": "delivery-note",
      "purchase_order": "purchase-order"
    },
    "number_sequence_starts": {
      "invoice": 0,
      "estimate": 0,
      "credit_note": 0,
      "advance_invoice": 0,
      "delivery_note": 0,
      "purchase_order": 0
    },
    "unit_number_sequence_starts": {
      "invoice": {},
      "estimate": {},
      "credit_note": {},
      "advance_invoice": {},
      "delivery_note": {},
      "purchase_order": {}
    },
    "primary_color": "primary-color",
    "logo_scale_percent": 70,
    "has_logo": true,
    "has_signature": true,
    "default_invoice_due_days": 30,
    "default_estimate_valid_days": 30,
    "email": "billing@example.com",
    "email_defaults": {
      "invoice_subject": "Invoice {document_number} from {entity_name}",
      "invoice_body": "Please find invoice {document_number} attached.\nDue date: {document_due_date}.",
      "estimate_subject": "Estimate {document_number} from {entity_name}",
      "estimate_body": "Please find estimate {document_number} attached.\nValid until: {document_valid_until}.",
      "credit_note_subject": "Credit note {document_number} from {entity_name}",
      "credit_note_body": "Please find credit note {document_number} attached.",
      "advance_invoice_subject": "Advance invoice {document_number} from {entity_name}",
      "advance_invoice_body": "Please find advance invoice {document_number} attached.",
      "delivery_note_subject": "Delivery note {document_number} from {entity_name}",
      "delivery_note_body": "Please find delivery note {document_number} attached.",
      "purchase_order_subject": "Purchase order {document_number} from {entity_name}",
      "purchase_order_body": "Please find purchase order {document_number} attached."
    },
    "email_open_tracking_enabled": true,
    "default_invoice_note": "Payment due by {document_due_date}. Please reference invoice {document_number} when making payment.",
    "early_payment_discounts_enabled": false,
    "early_payment_discount_terms": [
      {
        "id": "id",
        "name": "name",
        "percentage": 0,
        "days": 0
      }
    ],
    "default_invoice_payment_terms": "Please remit payment using the bank details shown on the document.",
    "default_estimate_note": "This estimate is valid until {document_valid_until}.",
    "default_estimate_payment_terms": "Payment due upon acceptance.",
    "default_credit_note_note": "Credit note for invoice {document_number}.",
    "default_credit_note_payment_terms": "Credit will be applied to your account.",
    "default_advance_invoice_note": "Advance payment requested for {document_number}.",
    "default_delivery_note_note": "Goods delivered under delivery note {document_number}.",
    "document_footer": "{entity_name} | Due Date: {document_due_date} | Invoice #{document_number}",
    "default_document_signature": "{entity_name}",
    "translations": {
      "default_invoice_note": {
        "de-DE": "Beispieltext"
      },
      "default_invoice_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_estimate_note": {
        "de-DE": "Beispieltext"
      },
      "default_estimate_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_credit_note_note": {
        "de-DE": "Beispieltext"
      },
      "default_credit_note_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_advance_invoice_note": {
        "de-DE": "Beispieltext"
      },
      "default_delivery_note_note": {
        "de-DE": "Beispieltext"
      },
      "document_footer": {
        "de-DE": "Beispieltext"
      },
      "default_document_signature": {
        "de-DE": "Beispieltext"
      },
      "email_defaults": {
        "invoice_subject": {
          "de-DE": "Beispieltext"
        },
        "invoice_body": {
          "de-DE": "Beispieltext"
        },
        "estimate_subject": {
          "de-DE": "Beispieltext"
        },
        "estimate_body": {
          "de-DE": "Beispieltext"
        },
        "credit_note_subject": {
          "de-DE": "Beispieltext"
        },
        "credit_note_body": {
          "de-DE": "Beispieltext"
        },
        "advance_invoice_subject": {
          "de-DE": "Beispieltext"
        },
        "advance_invoice_body": {
          "de-DE": "Beispieltext"
        },
        "delivery_note_subject": {
          "de-DE": "Beispieltext"
        },
        "delivery_note_body": {
          "de-DE": "Beispieltext"
        },
        "purchase_order_subject": {
          "de-DE": "Beispieltext"
        },
        "purchase_order_body": {
          "de-DE": "Beispieltext"
        }
      },
      "payment_reminders": {
        "email_subject": {
          "de-DE": "Beispieltext"
        },
        "email_body": {
          "de-DE": "Beispieltext"
        },
        "payment_instructions": {
          "de-DE": "Beispieltext"
        }
      },
      "tax_clause_defaults": {
        "domestic": {
          "de-DE": "Beispieltext"
        },
        "article_76a": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2b": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2b_goods": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2c": {
          "de-DE": "Beispieltext"
        },
        "3w_b2b": {
          "de-DE": "Beispieltext"
        },
        "3w_b2c": {
          "de-DE": "Beispieltext"
        },
        "export": {
          "de-DE": "Beispieltext"
        }
      }
    },
    "calculation": {
      "default_mode": "b2b_standard"
    },
    "slovenia": {
      "business_form": "sp",
      "income_tax_regime": "normirani",
      "vat_profile": "standard",
      "calculates_deduction_ratio": true,
      "tax_residency": "resident",
      "yearly_reporting": {
        "activity_codes": [
          "62.010",
          "47.910"
        ],
        "registration_number": "1234567",
        "accounting_type": "records",
        "normiranec_insurance_basis": "full_time_self_employed",
        "default_withholding_tax_amount": 0,
        "default_foreign_tax_credit_amount": 0
      },
      "accounting_exports": {
        "preferred_format": "vod_xml",
        "konto_mappings": {
          "receivables": "receivables",
          "payables": "payables",
          "advances_received": "advances-received",
          "advances_paid": "advances-paid",
          "sales_vat_22": "sales-vat-22",
          "sales_vat_95": "sales-vat-95",
          "sales_vat_5": "sales-vat-5",
          "purchase_vat_recoverable_22": "purchase-vat-recoverable-22",
          "purchase_vat_recoverable_95": "purchase-vat-recoverable-95",
          "purchase_vat_recoverable_5": "purchase-vat-recoverable-5",
          "sales_revenue_22": "sales-revenue-22",
          "sales_revenue_95": "sales-revenue-95",
          "sales_revenue_5": "sales-revenue-5",
          "sales_revenue_exempt": "sales-revenue-exempt",
          "sales_revenue_eu_goods": "sales-revenue-eu-goods",
          "sales_revenue_eu_services": "sales-revenue-eu-services",
          "sales_revenue_reverse_charge": "sales-revenue-reverse-charge",
          "sales_revenue_third_country_goods": "sales-revenue-third-country-goods",
          "sales_revenue_third_country_services": "sales-revenue-third-country-services",
          "purchase_expense_22": "purchase-expense-22",
          "purchase_expense_95": "purchase-expense-95",
          "purchase_expense_5": "purchase-expense-5",
          "purchase_expense_exempt": "purchase-expense-exempt",
          "purchase_expense_eu_goods": "purchase-expense-eu-goods",
          "purchase_expense_eu_services": "purchase-expense-eu-services",
          "purchase_expense_reverse_charge": "purchase-expense-reverse-charge",
          "purchase_expense_third_country_goods": "purchase-expense-third-country-goods",
          "purchase_expense_third_country_services": "purchase-expense-third-country-services"
        }
      }
    },
    "furs": {
      "enabled": true,
      "default_skip_fiscalization": false,
      "numbering_strategy": "C",
      "operator_tax_number": "12345678",
      "operator_label": "Cash Register 1",
      "foreign_operator": false,
      "environment": "test"
    },
    "fina": {
      "enabled": true,
      "operator_oib": "12345678901",
      "operator_label": "Cash Register 1",
      "u_sust_pdv": true,
      "numbering_sequence": "P",
      "unified_numbering": true,
      "certificate_expiry": "2026-12-31T23:59:59.000Z"
    },
    "tax_rules": {
      "eu": {
        "vies_validate_vat": true,
        "auto_reverse_charge": false,
        "auto_remove_tax_export": false,
        "auto_apply_destination_vat": false,
        "require_gross_prices": false
      },
      "slovenia": {
        "article_76a_enabled": false
      },
      "uk": {
        "validate_vat_number": true
      },
      "italy": {
        "fiscal_regime": "RF01",
        "fiscal_code": "fiscal-code"
      }
    },
    "overdue_notifications": {
      "enabled": true,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,"
    },
    "payment_reminders": {
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,",
      "payment_instructions": "Please remit payment to IBAN {iban}."
    },
    "upn_qr": {
      "enabled": true,
      "display_mode": "qr_only",
      "purpose_code": "OTHR"
    },
    "epc_qr": {
      "enabled": true
    },
    "hub3_qr": {
      "enabled": true,
      "purpose_code": "OTHR",
      "reference_model": "HR00"
    },
    "swiss_qr_bill": {
      "enabled": true
    },
    "crypto_wallets": [
      {
        "code": "BTC",
        "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
        "network": "Ethereum"
      }
    ],
    "crypto_equivalents": {
      "enabled": true,
      "codes": [
        "BTC"
      ]
    },
    "crypto_invoicing": {
      "enabled": true
    },
    "bank_accounts": [
      {
        "type": "iban",
        "name": "Main Business Account",
        "bank_name": "NLB d.d.",
        "iban": "SI56012345678901234",
        "account_number": "123456789",
        "bic": "LJBASI2X",
        "routing_number": "021000021",
        "sort_code": "12-34-56",
        "is_default": true
      }
    ],
    "eslog_validation_enabled": true,
    "ujp_validation_with_eslog_enabled": false,
    "xrechnung": {
      "enabled": true
    },
    "zugferd": {
      "enabled": true
    },
    "delivery_note_hide_prices": false,
    "purchase_order_hide_prices": false,
    "credit_note_negative_values": true,
    "show_payment_amounts": false,
    "hide_tax_when_untaxed": false,
    "receipt_note": "receipt-note",
    "receipt_footer": "receipt-footer",
    "receipt_signature": "receipt-signature",
    "tax_clause_defaults": {
      "domestic": null,
      "article_76a": "Obrnjena davčna obveznost po 76.a členu ZDDV-1.",
      "intra_eu_b2b": "VAT reverse charge - Article 194 of Directive 2006/112/EC. The customer is liable for VAT.",
      "intra_eu_b2b_goods": "Tax-exempt intra-Community supply - Article 138 of Directive 2006/112/EC.",
      "intra_eu_b2c": null,
      "3w_b2b": "Export - VAT exempt under Article 146 of Directive 2006/112/EC.",
      "3w_b2c": "Export - VAT exempt under Article 146 of Directive 2006/112/EC.",
      "export": "Export - VAT exempt under Article 146 of Directive 2006/112/EC."
    },
    "ksef": {
      "enabled": false,
      "obligation": "required",
      "exemption_reason": "exemption-reason"
    },
    "e_invoicing": {
      "enabled": true,
      "auto_send": false,
      "france_2026_emission_applicable": false
    },
    "nav": {
      "obligation": "required",
      "exemption_reason": null,
      "enabled": false,
      "ecb_exchange_rate_elected": false,
      "invoice_appearance": "ELECTRONIC",
      "cash_accounting": false
    },
    "revenue_recognition": {
      "default_method": "service_period_daily"
    },
    "expense_recognition": {
      "default_method": "service_period_daily"
    },
    "expenses": {
      "save_items_to_catalog": true
    },
    "inventory": {
      "enabled": true
    },
    "accounting": {
      "vat_period": "monthly",
      "files_recapitulative_statement": true,
      "reminder_recipients": [
        "user@example.com"
      ],
      "united_states": {
        "books_start_date": "2027-01-01",
        "foreign_owned": true,
        "foreign_shareholder": {
          "name": "Jane Doe",
          "address": "Gradišče 15c, 1360 Vrhnika, Slovenia",
          "citizenship_country_code": "SI",
          "residence_country_code": "SI",
          "ownership_percent": 100
        },
        "business_activity_code": "518210",
        "estimated_tax_payments": true,
        "has_foreign_financial_accounts": true,
        "delaware": {
          "share_classes": [
            {
              "name": "Common",
              "authorized_shares": 1333367,
              "par_value": 0.0001
            }
          ],
          "issued_shares": 1490234,
          "estimated_payments": true
        },
        "nol_carryforward": {
          "as_of_tax_year": 2025,
          "pre_2018": 0,
          "post_2017": 25000
        },
        "category_accounts": [
          {
            "financial_category_id": "fcat_6a44700764c334f34ad63f1d",
            "account_code": "4000"
          }
        ],
        "payment_accounts": [
          {
            "direction": "invoice",
            "payment_type": "card",
            "account_code": "1050"
          }
        ]
      }
    }
  },
  "metadata": {
    "external_id": "123",
    "source": "shopify"
  },
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z",
  "country_rules": {
    "max_taxes_per_item": 1,
    "features": [
      "furs",
      "eslog"
    ],
    "capabilities": {
      "verifactu_setup": true,
      "native_ios": true,
      "native_android": true,
      "document_types": [
        "document-types"
      ],
      "custom_document_create": true,
      "manual_document_recovery": true,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true
    }
  }
}

Disable an entity

POST/entities/{id}/disable

Disable an entity. Disabled entities cannot create documents (invoices, estimates, credit notes, etc.) but all data remains accessible and settings can still be updated. This operation is idempotent - disabling an already disabled entity has no effect.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.disableEntity("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

idstring
namestring
addressstringnullable
citystringnullable
countrystring
country_codestring
currency_codestringnullable

The entity's accounting currency (ISO 4217). Must be a fiat currency: crypto asset codes (BTC, ETH, SOL) are rejected with 422 on create and update. Crypto can only be the currency_code of individual documents.

tax_numberstringnullable
emailstringnullable
settingsobject

Entity settings

metadataobjectnullable

Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.

Other parameters
address_2stringnullable
post_codestringnullable
statestringnullable
localestring
tax_number_2stringnullable
company_numberstringnullable
phonestringnullable
websitestringnullable
fiscal_region_codestringnullable
starting_capitalnumbernullable
account_idstring
is_tax_subjectboolean
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "name": "name",
  "address": "address",
  "address_2": "address-2",
  "post_code": "post-code",
  "city": "city",
  "state": "state",
  "country": "country",
  "country_code": "country-code",
  "currency_code": "EUR",
  "locale": "locale",
  "timezone": "Europe/Ljubljana",
  "tax_number": "tax-number",
  "tax_number_2": "tax-number-2",
  "company_number": "company-number",
  "phone": "phone",
  "email": "user@example.com",
  "website": "https://example.com",
  "fiscal_region_code": "fiscal-region-code",
  "starting_capital": 0,
  "account_id": "account-id",
  "environment": "live",
  "is_tax_subject": true,
  "is_enabled": true,
  "settings": {
    "legal_details": {
      "legal_form": "sole_trader",
      "registration_office": "registration-office",
      "paid_up_capital": 0,
      "equity": 0,
      "in_liquidation": true
    },
    "pdf_template": "modern",
    "number_formats": {
      "invoice": "invoice",
      "estimate": "estimate",
      "credit_note": "credit-note",
      "advance_invoice": "advance-invoice",
      "delivery_note": "delivery-note",
      "purchase_order": "purchase-order",
      "expense": "expense"
    },
    "unit_number_formats": {
      "invoice": "invoice",
      "estimate": "estimate",
      "credit_note": "credit-note",
      "advance_invoice": "advance-invoice",
      "delivery_note": "delivery-note",
      "purchase_order": "purchase-order"
    },
    "number_sequence_starts": {
      "invoice": 0,
      "estimate": 0,
      "credit_note": 0,
      "advance_invoice": 0,
      "delivery_note": 0,
      "purchase_order": 0
    },
    "unit_number_sequence_starts": {
      "invoice": {},
      "estimate": {},
      "credit_note": {},
      "advance_invoice": {},
      "delivery_note": {},
      "purchase_order": {}
    },
    "primary_color": "primary-color",
    "logo_scale_percent": 70,
    "has_logo": true,
    "has_signature": true,
    "default_invoice_due_days": 30,
    "default_estimate_valid_days": 30,
    "email": "billing@example.com",
    "email_defaults": {
      "invoice_subject": "Invoice {document_number} from {entity_name}",
      "invoice_body": "Please find invoice {document_number} attached.\nDue date: {document_due_date}.",
      "estimate_subject": "Estimate {document_number} from {entity_name}",
      "estimate_body": "Please find estimate {document_number} attached.\nValid until: {document_valid_until}.",
      "credit_note_subject": "Credit note {document_number} from {entity_name}",
      "credit_note_body": "Please find credit note {document_number} attached.",
      "advance_invoice_subject": "Advance invoice {document_number} from {entity_name}",
      "advance_invoice_body": "Please find advance invoice {document_number} attached.",
      "delivery_note_subject": "Delivery note {document_number} from {entity_name}",
      "delivery_note_body": "Please find delivery note {document_number} attached.",
      "purchase_order_subject": "Purchase order {document_number} from {entity_name}",
      "purchase_order_body": "Please find purchase order {document_number} attached."
    },
    "email_open_tracking_enabled": true,
    "default_invoice_note": "Payment due by {document_due_date}. Please reference invoice {document_number} when making payment.",
    "early_payment_discounts_enabled": false,
    "early_payment_discount_terms": [
      {
        "id": "id",
        "name": "name",
        "percentage": 0,
        "days": 0
      }
    ],
    "default_invoice_payment_terms": "Please remit payment using the bank details shown on the document.",
    "default_estimate_note": "This estimate is valid until {document_valid_until}.",
    "default_estimate_payment_terms": "Payment due upon acceptance.",
    "default_credit_note_note": "Credit note for invoice {document_number}.",
    "default_credit_note_payment_terms": "Credit will be applied to your account.",
    "default_advance_invoice_note": "Advance payment requested for {document_number}.",
    "default_delivery_note_note": "Goods delivered under delivery note {document_number}.",
    "document_footer": "{entity_name} | Due Date: {document_due_date} | Invoice #{document_number}",
    "default_document_signature": "{entity_name}",
    "translations": {
      "default_invoice_note": {
        "de-DE": "Beispieltext"
      },
      "default_invoice_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_estimate_note": {
        "de-DE": "Beispieltext"
      },
      "default_estimate_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_credit_note_note": {
        "de-DE": "Beispieltext"
      },
      "default_credit_note_payment_terms": {
        "de-DE": "Beispieltext"
      },
      "default_advance_invoice_note": {
        "de-DE": "Beispieltext"
      },
      "default_delivery_note_note": {
        "de-DE": "Beispieltext"
      },
      "document_footer": {
        "de-DE": "Beispieltext"
      },
      "default_document_signature": {
        "de-DE": "Beispieltext"
      },
      "email_defaults": {
        "invoice_subject": {
          "de-DE": "Beispieltext"
        },
        "invoice_body": {
          "de-DE": "Beispieltext"
        },
        "estimate_subject": {
          "de-DE": "Beispieltext"
        },
        "estimate_body": {
          "de-DE": "Beispieltext"
        },
        "credit_note_subject": {
          "de-DE": "Beispieltext"
        },
        "credit_note_body": {
          "de-DE": "Beispieltext"
        },
        "advance_invoice_subject": {
          "de-DE": "Beispieltext"
        },
        "advance_invoice_body": {
          "de-DE": "Beispieltext"
        },
        "delivery_note_subject": {
          "de-DE": "Beispieltext"
        },
        "delivery_note_body": {
          "de-DE": "Beispieltext"
        },
        "purchase_order_subject": {
          "de-DE": "Beispieltext"
        },
        "purchase_order_body": {
          "de-DE": "Beispieltext"
        }
      },
      "payment_reminders": {
        "email_subject": {
          "de-DE": "Beispieltext"
        },
        "email_body": {
          "de-DE": "Beispieltext"
        },
        "payment_instructions": {
          "de-DE": "Beispieltext"
        }
      },
      "tax_clause_defaults": {
        "domestic": {
          "de-DE": "Beispieltext"
        },
        "article_76a": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2b": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2b_goods": {
          "de-DE": "Beispieltext"
        },
        "intra_eu_b2c": {
          "de-DE": "Beispieltext"
        },
        "3w_b2b": {
          "de-DE": "Beispieltext"
        },
        "3w_b2c": {
          "de-DE": "Beispieltext"
        },
        "export": {
          "de-DE": "Beispieltext"
        }
      }
    },
    "calculation": {
      "default_mode": "b2b_standard"
    },
    "slovenia": {
      "business_form": "sp",
      "income_tax_regime": "normirani",
      "vat_profile": "standard",
      "calculates_deduction_ratio": true,
      "tax_residency": "resident",
      "yearly_reporting": {
        "activity_codes": [
          "62.010",
          "47.910"
        ],
        "registration_number": "1234567",
        "accounting_type": "records",
        "normiranec_insurance_basis": "full_time_self_employed",
        "default_withholding_tax_amount": 0,
        "default_foreign_tax_credit_amount": 0
      },
      "accounting_exports": {
        "preferred_format": "vod_xml",
        "konto_mappings": {
          "receivables": "receivables",
          "payables": "payables",
          "advances_received": "advances-received",
          "advances_paid": "advances-paid",
          "sales_vat_22": "sales-vat-22",
          "sales_vat_95": "sales-vat-95",
          "sales_vat_5": "sales-vat-5",
          "purchase_vat_recoverable_22": "purchase-vat-recoverable-22",
          "purchase_vat_recoverable_95": "purchase-vat-recoverable-95",
          "purchase_vat_recoverable_5": "purchase-vat-recoverable-5",
          "sales_revenue_22": "sales-revenue-22",
          "sales_revenue_95": "sales-revenue-95",
          "sales_revenue_5": "sales-revenue-5",
          "sales_revenue_exempt": "sales-revenue-exempt",
          "sales_revenue_eu_goods": "sales-revenue-eu-goods",
          "sales_revenue_eu_services": "sales-revenue-eu-services",
          "sales_revenue_reverse_charge": "sales-revenue-reverse-charge",
          "sales_revenue_third_country_goods": "sales-revenue-third-country-goods",
          "sales_revenue_third_country_services": "sales-revenue-third-country-services",
          "purchase_expense_22": "purchase-expense-22",
          "purchase_expense_95": "purchase-expense-95",
          "purchase_expense_5": "purchase-expense-5",
          "purchase_expense_exempt": "purchase-expense-exempt",
          "purchase_expense_eu_goods": "purchase-expense-eu-goods",
          "purchase_expense_eu_services": "purchase-expense-eu-services",
          "purchase_expense_reverse_charge": "purchase-expense-reverse-charge",
          "purchase_expense_third_country_goods": "purchase-expense-third-country-goods",
          "purchase_expense_third_country_services": "purchase-expense-third-country-services"
        }
      }
    },
    "furs": {
      "enabled": true,
      "default_skip_fiscalization": false,
      "numbering_strategy": "C",
      "operator_tax_number": "12345678",
      "operator_label": "Cash Register 1",
      "foreign_operator": false,
      "environment": "test"
    },
    "fina": {
      "enabled": true,
      "operator_oib": "12345678901",
      "operator_label": "Cash Register 1",
      "u_sust_pdv": true,
      "numbering_sequence": "P",
      "unified_numbering": true,
      "certificate_expiry": "2026-12-31T23:59:59.000Z"
    },
    "tax_rules": {
      "eu": {
        "vies_validate_vat": true,
        "auto_reverse_charge": false,
        "auto_remove_tax_export": false,
        "auto_apply_destination_vat": false,
        "require_gross_prices": false
      },
      "slovenia": {
        "article_76a_enabled": false
      },
      "uk": {
        "validate_vat_number": true
      },
      "italy": {
        "fiscal_regime": "RF01",
        "fiscal_code": "fiscal-code"
      }
    },
    "overdue_notifications": {
      "enabled": true,
      "threshold_days": [
        7,
        14,
        30
      ],
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,"
    },
    "payment_reminders": {
      "email_subject": "Payment reminder from {entity_name}",
      "email_body": "Hello,\n\nThe invoices below are overdue. Please arrange payment of {total_amount} at your earliest convenience.\n\n{invoice_list}\n\n{payment_instructions}\n\nIf you have already paid, please disregard this reminder.\n\nBest regards,",
      "payment_instructions": "Please remit payment to IBAN {iban}."
    },
    "upn_qr": {
      "enabled": true,
      "display_mode": "qr_only",
      "purpose_code": "OTHR"
    },
    "epc_qr": {
      "enabled": true
    },
    "hub3_qr": {
      "enabled": true,
      "purpose_code": "OTHR",
      "reference_model": "HR00"
    },
    "swiss_qr_bill": {
      "enabled": true
    },
    "crypto_wallets": [
      {
        "code": "BTC",
        "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
        "network": "Ethereum"
      }
    ],
    "crypto_equivalents": {
      "enabled": true,
      "codes": [
        "BTC"
      ]
    },
    "crypto_invoicing": {
      "enabled": true
    },
    "bank_accounts": [
      {
        "type": "iban",
        "name": "Main Business Account",
        "bank_name": "NLB d.d.",
        "iban": "SI56012345678901234",
        "account_number": "123456789",
        "bic": "LJBASI2X",
        "routing_number": "021000021",
        "sort_code": "12-34-56",
        "is_default": true
      }
    ],
    "eslog_validation_enabled": true,
    "ujp_validation_with_eslog_enabled": false,
    "xrechnung": {
      "enabled": true
    },
    "zugferd": {
      "enabled": true
    },
    "delivery_note_hide_prices": false,
    "purchase_order_hide_prices": false,
    "credit_note_negative_values": true,
    "show_payment_amounts": false,
    "hide_tax_when_untaxed": false,
    "receipt_note": "receipt-note",
    "receipt_footer": "receipt-footer",
    "receipt_signature": "receipt-signature",
    "tax_clause_defaults": {
      "domestic": null,
      "article_76a": "Obrnjena davčna obveznost po 76.a členu ZDDV-1.",
      "intra_eu_b2b": "VAT reverse charge - Article 194 of Directive 2006/112/EC. The customer is liable for VAT.",
      "intra_eu_b2b_goods": "Tax-exempt intra-Community supply - Article 138 of Directive 2006/112/EC.",
      "intra_eu_b2c": null,
      "3w_b2b": "Export - VAT exempt under Article 146 of Directive 2006/112/EC.",
      "3w_b2c": "Export - VAT exempt under Article 146 of Directive 2006/112/EC.",
      "export": "Export - VAT exempt under Article 146 of Directive 2006/112/EC."
    },
    "ksef": {
      "enabled": false,
      "obligation": "required",
      "exemption_reason": "exemption-reason"
    },
    "e_invoicing": {
      "enabled": true,
      "auto_send": false,
      "france_2026_emission_applicable": false
    },
    "nav": {
      "obligation": "required",
      "exemption_reason": null,
      "enabled": false,
      "ecb_exchange_rate_elected": false,
      "invoice_appearance": "ELECTRONIC",
      "cash_accounting": false
    },
    "revenue_recognition": {
      "default_method": "service_period_daily"
    },
    "expense_recognition": {
      "default_method": "service_period_daily"
    },
    "expenses": {
      "save_items_to_catalog": true
    },
    "inventory": {
      "enabled": true
    },
    "accounting": {
      "vat_period": "monthly",
      "files_recapitulative_statement": true,
      "reminder_recipients": [
        "user@example.com"
      ],
      "united_states": {
        "books_start_date": "2027-01-01",
        "foreign_owned": true,
        "foreign_shareholder": {
          "name": "Jane Doe",
          "address": "Gradišče 15c, 1360 Vrhnika, Slovenia",
          "citizenship_country_code": "SI",
          "residence_country_code": "SI",
          "ownership_percent": 100
        },
        "business_activity_code": "518210",
        "estimated_tax_payments": true,
        "has_foreign_financial_accounts": true,
        "delaware": {
          "share_classes": [
            {
              "name": "Common",
              "authorized_shares": 1333367,
              "par_value": 0.0001
            }
          ],
          "issued_shares": 1490234,
          "estimated_payments": true
        },
        "nol_carryforward": {
          "as_of_tax_year": 2025,
          "pre_2018": 0,
          "post_2017": 25000
        },
        "category_accounts": [
          {
            "financial_category_id": "fcat_6a44700764c334f34ad63f1d",
            "account_code": "4000"
          }
        ],
        "payment_accounts": [
          {
            "direction": "invoice",
            "payment_type": "card",
            "account_code": "1050"
          }
        ]
      }
    }
  },
  "metadata": {
    "external_id": "123",
    "source": "shopify"
  },
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z",
  "country_rules": {
    "max_taxes_per_item": 1,
    "features": [
      "furs",
      "eslog"
    ],
    "capabilities": {
      "verifactu_setup": true,
      "native_ios": true,
      "native_android": true,
      "document_types": [
        "document-types"
      ],
      "custom_document_create": true,
      "manual_document_recovery": true,
      "document_drafts": true,
      "issued_document_edit": true,
      "document_email": true,
      "credit_note_payments": true,
      "advance_invoice_application": true,
      "recurring_invoices": true,
      "pdf_templates": true,
      "pdf_languages": true,
      "e_invoicing": true,
      "order_reissue": true
    }
  }
}

Get entity sender email configuration

GET/entities/{id}/email-sender

Returns the entity-level custom sender, inherited white-label sender, and effective sender source. Only verified custom senders affect delivery.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.getEntityEmailSender("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

json
{
  "configured": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "inherited": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "effective": {
    "source": "entity",
    "email": "user@example.com",
    "verified": true
  }
}

Recheck entity sender email verification

POST/entities/{id}/email-sender/recheck

Refresh SES verification status for the entity-level custom sender email and domain. This does not resend verification; saving a sender starts verification.

Header parameters

account_idstringoptional

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

Path parameters

idstring<resource-id>required

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.entities.recheckEntityEmailSender("inv_6595a27b5d35015c3ef0c3fd", {
  account_id: "YOUR_ACCOUNT_ID"
});

console.log(response);

Returns

json
{
  "configured": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "inherited": {
    "email": "user@example.com",
    "verification_status": "pending",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "domain": "domain",
    "email_verification_status": "pending",
    "domain_verification_status": "pending",
    "domain_dkim_tokens": [
      "domain-dkim-tokens"
    ],
    "last_checked_at": "2025-01-15T10:30:00.000Z"
  },
  "effective": {
    "source": "entity",
    "email": "user@example.com",
    "verified": true
  }
}