Skip to content

E-Invoicing

The E-Invoicing object

object

Attributes

idstring
Other attributes
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>

Sync enrollment

POST/e-invoicing/enrollment/sync

Refresh the entity enrollment state from the Peppol sending provider.

Header parameters

entity_idstringoptional

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.syncEInvoicingEnrollment();

console.log(response);

Returns

enabledboolean
auto_sendboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "default_scheme_id": "string",
  "enrollment": {
    "id": "string",
    "entity_id": "string",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "string"
    ],
    "verification_url": "string",
    "peppol_registered": true,
    "peppol_id": "string",
    "peppol_scheme_id": "string",
    "provider_error": "string",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "last_synced_at": "2025-01-15T10:30:00.000Z"
  }
}


Register supplier (deprecated)

POST/e-invoicing/supplier

Deprecated compatibility alias. Use PATCH /e-invoicing/settings to enable Peppol sending.

Header parameters

entity_idstringoptional

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

Body parameters

company_namestringrequired
country_codestringrequired
Other parameters
vat_numberstringoptional
company_numberstringoptional
ibanstringoptional
addressstringoptional
citystringoptional
post_codestringoptional
contact_emailstring<email>optional
contact_phonestringoptional
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.registerEInvoicingSupplier({
  company_name: "string",
  vat_number: "string",
  company_number: "string",
  iban: "string",
  address: "string",
  city: "string",
  post_code: "string",
  country_code: "string",
  contact_email: "string",
  contact_phone: "string"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
verification_urlstringnullable
last_synced_atstring<date-time>nullable
peppol_registeredbooleannullable
peppol_participant_idstringnullable
peppol_scheme_idstringnullable
company_namestring
vat_numberstringnullable
company_numberstringnullable
ibanstringnullable
addressstringnullable
citystringnullable
post_codestringnullable
country_codestring
contact_emailstringnullable
contact_phonestringnullable
kyc_id_document_urlstringnullable
kyc_business_register_urlstringnullable
metadataobject
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "environment": "string",
  "status": "string",
  "reject_reason": "string",
  "verification_url": "string",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "string",
  "peppol_scheme_id": "string",
  "company_name": "string",
  "vat_number": "string",
  "company_number": "string",
  "iban": "string",
  "address": "string",
  "city": "string",
  "post_code": "string",
  "country_code": "string",
  "contact_email": "string",
  "contact_phone": "string",
  "kyc_id_document_url": "string",
  "kyc_business_register_url": "string",
  "metadata": {},
  "onboarded_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Check Peppol recipient

POST/e-invoicing/recipients/check

Normalize a Peppol address and check registration and optional document type support.

Header parameters

entity_idstringoptional

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

Body parameters

peppol_idstringrequired

Recipient Peppol identifier. May be a plain value or a full scheme:value address.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.checkEInvoicingRecipient({
  peppol_id: "string",
  scheme_id: "string",
  document_type: "invoice"
});

console.log(response);

Returns

peppol_idstring
scheme_idstring
peppol_addressstring
registeredboolean
namestringnullable
document_typestringnullable
document_supportedbooleannullable
json
{
  "peppol_id": "string",
  "scheme_id": "string",
  "peppol_address": "string",
  "registered": true,
  "name": "string",
  "document_type": "invoice",
  "document_supported": true
}

Search Peppol customer (deprecated)

POST/e-invoicing/customer-search

Deprecated compatibility alias. Use POST /e-invoicing/recipients/check.

Header parameters

entity_idstringoptional

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

Body parameters

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.searchEInvoicingCustomer({
  peppol_id: "string",
  scheme_id: "string"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "peppol_id": "string",
      "scheme_id": "string",
      "name": "string",
      "country_code": "string",
      "registered": true
    }
  ]
}

Send e-invoice (deprecated)

POST/e-invoicing/send/:documentType/:documentId

Deprecated compatibility alias. Use POST /e-invoicing/documents/{id}/send.

Header parameters

entity_idstringoptional

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

Path parameters

documentTypestringrequired

Possible values: "invoice", "credit_note"

documentIdstringrequired

Body parameters

recipient_peppol_idstringoptional
recipient_scheme_idstringoptional
recipient_namestringoptional
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.sendEInvoice({
  recipient_peppol_id: "string",
  recipient_scheme_id: "string",
  recipient_name: "string"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Retry failed submission (deprecated path)

POST/e-invoicing/submissions/:id/retry

Retry failed submission (deprecated path)

Header parameters

entity_idstringoptional

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

Path parameters

idstring<resource-id>required

Unique resource identifier

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.retryEInvoicingSubmission();

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Get e-invoicing settings

GET/e-invoicing/settings

Get the current e-invoicing settings and enrollment state for the entity.

Header parameters

entity_idstringoptional

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.list();

console.log(response);

Returns

enabledboolean
auto_sendboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "default_scheme_id": "string",
  "enrollment": {
    "id": "string",
    "entity_id": "string",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "string"
    ],
    "verification_url": "string",
    "peppol_registered": true,
    "peppol_id": "string",
    "peppol_scheme_id": "string",
    "provider_error": "string",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "last_synced_at": "2025-01-15T10:30:00.000Z"
  }
}

Get supplier status (deprecated)

GET/e-invoicing/supplier

Deprecated compatibility alias. Use GET /e-invoicing/settings for enrollment state.

Header parameters

entity_idstringoptional

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.getEInvoicingSupplier();

console.log(response);

Returns

idstring
Other parameters
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
verification_urlstringnullable
last_synced_atstring<date-time>nullable
peppol_registeredbooleannullable
peppol_participant_idstringnullable
peppol_scheme_idstringnullable
company_namestring
vat_numberstringnullable
company_numberstringnullable
ibanstringnullable
addressstringnullable
citystringnullable
post_codestringnullable
country_codestring
contact_emailstringnullable
contact_phonestringnullable
kyc_id_document_urlstringnullable
kyc_business_register_urlstringnullable
metadataobject
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "environment": "string",
  "status": "string",
  "reject_reason": "string",
  "verification_url": "string",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "string",
  "peppol_scheme_id": "string",
  "company_name": "string",
  "vat_number": "string",
  "company_number": "string",
  "iban": "string",
  "address": "string",
  "city": "string",
  "post_code": "string",
  "country_code": "string",
  "contact_email": "string",
  "contact_phone": "string",
  "kyc_id_document_url": "string",
  "kyc_business_register_url": "string",
  "metadata": {},
  "onboarded_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

List submissions

GET/e-invoicing/submissions

List e-invoice submissions with pagination.

Header parameters

entity_idstringoptional

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

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

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

prev_cursorstringoptional

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

include_total_countbooleanoptional

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.listEInvoicingSubmissions();

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "string",
      "entity_id": "string",
      "supplier_id": "string",
      "environment": "string",
      "document_id": "string",
      "document_type": "string",
      "transmission_id": "string",
      "recipient_peppol_id": "string",
      "recipient_scheme_id": "string",
      "recipient_name": "string",
      "status": "string",
      "error_message": "string",
      "metadata": {},
      "submitted_at": "2025-01-15T10:30:00.000Z",
      "delivered_at": "2025-01-15T10:30:00.000Z",
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_at": "2025-01-15T10:30:00.000Z"
    }
  ],
  "pagination": {
    "total": 0,
    "next_cursor": "string",
    "prev_cursor": "string",
    "has_more": true
  }
}

Get submission detail (deprecated path)

GET/e-invoicing/submissions/:id

Get submission detail (deprecated path)

Header parameters

entity_idstringoptional

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

Path parameters

idstring<resource-id>required

Unique resource identifier

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.getEInvoicingSubmission();

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "ubl_xml": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Get submission detail

GET/e-invoicing/submissions/{id}

Get detailed submission status including UBL XML.

Header parameters

entity_idstringoptional

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

Path parameters

idstring<resource-id>required

Unique resource identifier

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.get("inv_6595a27b5d35015c3ef0c3fd");

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "ubl_xml": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Update e-invoicing settings

PATCH/e-invoicing/settings

Enable or disable Peppol sending and configure automatic sending for the entity.

Header parameters

entity_idstringoptional

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

Body parameters

enabledbooleanoptional
auto_sendbooleanoptional
default_scheme_idstringoptional
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.update({
  enabled: true,
  auto_send: true,
  default_scheme_id: "string"
});

console.log(response);

Returns

enabledboolean
auto_sendboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "default_scheme_id": "string",
  "enrollment": {
    "id": "string",
    "entity_id": "string",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "string"
    ],
    "verification_url": "string",
    "peppol_registered": true,
    "peppol_id": "string",
    "peppol_scheme_id": "string",
    "provider_error": "string",
    "verified_at": "2025-01-15T10:30:00.000Z",
    "last_synced_at": "2025-01-15T10:30:00.000Z"
  }
}

Update supplier (deprecated)

PATCH/e-invoicing/supplier

Deprecated compatibility alias. Entity profile data is canonical for Peppol enrollment.

Header parameters

entity_idstringoptional

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

Body parameters

company_namestringoptional
vat_numberstringoptional
company_numberstringoptional
ibanstringoptional
addressstringoptional
citystringoptional
post_codestringoptional
country_codestringoptional
contact_emailstring<email>optional
contact_phonestringoptional

Returns

idstring
Other parameters
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
verification_urlstringnullable
last_synced_atstring<date-time>nullable
peppol_registeredbooleannullable
peppol_participant_idstringnullable
peppol_scheme_idstringnullable
company_namestring
vat_numberstringnullable
company_numberstringnullable
ibanstringnullable
addressstringnullable
citystringnullable
post_codestringnullable
country_codestring
contact_emailstringnullable
contact_phonestringnullable
kyc_id_document_urlstringnullable
kyc_business_register_urlstringnullable
metadataobject
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "environment": "string",
  "status": "string",
  "reject_reason": "string",
  "verification_url": "string",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "string",
  "peppol_scheme_id": "string",
  "company_name": "string",
  "vat_number": "string",
  "company_number": "string",
  "iban": "string",
  "address": "string",
  "city": "string",
  "post_code": "string",
  "country_code": "string",
  "contact_email": "string",
  "contact_phone": "string",
  "kyc_id_document_url": "string",
  "kyc_business_register_url": "string",
  "metadata": {},
  "onboarded_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Send document

POST/e-invoicing/documents/{id}/send

Send an invoice or credit note over Peppol. The document type is derived from the ID prefix.

Header parameters

entity_idstringoptional

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

Path parameters

idstringrequired

Invoice or credit note ID. The document type is derived from the ID prefix.

Body parameters

recipient_peppol_idstringoptional
recipient_scheme_idstringoptional
recipient_namestringoptional
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.sendEInvoicingDocument("inv_123", {
  recipient_peppol_id: "string",
  recipient_scheme_id: "string",
  recipient_name: "string"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Retry failed submission

POST/e-invoicing/submissions/{id}/retry

Retry a failed or rejected e-invoice submission.

Header parameters

entity_idstringoptional

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

Path parameters

idstring<resource-id>required

Unique resource identifier

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.retryEInvoicingSubmissionById("inv_6595a27b5d35015c3ef0c3fd");

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "metadata": {},
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "delivered_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}