E-Invoicing
E-Invoicing
Send invoices electronically via the Peppol network. Requires supplier onboarding (KYC) before documents can be sent.
The E-Invoicing object
Attributes
Register supplier
/e-invoicing/supplierRegister the entity as an e-invoicing supplier. This starts the KYC/onboarding process.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Legal company name as registered
ISO 3166-1 alpha-2 country code
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
{
"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
/e-invoicing/customer-searchCheck if a recipient is registered on the Peppol network and can receive e-invoices.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Peppol participant ID to search for
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
{
"data": [
{
"peppol_id": "98765432109876",
"scheme_id": "0009",
"name": "Horizon Orbital SARL",
"country_code": "FR",
"registered": true
}
]
}Send e-invoice
/e-invoicing/send/:documentType/:documentIdSend a document as an e-invoice via the Peppol network. Generates UBL XML and submits it for delivery.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Type of document to send
Possible values: "invoice", "credit_note"
Document ID
Body parameters
Recipient's Peppol participant ID
Recipient's Peppol scheme ID
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);Returns
{
"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
/e-invoicing/submissions/:id/retryRetry a failed or rejected e-invoice submission.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.retryEInvoicingSubmission();
console.log(response);Returns
{
"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
/e-invoicing/settingsGet the current e-invoicing settings for the entity.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.list();
console.log(response);Returns
{
"enabled": true,
"auto_send": false,
"default_scheme_id": "0009"
}Get supplier status
/e-invoicing/supplierGet the current e-invoicing supplier onboarding status for this entity.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.getEInvoicingSupplier();
console.log(response);Returns
{
"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
/e-invoicing/submissionsList e-invoice submissions with pagination.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.
Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.listEInvoicingSubmissions();
console.log(response);Returns
{
"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
/e-invoicing/submissions/:idGet detailed submission status including UBL XML.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.getEInvoicingSubmission();
console.log(response);Returns
{
"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
/e-invoicing/settingsUpdate e-invoicing settings for the entity. Only sandbox entities can enable e-invoicing unless live mode is explicitly enabled.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
import SpaceInvoices from '@spaceinvoices/js-sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.update({
auto_send: true
});
console.log(response);Returns
{
"enabled": true,
"auto_send": true,
"default_scheme_id": "0009"
}Update supplier data
/e-invoicing/supplierUpdate supplier onboarding data (company details). Only allowed before onboarding is complete.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Returns
{
"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"
}