Import an invoice from a file

Import an invoice from a supported file.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Account identifier (ID)

Query Params
boolean
enum
Defaults to false

Indicates whether the invoice should be automatically processed after import.

When set to true and the invoice passes validations:

  • For sending transports (non-download), the invoice is queued to be sent asynchronously.
  • For download transport, the invoice is not sent. Instead, if tax report generation is enabled and required for this invoice, the invoice will be issued and the tax report generated
    (invoice ends in state=issued and exposes tax_report_ids). Otherwise, the invoice may end in state=error.

Note: This option is incompatible with the custom signature configuration.

Allowed:
boolean
enum
Defaults to false

Indicates whether the invoice should be issued synchronously after import (c1 → issued) without going through the transport send flow.

When set to true and the invoice passes validations:

  • The invoice transitions to state=issued inline.
  • If the account has a before_send tax report setting enabled with auto_generate on and the invoice qualifies, the tax report is generated inline and exposed via tax_report_ids. When auto_generate is off the invoice is still issued but no report is created, consistent with the send flow — those reports are managed through the Tax Reports API.
  • Authorities that report after sending (for example SII or SDI) are not triggered by issuing; their reports are created when the invoice is sent or marked as sent.
  • No background send job is enqueued; the transport-level state remains untouched.
  • While in state=issued the invoice becomes read-only: it cannot be updated, deleted, or reverted to new until it is sent or downloaded.

If both send_after_import and issue_after_import are true, send_after_import wins. Ignored for non-invoice documents.

Allowed:
boolean
Defaults to false

When true, merges the descriptive data (address, city, etc.) of the imported invoice into the matched contact. Routing and tax identifiers (cin_value, pin_value, routing_codes, tin_value) are only filled in when blank on the contact — a value already present is never overwritten. When false (default), a difference in the descriptive data or the routing identifiers leaves the matched contact unchanged and creates an office under it instead.

Ignored for received documents: an inbound invoice never rewrites an existing contact's data.

string | null

Internal identifier that specifies the Transport type used for the contact party of the invoice within B2Brouter. This code determines the transport in which the document is exchanged with the contact entity.

  • If the contact already exists, this value will overwrite the existing transport_type_code.

  • If the parameter is not provided, the system assigns the transport_type_code based on the following priority:

    1. If the contact already exists, its current transport_type_code is used.
    2. If the contact does not exist:
      • If the contact is found in the B2Brouter directory, the code defined there is used.
      • Otherwise, the default transport type defined in the account settings is applied.

Valid transport type codes can be retrieved from the Transport Types endpoint in the Code Lists section:
/transport_types

If the specified transport_type_code is invalid or incompatible, the system will apply the default transport_type_code and document_type_code.

string | null

Internal identifier that specifies the Document Type used for the contact party of the invoice within B2Brouter. This code determines the format in which the document is exchanged with the contact entity.

  • If the contact already exists, this value will overwrite the existing document_type_code.

  • If the parameter is not provided, the system assigns the document_type_code based on the following priority:

    1. If the contact already exists, its current document_type_code is used.
    2. If the contact does not exist:
      • If the contact is found in the B2Brouter directory, the code defined there is used.
      • Otherwise, the default document type defined in the account settings is applied.

Valid document type codes can be retrieved from the Document Types endpoint in the Code Lists section:
/document_types

If the specified document_type_code is invalid or incompatible with the selected transport_type_code, the system will apply the default transport_type_code and document_type_code.

boolean
Defaults to null

A flag that specifies whether the invoice to be imported is issued or received.

boolean

Mark the invoice as acknowledged.

Body Params

The invoice file to import

Headers
string
Defaults to 2026-06-26

Specifies the version of the API to use in this request. If not specified uses the API-Version set in the group conifguration
B2Brouter UI Application -> Developers -> API Keys -> API Version

Responses

401

Unauthorized

403

Forbidden

406

Not Acceptable

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json