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
Verify the FINA e-Račun connection
/e-invoicing/fina-eracun/enrollment/verifyReads Studio 404's FINA rights for the entity's OIB with two read-only FINA calls (outgoing and incoming invoice list, today only). Accepted outgoing list means sending is authorised and the enrollment becomes active; accepted incoming list means receiving is authorised (receive_authorized), which receiving also needs bound to the entity's current OIB. A later receive call (incoming list, fetch or status change) that FINA refuses with error 970 sets receive_authorized back to false until the next verification; the enrollment status does not change. FINA error 970 means the client's power of attorney (punomoć) is not registered (yet): that right is false and the enrollment stays pending, which is not a failure. Any other refusal by FINA marks the enrollment failed. A support deactivation is never lifted by verification. An unreachable FINA answers 503 and changes nothing. Pending enrollments are also re-checked daily. Answers 422 for request validation errors (validation_error), non-Croatian entities (FINA_ERACUN_NOT_SUPPORTED_FOR_COUNTRY) and an entity without a valid OIB (fina_eracun_invalid_oib). Bodyless.
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.verifyFinaEracunEnrollment({
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"enabled": true,
"receiving_enabled": true,
"receiving_allowed": true,
"enrollment": {
"status": "not_started",
"environment": "test",
"oib": "oib",
"connectivity_verified_at": "2025-01-15T10:30:00.000Z",
"send_authorized": true,
"receive_authorized": true,
"authorization_checked_at": "2025-01-15T10:30:00.000Z",
"last_checked_at": "2025-01-15T10:30:00.000Z",
"error": {
"code": "code",
"message": "message"
}
},
"certificate_configured": true,
"dispatch_available": true,
"operator_configured": true,
"receive_available": true,
"ready": true
}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({
entity_id: "YOUR_ENTITY_ID"
});
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": "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
}
}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({
entity_id: "YOUR_ENTITY_ID"
});
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": "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
}
}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({
entity_id: "YOUR_ENTITY_ID"
});
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: "123456789"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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)
/e-invoicing/supplierDeprecated: use PATCH /e-invoicing/settings instead. Responses carry Deprecation and Sunset headers; this endpoint will be removed after 2027-01-01. See the [deprecations guide](https://docs.spaceinvoices.com/guides/deprecations/).
Enables Peppol sending 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.
Body parameters
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
{
"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
/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: "0009:98765432109876",
scheme_id: "0009",
document_type: "invoice"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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)
/e-invoicing/customer-searchDeprecated: use POST /e-invoicing/recipients/check instead. Responses carry Deprecation and Sunset headers; this endpoint will be removed after 2027-01-01. See the [deprecations guide](https://docs.spaceinvoices.com/guides/deprecations/).
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: "peppol-id",
scheme_id: "scheme-id"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"data": [
{
"peppol_id": "peppol-id",
"scheme_id": "scheme-id",
"name": "name",
"country_code": "country-code",
"registered": true
}
]
}Get Croatian FINA e-Račun settings
/e-invoicing/fina-eracun/settingsRead whether the entity issues (enabled) and receives (receiving_enabled) Croatian eRačun through FINA e-Račun, the enrollment state (including whether FINA currently shows sending and receiving rights), and whether sending and receiving are available. Studio 404 sends and receives for each client under a FINA power of attorney (punomoć) that the client registers at FINA (see getFinaEracunAuthorizationForm). The enrollment becomes active once FINA shows sending rights for the entity's OIB (receiving is read from receive_authorized and does not move the status); until then domestic B2B documents that do not qualify for the cash/card CIS path are refused as before. Available only for Croatian entities; others receive 422 FINA_ERACUN_NOT_SUPPORTED_FOR_COUNTRY.
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.getFinaEracunSettings({
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"enabled": true,
"receiving_enabled": true,
"receiving_allowed": false,
"enrollment": {
"status": "pending",
"environment": "test",
"oib": "87769266074",
"connectivity_verified_at": "2026-11-23T08:00:00.000Z",
"send_authorized": false,
"receive_authorized": false,
"authorization_checked_at": "2026-11-23T08:00:00.000Z",
"last_checked_at": "2026-11-23T08:00:00.000Z",
"error": null
},
"certificate_configured": true,
"dispatch_available": false,
"receive_available": false,
"operator_configured": true,
"ready": false
}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({
entity_id: "YOUR_ENTITY_ID"
});
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": "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
/e-invoicing/received-documentsList electronic invoices received by the entity: French invoices delivered through its verified send-and-receive enrollment, or, for Hungarian entities that turned on receiving in their NAV settings, supplier invoices other taxpayers reported to NAV with the entity as the buyer (provider tells the two apart). Croatian entities that turned on receiving in their FINA e-Račun settings (and have the FINA power of attorney) receive eRačun through FINA. Durable stored records remain available during a temporary platform, NAV or FINA 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
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.
Filter the operational inbox by review state. informational lists Hungarian NAV modification and cancellation documents, which need no review and are never counted as new invoices.
Possible values: "pending", "accepted", "refused", "informational", "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
Pagination metadata including cursors and result counts
{
"data": [
{
"id": "id",
"provider": "france_pdp",
"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
/e-invoicing/reporting-recordsList provider-neutral audit status for French B2C and international transactions, cash-basis payments, and invoice lifecycle commands (French lifecycle commands and Croatian eRačun status changes).
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(undefined, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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)
/e-invoicing/supplierDeprecated: use GET /e-invoicing/settings instead. Responses carry Deprecation and Sunset headers; this endpoint will be removed after 2027-01-01. See the [deprecations guide](https://docs.spaceinvoices.com/guides/deprecations/).
Returns the entity's Peppol 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({
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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
/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(undefined, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
Pagination metadata including cursors and result counts
{
"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": "peppol",
"delivery_route": "direct"
}
],
"pagination": {
"total": 0,
"next_cursor": "next-cursor",
"prev_cursor": "prev-cursor",
"has_more": true
}
}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. 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
{
"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": "peppol",
"delivery_route": "direct"
}Update Croatian FINA e-Račun settings
/e-invoicing/fina-eracun/settingsEnable or disable the two directions independently. enabled controls eRačun issuance (sending); receiving_enabled controls receiving supplier eRačun into the received e-invoice inbox (receiving needs only a valid OIB). Enabling issuance requires a Croatian entity with a valid OIB, a bank account with an IBAN and default FINA operator settings (operator_oib and operator_label). Once enabled and the enrollment is active, domestic B2B invoices and credit notes that do not qualify for the cash/card CIS path are issued as eRačun and sent through FINA e-Račun; FINA fiscalizes them for the client and nothing is sent to CIS. Disabling stops new eRačun issuance but does not unlock documents already issued.
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.updateFinaEracunSettings({
enabled: true,
receiving_enabled: true
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"enabled": true,
"receiving_enabled": true,
"receiving_allowed": true,
"enrollment": {
"status": "not_started",
"environment": "test",
"oib": "oib",
"connectivity_verified_at": "2025-01-15T10:30:00.000Z",
"send_authorized": true,
"receive_authorized": true,
"authorization_checked_at": "2025-01-15T10:30:00.000Z",
"last_checked_at": "2025-01-15T10:30:00.000Z",
"error": {
"code": "code",
"message": "message"
}
},
"certificate_configured": true,
"dispatch_available": true,
"operator_configured": true,
"receive_available": true,
"ready": true
}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: false,
france_2026_emission_applicable: false,
default_scheme_id: "0009"
}, {
entity_id: "YOUR_ENTITY_ID"
});
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": "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)
/e-invoicing/supplierDeprecated: use PUT /entities/{id} instead. Responses carry Deprecation and Sunset headers; this endpoint will be removed after 2027-01-01. See the [deprecations guide](https://docs.spaceinvoices.com/guides/deprecations/).
The entity profile is canonical for Peppol enrollment data.
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": "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
/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 (default factur-x). A received Hungarian NAV invoice is available as the original NAV XML only (default original); other formats respond 422. A received Croatian eRačun is available as the signed original (original and ubl return the same UBL bytes, default original); factur-x and cii respond 422.
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. Defaults to factur-x for French invoices and to original for Hungarian NAV invoices (original NAV XML only) and Croatian eRačun (signed UBL: original and ubl return the same bytes; factur-x and cii respond 422).
Possible values: "original", "factur-x", "ubl", "cii"
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
/e-invoicing/received-documents/{id}/acceptIdempotently create an incomplete draft expense from a received supplier invoice. The response reports whether the source (the Factur-X representation for French invoices, the original NAV XML for Hungarian invoices) was attached or remains provider-only; the provider original remains available as legal evidence. Only supplier invoices can be accepted: NAV modification and cancellation documents stay in the inbox and respond 422. For Croatian eRačun the source is the embedded PDF (else the signed UBL), and FINA is then told the invoice is APPROVED (retried automatically when FINA does not allow it yet).
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", {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
Provider-scoped received-invoice ID (France: the platform invoice ID; Croatia: the FINA InvoiceID).
{
"id": "id",
"provider": "france_pdp",
"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
/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. French lifecycle actions need an AFNOR reason_code for dispute, hold, partial acceptance and refusal (422 validation error when missing). Croatian eRačun supports accepted (FINA APPROVED), refused (REJECTED, needs a free-text reason that FINA passes to the supplier: 422 fina_eracun_refusal_reason_required when missing) and payment_sent (PAYMENT_FULFILLED); other actions respond 422. Hungarian NAV has no buyer-side status responses, so this responds 422 for Hungarian entities. For Croatian eRačun the returned record is pending or failed while FINA does not allow the change yet, and it is retried automatically.
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
Lifecycle action. French invoices support all of them. Croatian eRačun supports accepted (FINA APPROVED), refused (REJECTED) and payment_sent (PAYMENT_FULFILLED); any other action responds 422.
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"
}, {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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
/e-invoicing/reporting-records/{id}/retryRetry a failed command (French e-reporting or a Croatian eRačun status change). 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", {
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"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
/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. Slovenian senders invoicing a Slovenian customer with a valid Slovenian tax number may omit the Peppol address (or give only the VAT-derived 9949 address): candidates are tried in order — the explicit address, the customer's tax number under scheme 9949 with and without the SI prefix (for example 9949:SI12345678, then 9949:12345678), UJP (known budget users only), then the bizBox gateway (9949:bizbox) — and the first registered recipient supporting the document type is used. UJP and bizBox route to the recipient by its Slovenian tax number, which the customer must therefore have. The chosen route is returned as delivery_route. A document issued as a Croatian eRačun is delivered through FINA e-Račun and cannot be sent over Peppol (409).
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: "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
{
"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": "peppol",
"delivery_route": "direct"
}Send e-invoice (deprecated)
/e-invoicing/send/{documentType}/{documentId}Deprecated: use POST /e-invoicing/documents/{id}/send instead. Responses carry Deprecation and Sunset headers; this endpoint will be removed after 2027-01-01. See the [deprecations guide](https://docs.spaceinvoices.com/guides/deprecations/).
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"
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
{
"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": "peppol",
"delivery_route": "direct"
}Retry failed submission
/e-invoicing/submissions/{id}/retryRetry a failed or rejected e-invoice submission sent through Peppol, a French PDP or Croatian FINA e-Račun. NAV and KSeF documents are not handled here: NAV reports are retried with the document's own /nav/retry operation (for example POST /invoices/{id}/nav/retry) and KSeF documents have their own submit and recover operations. A Croatian FINA e-Račun submission can be retried only while its status is failed (422 otherwise): a FINA content rejection is terminal and is corrected with a credit note.
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. 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
{
"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": "peppol",
"delivery_route": "direct"
}