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
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({
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
default_scheme_idstring
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": true,
  "default_scheme_id": "default-scheme-id",
  "enrollment": {
    "id": "id",
    "entity_id": "entity-id",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "missing-fields"
    ],
    "verification_url": "https://example.com",
    "peppol_registered": true,
    "peppol_id": "peppol-id",
    "peppol_scheme_id": "peppol-scheme-id",
    "provider_error": "provider-error",
    "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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.createEInvoicingEnrollmentAuthorization({
  return_path: "/app/ent_123/settings/e-invoicing",
  login_hint: "owner@example.com",
  directory_entry_identifier: "0225:123456789",
  send_and_receive: "any"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

authorization_urlstring<uri>
expires_atstring<date-time>
json
{
  "authorization_url": "https://example.com",
  "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({
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

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: "123456789"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "identifier": "identifier",
      "is_active": true,
      "company": {
        "company_number": "company-number",
        "name": "name",
        "address": "address",
        "post_code": "post-code",
        "city": "city",
        "country_code": "country-code"
      }
    }
  ]
}

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: "company-name",
  vat_number: "vat-number",
  company_number: "company-number",
  iban: "iban",
  address: "address",
  city: "city",
  post_code: "post-code",
  country_code: "country-code",
  contact_email: "user@example.com",
  contact_phone: "contact-phone"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

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
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "environment": "environment",
  "status": "status",
  "reject_reason": "reject-reason",
  "verification_url": "https://example.com",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "peppol-participant-id",
  "peppol_scheme_id": "peppol-scheme-id",
  "company_name": "company-name",
  "vat_number": "vat-number",
  "company_number": "company-number",
  "iban": "iban",
  "address": "address",
  "city": "city",
  "post_code": "post-code",
  "country_code": "country-code",
  "contact_email": "user@example.com",
  "contact_phone": "contact-phone",
  "kyc_id_document_url": "https://example.com",
  "kyc_business_register_url": "https://example.com",
  "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
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

peppol_idstring
scheme_idstring
peppol_addressstring
registeredboolean
namestringnullable
document_supportedbooleannullable
json
{
  "peppol_id": "peppol-id",
  "scheme_id": "scheme-id",
  "peppol_address": "peppol-address",
  "registered": true,
  "name": "name",
  "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: "peppol-id",
  scheme_id: "scheme-id"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "peppol_id": "peppol-id",
      "scheme_id": "scheme-id",
      "name": "name",
      "country_code": "country-code",
      "registered": true
    }
  ]
}

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({
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
default_scheme_idstring
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": true,
  "default_scheme_id": "default-scheme-id",
  "enrollment": {
    "id": "id",
    "entity_id": "entity-id",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "missing-fields"
    ],
    "verification_url": "https://example.com",
    "peppol_registered": true,
    "peppol_id": "peppol-id",
    "peppol_scheme_id": "peppol-scheme-id",
    "provider_error": "provider-error",
    "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

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.

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(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "id",
      "received_at": "2025-01-15T10:30:00.000Z",
      "number": "number",
      "issue_date": "issue-date",
      "type_code": "type-code",
      "supplier_name": "supplier-name",
      "supplier_company_number": "supplier-company-number",
      "currency_code": "currency-code",
      "amount_due": "amount-due",
      "total_with_tax": "total-with-tax",
      "status_code": "status-code",
      "status_text": "status-text",
      "state": "pending",
      "expense_id": "expense-id",
      "accepted_at": "2025-01-15T10:30:00.000Z",
      "attachment_status": "pending",
      "attachment_error": "attachment-error"
    }
  ],
  "pagination": {
    "total": 0,
    "next_cursor": "next-cursor",
    "prev_cursor": "prev-cursor",
    "has_more": 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(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
json
{
  "data": [
    {
      "id": "id",
      "kind": "b2c_transaction",
      "status": "pending",
      "source_document_id": "source-document-id",
      "source_document_type": "source-document-type",
      "source_payment_id": "source-payment-id",
      "error_message": "error-message",
      "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({
  entity_id: "YOUR_ENTITY_ID"
});

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
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "environment": "environment",
  "status": "status",
  "reject_reason": "reject-reason",
  "verification_url": "https://example.com",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "peppol-participant-id",
  "peppol_scheme_id": "peppol-scheme-id",
  "company_name": "company-name",
  "vat_number": "vat-number",
  "company_number": "company-number",
  "iban": "iban",
  "address": "address",
  "city": "city",
  "post_code": "post-code",
  "country_code": "country-code",
  "contact_email": "user@example.com",
  "contact_phone": "contact-phone",
  "kyc_id_document_url": "https://example.com",
  "kyc_business_register_url": "https://example.com",
  "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(undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "id",
      "entity_id": "entity-id",
      "supplier_id": "supplier-id",
      "environment": "environment",
      "document_id": "document-id",
      "document_type": "document-type",
      "transmission_id": "transmission-id",
      "routing_identifier": "routing-identifier",
      "routing_scheme": "routing-scheme",
      "provider_status_code": "provider-status-code",
      "provider_status_text": "provider-status-text",
      "recipient_peppol_id": "recipient-peppol-id",
      "recipient_scheme_id": "recipient-scheme-id",
      "recipient_name": "recipient-name",
      "status": "status",
      "error_message": "error-message",
      "payload_format": "payload-format",
      "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": "network"
    }
  ],
  "pagination": {
    "total": 0,
    "next_cursor": "next-cursor",
    "prev_cursor": "prev-cursor",
    "has_more": true
  }
}

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. Prefix depends on the resource, for example inv_, cus_, or ent_.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.get('E-INVOICING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

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
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "id",
  "entity_id": "entity-id",
  "supplier_id": "supplier-id",
  "environment": "environment",
  "document_id": "document-id",
  "document_type": "document-type",
  "transmission_id": "transmission-id",
  "routing_identifier": "routing-identifier",
  "routing_scheme": "routing-scheme",
  "provider_status_code": "provider-status-code",
  "provider_status_text": "provider-status-text",
  "recipient_peppol_id": "recipient-peppol-id",
  "recipient_scheme_id": "recipient-scheme-id",
  "recipient_name": "recipient-name",
  "status": "status",
  "error_message": "error-message",
  "ubl_xml": "ubl-xml",
  "payload_format": "payload-format",
  "payload": "payload",
  "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": "network"
}

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

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

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

console.log(response);

Returns

enabledboolean
auto_sendboolean
france_2026_emission_applicableboolean
default_scheme_idstring
json
{
  "enabled": true,
  "auto_send": true,
  "france_2026_emission_applicable": true,
  "france_emission_required": true,
  "france_receiving_required": true,
  "default_scheme_id": "default-scheme-id",
  "enrollment": {
    "id": "id",
    "entity_id": "entity-id",
    "environment": "sandbox",
    "state": "not_enabled",
    "sending_allowed": true,
    "missing_fields": [
      "missing-fields"
    ],
    "verification_url": "https://example.com",
    "peppol_registered": true,
    "peppol_id": "peppol-id",
    "peppol_scheme_id": "peppol-scheme-id",
    "provider_error": "provider-error",
    "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
onboarded_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "id",
  "entity_id": "entity-id",
  "environment": "environment",
  "status": "status",
  "reject_reason": "reject-reason",
  "verification_url": "https://example.com",
  "last_synced_at": "2025-01-15T10:30:00.000Z",
  "peppol_registered": true,
  "peppol_participant_id": "peppol-participant-id",
  "peppol_scheme_id": "peppol-scheme-id",
  "company_name": "company-name",
  "vat_number": "vat-number",
  "company_number": "company-number",
  "iban": "iban",
  "address": "address",
  "city": "city",
  "post_code": "post-code",
  "country_code": "country-code",
  "contact_email": "user@example.com",
  "contact_phone": "contact-phone",
  "kyc_id_document_url": "https://example.com",
  "kyc_business_register_url": "https://example.com",
  "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", undefined, {
  entity_id: "YOUR_ENTITY_ID"
});

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", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring

Provider-scoped received-invoice ID.

Other parameters
json
{
  "id": "id",
  "received_at": "2025-01-15T10:30:00.000Z",
  "number": "number",
  "issue_date": "issue-date",
  "type_code": "type-code",
  "supplier_name": "supplier-name",
  "supplier_company_number": "supplier-company-number",
  "currency_code": "currency-code",
  "amount_due": "amount-due",
  "total_with_tax": "total-with-tax",
  "status_code": "status-code",
  "status_text": "status-text",
  "state": "pending",
  "expense_id": "expense-id",
  "accepted_at": "2025-01-15T10:30:00.000Z",
  "attachment_status": "pending",
  "attachment_error": "attachment-error"
}

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
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"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
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": "id",
  "kind": "b2c_transaction",
  "status": "pending",
  "source_document_id": "source-document-id",
  "source_document_type": "source-document-type",
  "source_payment_id": "source-payment-id",
  "error_message": "error-message",
  "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", {
  entity_id: "YOUR_ENTITY_ID"
});

console.log(response);

Returns

idstring
Other parameters
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": "id",
  "kind": "b2c_transaction",
  "status": "pending",
  "source_document_id": "source-document-id",
  "source_document_type": "source-document-type",
  "source_payment_id": "source-payment-id",
  "error_message": "error-message",
  "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

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: "0009:98765432109876",
  recipient_scheme_id: "0009",
  recipient_name: "Client Corp SARL",
  recipient_company_number: "123456789",
  recipient_routing_identifier: "0225:123456789",
  delivery_address: {
    address: "12 rue de la Livraison",
    address_2: "Bâtiment B",
    post_code: "75008",
    city: "Paris",
    country_code: "FR"
  }
}, {
  entity_id: "YOUR_ENTITY_ID"
});

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
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "id",
  "entity_id": "entity-id",
  "supplier_id": "supplier-id",
  "environment": "environment",
  "document_id": "document-id",
  "document_type": "document-type",
  "transmission_id": "transmission-id",
  "routing_identifier": "routing-identifier",
  "routing_scheme": "routing-scheme",
  "provider_status_code": "provider-status-code",
  "provider_status_text": "provider-status-text",
  "recipient_peppol_id": "recipient-peppol-id",
  "recipient_scheme_id": "recipient-scheme-id",
  "recipient_name": "recipient-name",
  "status": "status",
  "error_message": "error-message",
  "payload_format": "payload-format",
  "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": "network"
}

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

Invoice or credit note ID

Body parameters

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.sendEInvoice("invoice", "inv_123", {
  recipient_company_number: "123456789",
  recipient_routing_identifier: "0225:123456789",
  delivery_address: {
    address: "12 rue de la Livraison",
    address_2: "Bâtiment B",
    post_code: "75008",
    city: "Paris",
    country_code: "FR"
  },
  recipient_peppol_id: "0009:98765432109876",
  recipient_scheme_id: "0009",
  recipient_name: "Client Corp SARL"
}, {
  entity_id: "YOUR_ENTITY_ID"
});

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
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "id",
  "entity_id": "entity-id",
  "supplier_id": "supplier-id",
  "environment": "environment",
  "document_id": "document-id",
  "document_type": "document-type",
  "transmission_id": "transmission-id",
  "routing_identifier": "routing-identifier",
  "routing_scheme": "routing-scheme",
  "provider_status_code": "provider-status-code",
  "provider_status_text": "provider-status-text",
  "recipient_peppol_id": "recipient-peppol-id",
  "recipient_scheme_id": "recipient-scheme-id",
  "recipient_name": "recipient-name",
  "status": "status",
  "error_message": "error-message",
  "payload_format": "payload-format",
  "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": "network"
}

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. Prefix depends on the resource, for example inv_, cus_, or ent_.

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

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.eInvoicing.retryEInvoicingSubmissionById('E-INVOICING_ID', {
  entity_id: "YOUR_ENTITY_ID"
});

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
submitted_atstring<date-time>nullable
delivered_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
networkstring
json
{
  "id": "id",
  "entity_id": "entity-id",
  "supplier_id": "supplier-id",
  "environment": "environment",
  "document_id": "document-id",
  "document_type": "document-type",
  "transmission_id": "transmission-id",
  "routing_identifier": "routing-identifier",
  "routing_scheme": "routing-scheme",
  "provider_status_code": "provider-status-code",
  "provider_status_text": "provider-status-text",
  "recipient_peppol_id": "recipient-peppol-id",
  "recipient_scheme_id": "recipient-scheme-id",
  "recipient_name": "recipient-name",
  "status": "status",
  "error_message": "error-message",
  "payload_format": "payload-format",
  "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": "network"
}