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
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
payload_formatstringnullable
payloadstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring

Sync enrollment

POST/e-invoicing/enrollment/sync

Refresh enrollment and submission state from the entity's country-specific 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/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
france_emission_requiredboolean
france_receiving_requiredboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": 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",
    "channel": "peppol",
    "receiving_allowed": false,
    "e_reporting_allowed": false
  }
}


Start French e-invoicing enrollment

POST/e-invoicing/enrollment/authorize

Create a one-use, PKCE-bound authorization for the visible French enrollment flow.

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

return_pathstringoptionalnullable
login_hintstring<email>optionalnullable
directory_entry_identifierstringoptionalnullable
send_and_receivestringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.createEInvoicingEnrollmentAuthorization({
  return_path: "string",
  login_hint: "string",
  directory_entry_identifier: "string",
  send_and_receive: "any"
});

console.log(response);

Returns

authorization_urlstring<uri>
expires_atstring<date-time>
json
{
  "authorization_url": "string",
  "expires_at": "2025-01-15T10:30:00.000Z"
}

Disconnect French e-invoicing

POST/e-invoicing/enrollment/disconnect

Revoke the enrollment authorization and disable platform access 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/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

disconnectedboolean
json
{
  "disconnected": true
}

Look up a French e-invoicing recipient

POST/e-invoicing/france/directory/lookup

Return the active and inactive French Annuaire routing entries for an exact SIREN.

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_numberstringrequired

French recipient SIREN.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.lookupFranceEInvoicingDirectory({
  company_number: "string"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "identifier": "string",
      "is_active": true,
      "company": {
        "company_number": "string",
        "name": "string",
        "address": "string",
        "post_code": "string",
        "city": "string",
        "country_code": "string"
      }
    }
  ]
}

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/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/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/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
recipient_company_numberstringoptionalnullable
recipient_routing_identifierstringoptionalnullable
delivery_addressobjectoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/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",
  recipient_company_number: "string",
  recipient_routing_identifier: "string",
  delivery_address: {
    address: "string",
    address_2: "string",
    post_code: "string",
    city: "string",
    country_code: "string"
  }
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
payload_formatstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "payload_format": "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",
  "network": "string"
}

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/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
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
payload_formatstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "payload_format": "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",
  "network": "string"
}

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/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
france_emission_requiredboolean
france_receiving_requiredboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": 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",
    "channel": "peppol",
    "receiving_allowed": false,
    "e_reporting_allowed": false
  }
}

List received e-invoices

GET/e-invoicing/received-documents

List French electronic invoices received through the entity's verified send-and-receive enrollment. Durable stored records remain available during a temporary platform outage.

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

Maximum number of received invoices to return.

Default: 50

starting_after_idstringoptionalnullable

Return provider records after this opaque received-invoice ID.

ending_before_idstringoptionalnullable

Return provider records before this opaque received-invoice ID.

statestringoptional

Filter the operational inbox by review state.

Possible values: "pending", "accepted", "refused", "all"

Default: "pending"

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

dataarray of objects
Other parameters
has_beforeboolean
has_afterboolean
json
{
  "data": [
    {
      "id": "string",
      "received_at": "2025-01-15T10:30:00.000Z",
      "number": "string",
      "issue_date": "string",
      "type_code": "string",
      "supplier_name": "string",
      "supplier_company_number": "string",
      "currency_code": "string",
      "amount_due": "string",
      "total_with_tax": "string",
      "status_code": "string",
      "status_text": "string",
      "state": "pending",
      "expense_id": "string",
      "accepted_at": "2025-01-15T10:30:00.000Z",
      "attachment_status": "pending",
      "attachment_error": "string"
    }
  ],
  "has_before": true,
  "has_after": true
}

List French e-reporting records

GET/e-invoicing/reporting-records

List provider-neutral audit status for B2C and international transactions, cash-basis payments, and invoice lifecycle commands.

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

Default: 50

source_document_idstringoptional

Return only records associated with this invoice or credit note.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "string",
      "kind": "b2c_transaction",
      "status": "pending",
      "source_document_id": "string",
      "source_document_type": "string",
      "source_payment_id": "string",
      "error_message": "string",
      "attempt_count": 0,
      "last_attempted_at": "2025-01-15T10:30:00.000Z",
      "submitted_at": "2025-01-15T10:30:00.000Z",
      "created_at": "2025-01-15T10:30:00.000Z",
      "updated_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/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.

document_idstringoptional

Return only the submission associated with this invoice or credit note.

import SpaceInvoices from '@spaceinvoices/js-sdk/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",
      "routing_identifier": "string",
      "routing_scheme": "string",
      "provider_status_code": "string",
      "provider_status_text": "string",
      "recipient_peppol_id": "string",
      "recipient_scheme_id": "string",
      "recipient_name": "string",
      "status": "string",
      "error_message": "string",
      "payload_format": "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",
      "network": "string"
    }
  ],
  "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/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
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
payload_formatstringnullable
payloadstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "ubl_xml": "string",
  "payload_format": "string",
  "payload": "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",
  "network": "string"
}

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/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
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
ubl_xmlstringnullable
payload_formatstringnullable
payloadstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "ubl_xml": "string",
  "payload_format": "string",
  "payload": "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",
  "network": "string"
}

Update e-invoicing settings

PATCH/e-invoicing/settings

Enable or disable the entity's country-specific e-invoicing channel and configure supported automation.

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
france_2026_emission_applicablebooleanoptionalnullable
default_scheme_idstringoptional
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
france_emission_requiredboolean
france_receiving_requiredboolean
default_scheme_idstring
enrollmentobject
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": 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",
    "channel": "peppol",
    "receiving_allowed": false,
    "e_reporting_allowed": false
  }
}

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"
}

Download a received e-invoice

GET/e-invoicing/received-documents/{id}/download

Download the preserved provider original or a converted Factur-X, UBL, or CII representation of a received French e-invoice.

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

Opaque platform-scoped received-invoice ID returned by the received invoice list.

Query parameters

formatstringoptional

Download the provider original or a converted Factur-X, UBL, or CII representation.

Possible values: "original", "factur-x", "ubl", "cii"

Default: "factur-x"

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const blob = await sdk.eInvoicing.downloadReceivedEInvoice("91001");

const arrayBuffer = await blob.arrayBuffer();
const { writeFile } = await import('node:fs/promises');
await writeFile('download.bin', Buffer.from(arrayBuffer));
console.log('Saved download.bin');

Accept a received e-invoice as an expense

POST/e-invoicing/received-documents/{id}/accept

Idempotently create an incomplete draft expense from a received supplier invoice. The response reports whether the Factur-X representation was attached or remains provider-only; the provider original remains available as legal evidence.

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

Opaque platform-scoped received-invoice ID returned by the received invoice list.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.acceptReceivedEInvoice("91001");

console.log(response);

Returns

idstring

Provider-scoped received-invoice ID.

Other parameters
received_atstring<date-time>
numberstringnullable
issue_datestringnullable
type_codestringnullable
supplier_namestringnullable
supplier_company_numberstringnullable
currency_codestringnullable
amount_duestringnullable
total_with_taxstringnullable
status_codestringnullable
status_textstringnullable
statestring
expense_idstringnullable
accepted_atstring<date-time>nullable
attachment_statusstring
attachment_errorstringnullable
json
{
  "id": "string",
  "received_at": "2025-01-15T10:30:00.000Z",
  "number": "string",
  "issue_date": "string",
  "type_code": "string",
  "supplier_name": "string",
  "supplier_company_number": "string",
  "currency_code": "string",
  "amount_due": "string",
  "total_with_tax": "string",
  "status_code": "string",
  "status_text": "string",
  "state": "pending",
  "expense_id": "string",
  "accepted_at": "2025-01-15T10:30:00.000Z",
  "attachment_status": "pending",
  "attachment_error": "string"
}

Send a received invoice lifecycle action

POST/e-invoicing/received-documents/{id}/lifecycle

Send a provider-neutral French lifecycle action such as acknowledgement, acceptance, dispute, hold, refusal, completion, or payment sent. The command is durably idempotent.

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

Opaque platform-scoped received-invoice ID returned by the received invoice list.

Body parameters

actionstringrequired

Provider-neutral French invoice lifecycle action.

Possible values: "acknowledged", "accepted", "partially_accepted", "disputed", "on_hold", "completed", "refused", "payment_sent"

Other parameters
reason_codestringoptionalnullable
reasonstringoptionalnullable
amountnumberoptionalnullable
currency_codestringoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.sendReceivedEInvoiceLifecycle("91001", {
  action: "refused",
  reason_code: "CMD_ERR",
  reason: "Purchase order does not match"
});

console.log(response);

Returns

idstring
Other parameters
kindstring
statusstring
source_document_idstringnullable
source_document_typestringnullable
source_payment_idstringnullable
error_messagestringnullable
attempt_countinteger
last_attempted_atstring<date-time>nullable
submitted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "kind": "b2c_transaction",
  "status": "pending",
  "source_document_id": "string",
  "source_document_type": "string",
  "source_payment_id": "string",
  "error_message": "string",
  "attempt_count": 0,
  "last_attempted_at": "2025-01-15T10:30:00.000Z",
  "submitted_at": "2025-01-15T10:30:00.000Z",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

Retry a failed French e-reporting record

POST/e-invoicing/reporting-records/{id}/retry

Retry a failed command. Submitted records and commands with an ambiguous provider outcome are immutable.

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
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.retryFrenchEReportingRecord("eirr_1234567890");

console.log(response);

Returns

idstring
Other parameters
kindstring
statusstring
source_document_idstringnullable
source_document_typestringnullable
source_payment_idstringnullable
error_messagestringnullable
attempt_countinteger
last_attempted_atstring<date-time>nullable
submitted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "kind": "b2c_transaction",
  "status": "pending",
  "source_document_id": "string",
  "source_document_type": "string",
  "source_payment_id": "string",
  "error_message": "string",
  "attempt_count": 0,
  "last_attempted_at": "2025-01-15T10:30:00.000Z",
  "submitted_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 the entity's configured network. For French entities this also routes B2C and international B2B sales through the required e-reporting process. Supply delivery_address when the physical delivery address differs from the buyer address.

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
recipient_company_numberstringoptionalnullable
recipient_routing_identifierstringoptionalnullable
delivery_addressobjectoptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk/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",
  recipient_company_number: "string",
  recipient_routing_identifier: "string",
  delivery_address: {
    address: "string",
    address_2: "string",
    post_code: "string",
    city: "string",
    country_code: "string"
  }
});

console.log(response);

Returns

idstring
Other parameters
entity_idstring
supplier_idstring
environmentstring
document_idstring
document_typestring
transmission_idstringnullable
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
payload_formatstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "payload_format": "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",
  "network": "string"
}

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/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
routing_identifierstringnullable
routing_schemestringnullable
provider_status_codestringnullable
provider_status_textstringnullable
recipient_peppol_idstringnullable
recipient_scheme_idstringnullable
recipient_namestringnullable
statusstring
error_messagestringnullable
payload_formatstringnullable
metadataobject
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "string",
  "entity_id": "string",
  "supplier_id": "string",
  "environment": "string",
  "document_id": "string",
  "document_type": "string",
  "transmission_id": "string",
  "routing_identifier": "string",
  "routing_scheme": "string",
  "provider_status_code": "string",
  "provider_status_text": "string",
  "recipient_peppol_id": "string",
  "recipient_scheme_id": "string",
  "recipient_name": "string",
  "status": "string",
  "error_message": "string",
  "payload_format": "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",
  "network": "string"
}