Skip to content

E-Invoicing

The E-Invoicing object

object

Attributes

idstring
Other attributes
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
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>

Register supplier

POST/e-invoicing/supplier

Register the entity as an e-invoicing supplier. This starts the KYC/onboarding process.

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

Legal company name as registered

country_codestringrequired

ISO 3166-1 alpha-2 country code

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: "Orbital Services SAS",
  vat_number: "FR67987650009",
  company_number: "98765000900002",
  iban: "FR7630006000011234567890189",
  address: "123 Rue de la Paix",
  city: "Paris",
  post_code: "75001",
  country_code: "FR",
  contact_email: "billing@orbital-services.example",
  contact_phone: "+33612345678"
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
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": "einv_sup_1234567890",
  "entity_id": "ent_1234567890",
  "environment": "sandbox",
  "status": "pending",
  "peppol_registered": false,
  "company_name": "Orbital Services SAS",
  "vat_number": "FR67987650009",
  "company_number": "98765000900002",
  "country_code": "FR",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T10:00:00.000Z"
}

Search Peppol customer

POST/e-invoicing/customer-search

Check if a recipient is registered on the Peppol network and can receive e-invoices.

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

Peppol participant ID to search for

scheme_idstringrequired

Peppol scheme ID

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "peppol_id": "98765432109876",
      "scheme_id": "0009",
      "name": "Horizon Orbital SARL",
      "country_code": "FR",
      "registered": true
    }
  ]
}

Send e-invoice

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

Send a document as an e-invoice via the Peppol network. Generates UBL XML and submits it for delivery.

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

Type of document to send

Possible values: "invoice", "credit_note"

documentIdstringrequired

Document ID

Body parameters

recipient_peppol_idstringrequired

Recipient's Peppol participant ID

recipient_scheme_idstringrequired

Recipient's Peppol scheme ID

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);
Example:

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": "einv_sub_1234567890",
  "entity_id": "ent_1234567890",
  "supplier_id": "einv_sup_1234567890",
  "environment": "sandbox",
  "document_id": "inv_1234567890",
  "document_type": "invoice",
  "status": "submitted",
  "recipient_peppol_id": "0009:98765432109876",
  "recipient_name": "Horizon Orbital SARL",
  "submitted_at": "2026-03-01T10:00:00.000Z",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T10:00: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.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": "einv_sub_1234567890",
  "entity_id": "ent_1234567890",
  "supplier_id": "einv_sup_1234567890",
  "environment": "sandbox",
  "document_id": "inv_1234567890",
  "document_type": "invoice",
  "status": "submitted",
  "recipient_peppol_id": "0009:98765432109876",
  "recipient_name": "Horizon Orbital SARL",
  "submitted_at": "2026-03-01T11:00:00.000Z",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T11:00:00.000Z"
}

Get e-invoicing settings

GET/e-invoicing/settings

Get the current e-invoicing settings 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
json
{
  "enabled": true,
  "auto_send": false,
  "default_scheme_id": "0009"
}

Get supplier status

GET/e-invoicing/supplier

Get the current e-invoicing supplier onboarding status for this 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.getEInvoicingSupplier();

console.log(response);

Returns

idstring
Other parameters
entity_idstring
environmentstring
statusstring
reject_reasonstringnullable
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": "einv_sup_1234567890",
  "entity_id": "ent_1234567890",
  "environment": "sandbox",
  "status": "active",
  "peppol_registered": true,
  "company_name": "Orbital Services SAS",
  "vat_number": "FR67987650009",
  "company_number": "98765000900002",
  "country_code": "FR",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T12:00:00.000Z",
  "onboarded_at": "2026-03-01T11:00: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": "einv_sub_1234567890",
      "entity_id": "ent_1234567890",
      "supplier_id": "einv_sup_1234567890",
      "environment": "sandbox",
      "document_id": "inv_1234567890",
      "document_type": "invoice",
      "status": "delivered",
      "recipient_peppol_id": "0009:98765432109876",
      "recipient_name": "Horizon Orbital SARL",
      "submitted_at": "2026-03-01T10:00:00.000Z",
      "delivered_at": "2026-03-01T10:05:00.000Z",
      "created_at": "2026-03-01T10:00:00.000Z",
      "updated_at": "2026-03-01T10:05:00.000Z"
    }
  ],
  "next_cursor": null,
  "has_more": false
}

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.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": "einv_sub_1234567890",
  "entity_id": "ent_1234567890",
  "supplier_id": "einv_sup_1234567890",
  "environment": "sandbox",
  "document_id": "inv_1234567890",
  "document_type": "invoice",
  "status": "delivered",
  "recipient_peppol_id": "0009:98765432109876",
  "recipient_name": "Horizon Orbital SARL",
  "ubl_xml": "...",
  "submitted_at": "2026-03-01T10:00:00.000Z",
  "delivered_at": "2026-03-01T10:05:00.000Z",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T10:05:00.000Z"
}

Update e-invoicing settings

PATCH/e-invoicing/settings

Update e-invoicing settings for the entity. Only sandbox entities can enable e-invoicing unless live mode is explicitly enabled.

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({
  auto_send: true
});

console.log(response);
Example:

Returns

enabledboolean
auto_sendboolean
default_scheme_idstring
json
{
  "enabled": true,
  "auto_send": true,
  "default_scheme_id": "0009"
}

Update supplier data

PATCH/e-invoicing/supplier

Update supplier onboarding data (company details). Only allowed before onboarding is complete.

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
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": "einv_sup_1234567890",
  "entity_id": "ent_1234567890",
  "environment": "sandbox",
  "status": "pending",
  "peppol_registered": false,
  "company_name": "Orbital Services SAS Renamed",
  "vat_number": "FR67987650009",
  "company_number": "98765000900002",
  "country_code": "FR",
  "created_at": "2026-03-01T10:00:00.000Z",
  "updated_at": "2026-03-01T13:00:00.000Z"
}