E-Invoicing
E-Invoicing
Send and receive electronic invoices and credit notes. French entities also get B2C and international transaction reporting, cash-basis payment reporting, and invoice lifecycle actions.
The E-Invoicing object
Attributes
Sync enrollment
/e-invoicing/enrollment/syncRefresh enrollment and submission state from the entity's country-specific provider.
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.syncEInvoicingEnrollment();
console.log(response);Returns
{
"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
}
}Create verification link
/e-invoicing/enrollment/verification-linkCreate a fresh verification link for the entity enrollment when verification is required.
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.create();
console.log(response);Returns
{
"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
}
}Disconnect French e-invoicing
/e-invoicing/enrollment/disconnectRevoke the enrollment authorization and disable platform access 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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.disconnectEInvoicingEnrollment();
console.log(response);Returns
{
"disconnected": true
}Look up a French e-invoicing recipient
/e-invoicing/france/directory/lookupReturn the active and inactive French Annuaire routing entries for an exact SIREN.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
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
{
"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)
/e-invoicing/supplierDeprecated compatibility alias. Use PATCH /e-invoicing/settings to enable Peppol sending.
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/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
{
"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
/e-invoicing/recipients/checkNormalize a Peppol address and check registration and optional document type support.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Recipient Peppol identifier. May be a plain value or a full scheme:value address.
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_id": "string",
"scheme_id": "string",
"peppol_address": "string",
"registered": true,
"name": "string",
"document_type": "invoice",
"document_supported": true
}Search Peppol customer (deprecated)
/e-invoicing/customer-searchDeprecated compatibility alias. Use POST /e-invoicing/recipients/check.
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.searchEInvoicingCustomer({
peppol_id: "string",
scheme_id: "string"
});
console.log(response);Returns
{
"data": [
{
"peppol_id": "string",
"scheme_id": "string",
"name": "string",
"country_code": "string",
"registered": true
}
]
}Send e-invoice (deprecated)
/e-invoicing/send/:documentType/:documentIdDeprecated compatibility alias. Use POST /e-invoicing/documents/{id}/send.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Possible values: "invoice", "credit_note"
Body parameters
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
{
"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)
/e-invoicing/submissions/:id/retryRetry failed submission (deprecated path)
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.retryEInvoicingSubmission();
console.log(response);Returns
{
"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
/e-invoicing/settingsGet the current e-invoicing settings and enrollment state 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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.list();
console.log(response);Returns
{
"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
/e-invoicing/received-documentsList 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Maximum number of received invoices to return.
Default: 50
Return provider records after this opaque received-invoice ID.
Return provider records before this opaque received-invoice ID.
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
{
"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
/e-invoicing/reporting-recordsList provider-neutral audit status for B2C and international transactions, cash-basis payments, and invoice lifecycle commands.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Default: 50
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
{
"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)
/e-invoicing/supplierDeprecated compatibility alias. Use GET /e-invoicing/settings for enrollment state.
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.getEInvoicingSupplier();
console.log(response);Returns
{
"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
/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.
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
{
"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)
/e-invoicing/submissions/:idGet submission detail (deprecated path)
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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.getEInvoicingSubmission();
console.log(response);Returns
{
"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
/e-invoicing/submissions/{id}Get 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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.get("inv_6595a27b5d35015c3ef0c3fd");
console.log(response);Returns
{
"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
/e-invoicing/settingsEnable or disable the entity's country-specific e-invoicing channel and configure supported automation.
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/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
{
"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)
/e-invoicing/supplierDeprecated compatibility alias. Entity profile data is canonical for Peppol enrollment.
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": "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
/e-invoicing/received-documents/{id}/downloadDownload the preserved provider original or a converted Factur-X, UBL, or CII representation of a received French e-invoice.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Opaque platform-scoped received-invoice ID returned by the received invoice list.
Query parameters
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
/e-invoicing/received-documents/{id}/acceptIdempotently 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
Provider-scoped received-invoice ID.
{
"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
/e-invoicing/received-documents/{id}/lifecycleSend 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Opaque platform-scoped received-invoice ID returned by the received invoice list.
Body parameters
Provider-neutral French invoice lifecycle action.
Possible values: "acknowledged", "accepted", "partially_accepted", "disputed", "on_hold", "completed", "refused", "payment_sent"
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
{
"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
/e-invoicing/reporting-records/{id}/retryRetry a failed command. Submitted records and commands with an ambiguous provider outcome are immutable.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/e-invoicing/documents/{id}/sendSend 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 ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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: "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
{
"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
/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/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.eInvoicing.retryEInvoicingSubmissionById("inv_6595a27b5d35015c3ef0c3fd");
console.log(response);Returns
{
"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"
}