# B2Brouter API Documentation > The B2Brouter API will help you sending and receiving electronic documents. This API allows users to interact with the B2Brouter, managing different entities such as `Invoices`, `Clients`, `Channels`, etc. ## API Reference: B2Brouter API - Accounts - [List accounts](https://b2brouter.readme.io/reference/get-accounts.md): This endpoint lists all accounts associated with the group. Supports optional query language filtering. - [Create an account](https://b2brouter.readme.io/reference/create-account.md): Creates a new account associated with the group. **Creating an office (organisational unit):** To create an office, include `parent_id` in the request body. The parent must be a top-level account… - [Retrieve an account](https://b2brouter.readme.io/reference/get-account.md) - [Update an account](https://b2brouter.readme.io/reference/put-account.md): This endpoint updates an account associated with a group. Returns the full account representation after successful update. Note*: The TIN can not be updated. - [Delete an account](https://b2brouter.readme.io/reference/delete-account.md): Permanently deletes the account. This action cannot be undone. Once deleted, the account is gone: any further request for it (including a repeated delete) returns 404. - [Upload an account logo](https://b2brouter.readme.io/reference/upload-account-logo.md): Uploads a logo file for the specified account. If a logo already exists, it will be replaced. The logo will be displayed automatically in all generated PDF invoices for this account. - [Deletes account logo](https://b2brouter.readme.io/reference/delete-account-logo.md): Deletes the uploaded logo for the specified account. - Bank Accounts - [List bank accounts](https://b2brouter.readme.io/reference/get-bank-accounts.md): Returns an array of the bank accounts of the account. - [Create a bank account](https://b2brouter.readme.io/reference/create-bank-account.md): Creates a new bank account. - [Get a bank account](https://b2brouter.readme.io/reference/get-bank-account.md): Returns a bank account entity - [Update a bank account](https://b2brouter.readme.io/reference/put-bank-account.md): Updates a bank account and returns the full bank account representation - [Delete a bank account](https://b2brouter.readme.io/reference/delete-bank-account.md): Deletes a bank account and returns the full bank account representation - Code lists - [List countries](https://b2brouter.readme.io/reference/get-countries.md): Returns an array of countries where is available to use B2BRouter. - [List schemes](https://b2brouter.readme.io/reference/get-schemes.md): Returns an array of available schemes to use. - [List of currencies](https://b2brouter.readme.io/reference/get-currencies.md): Returns an array of available currencies - [List of available languages](https://b2brouter.readme.io/reference/get-languages.md): Returns a list of all available languages in b2brouter. - [List of available document types](https://b2brouter.readme.io/reference/get-document-types.md): Returns a list of all available document types in b2brouter. - [List of available transport types](https://b2brouter.readme.io/reference/get-transport-types.md): Returns a list of all available transport types in b2brouter. - [List of available invoice status](https://b2brouter.readme.io/reference/get-invoice-states.md): Return an array of all available states of invoice. - Contacts - [Get a contact (client/provider)](https://b2brouter.readme.io/reference/get-contact.md): Returns a contact entity - [Update a contact](https://b2brouter.readme.io/reference/put-contact.md): Updates a contact and returns the full contact representation - [Delete a contact](https://b2brouter.readme.io/reference/delete-contact.md): Deletes a contact and returns the full contact representation - [List contacts](https://b2brouter.readme.io/reference/get-contacts.md): Returns an array of the contacts for the specified account. - [Create a contact](https://b2brouter.readme.io/reference/create-contact.md): Creates a new contact and returns the full contact representation. **Creating an office (organisational unit):** To create an office, set the `parent_id` field to the ID of the parent contact.… - eAccounting - [List connected accounts](https://b2brouter.readme.io/reference/get-connected-accounts.md): This endpoint list all connected client accounts associated through eAccounting connection with your account. - Events - [List of events](https://b2brouter.readme.io/reference/get-events.md): Returns a paginated list of the events of an account. - Invoices - [Get an invoice](https://b2brouter.readme.io/reference/get-invoice.md): Returns information about a specific invoice, it can be an **issued invoice** or a **received invoice**. - [Update an invoice](https://b2brouter.readme.io/reference/put-invoice.md): Update a specific invoice. - [Delete an invoice](https://b2brouter.readme.io/reference/delete-invoice.md): Delete a specific invoice. - [Get an invoice with a specific document type](https://b2brouter.readme.io/reference/get-invoice-with-document-type.md): Returns the specified invoice with the indicated document type.
It can be an **issued invoice** or a **received invoice**. - [List of invoices](https://b2brouter.readme.io/reference/get-invoices.md): Returns a paginated list of the invoices of the account. - [Create an invoice](https://b2brouter.readme.io/reference/create-invoice.md): Create an invoice - [Import an invoice from a file](https://b2brouter.readme.io/reference/import-invoice.md): Import an invoice from a supported file. - [Switch invoice state](https://b2brouter.readme.io/reference/mark-as-invoice.md): Switch the state of an existing invoice. - [Add attachment](https://b2brouter.readme.io/reference/add-attachment-invoice.md): Adds an attachment to an existing invoice. Do not confuse with add_attachments method (note plural) - [Add attachments](https://b2brouter.readme.io/reference/add-attachments-invoice.md): Adds attachments to an existing invoice. Expects a multipart POST request, attachments must be compressed in a zip file. - [Generate a tax report from an Invoice](https://b2brouter.readme.io/reference/generate-tax-report-from-invoice.md): Generates the tax report for an existing invoice. Depending on the Tax Authority and the settings of your account, the tax report might be automatically send after issuing an invoice. Thus, it might… - [Send invoice](https://b2brouter.readme.io/reference/send-invoice.md): Send the invoice - [Mark an invoice as acknowledged](https://b2brouter.readme.io/reference/ack-invoice.md): Mark an invoice as acknowledged. This will prevent the invoice from being listed when getting the list of issued or received invoices, unless when param ack=true is given. - [Validates an invoice](https://b2brouter.readme.io/reference/validate.md): This endpoint validates the electronic invoice identified by the ID specified in the request parameters. The validation of the e-document is performed through: - Checking the use of a correct… - [List the response documents received for an invoice](https://b2brouter.readme.io/reference/list-invoice-responses.md): Lists the response documents received for an invoice, oldest first. A response document is a file another party sent back about your invoice. The `source` field identifies the channel each document… - Ledgers - [Download a Ledger](https://b2brouter.readme.io/reference/download-ledger.md): Download a Ledger, the XML document sent to the Tax Authority. For ledgers created through the import endpoint the stored document is available from creation. Natively generated ledgers are built and… - [Download the response for a Ledger](https://b2brouter.readme.io/reference/download-response-ledger.md): Download the response from the Tax Authority for a Ledger. Note that sending the ledger to the Tax Authority is an asynchronous process. No response can be downloaded until B2Brouter receives it from… - [ Import a ledger](https://b2brouter.readme.io/reference/importledger.md): Import a ledger by providing a raw XML payload. - [[BETA][New Tax Report API] Get a Ledger](https://b2brouter.readme.io/reference/show-ledger.md): [BETA][New Tax Report API] Consult a ledger's lifecycle state and error details. States advance asynchronously as the tax authority processes the submission (DGFiP F10: acknowledged, deposited,… - Lookup - [Show company from Directory (by country and scheme codes)](https://b2brouter.readme.io/reference/lookup-directory-by-country-and-scheme.md): Return the information about specified company that lists in our Directory. The lookup is always asynchronous: the first request returns `202 Accepted` with a polling URL (there is no synchronous… - [Show company from Directory (by scheme code)](https://b2brouter.readme.io/reference/lookup-directory-by-scheme.md): Return the information about specified company that lists in our Directory. The lookup is always asynchronous: the first request returns `202 Accepted` with a polling URL (there is no synchronous… - [Show company from Directory (by country code)](https://b2brouter.readme.io/reference/lookup-directory-by-country.md): Return the information about specified company that lists in our Directory. The lookup is always asynchronous: the first request returns `202 Accepted` with a polling URL (there is no synchronous… - Orders - [Get an order](https://b2brouter.readme.io/reference/get-order.md): Returns information about a specific order. - [List of orders](https://b2brouter.readme.io/reference/get-orders.md): Returns a paginated list of the submitted orders of the company - [Switch order state](https://b2brouter.readme.io/reference/mark-as-order.md): Switch the state of an existing order. - Tax Reports - [Download a tax report](https://b2brouter.readme.io/reference/new-download-tax-report.md): Download a tax report in the format that is sent to the Tax Authority. Note that if the Tax Authority requires the tax report to be cleared (such as in Zatca) or chained (such as in Verifactu and… - [Download the official receipt for a tax report](https://b2brouter.readme.io/reference/download-tax-report-response.md): Download the Official Receipt of Acknowledgement received from the Tax Authority after successfully submitting a tax report. This endpoint is primarily used for KSeF (Polish tax reporting system) to… - [List tax reports](https://b2brouter.readme.io/reference/get-tax-reports.md): Returns a paginated list of tax reports. - [Create a Tax Report](https://b2brouter.readme.io/reference/create-tax-report.md): Creates a Tax Report. If the creation of the Tax Report is successful, the response of this action will already contain the QR code and the identifier for the Tax Report. However, you have to check… - [Import a Tax Report from an XML file](https://b2brouter.readme.io/reference/import-tax-report.md): Import a Tax Report from an XML file If the creation of the Tax Report is successful, the response of this action will already contain the QR code and the identifier for the Tax Report. Note that if… - [Get a tax report](https://b2brouter.readme.io/reference/get-tax-report.md): Returns a tax report You have to check the status of the tax report that we send in your behalf in order to be able to take the necessary actions in case any error or warning is issued by the Tax… - [Correct or Modify a Tax Report](https://b2brouter.readme.io/reference/modify-tax-report.md): Correct or Modify a Tax Report If the tax report has already been registered by the Tax Authority, issue a correction ("subsanación" as it's call in Verifactu) of the tax report with the data… - [Annulates a tax report](https://b2brouter.readme.io/reference/annulate-tax-report.md): Annulates a TaxReport - [Bulk-create SII tax reports (async batch)](https://b2brouter.readme.io/reference/create-tax-report-batch.md): Submits up to 5000 SII tax reports in one request as a batch. Processing is always asynchronous. This endpoint validates only the envelope (a `tax_reports` array within the size limit) and returns… - [Get the status of a bulk SII tax report batch](https://b2brouter.readme.io/reference/get-tax-report-batch.md): Returns the outcome of a batch submitted to `POST /accounts/{account}/tax_report_batches`. While the background job runs `status` is `processing`; once it finishes `status` is `done` and `results` is… - Tax Report Settings - [List tax report settings](https://b2brouter.readme.io/reference/get-tax-report-settings.md): This endpoint list all tax report settings this account has configured. - [Create a tax report setting](https://b2brouter.readme.io/reference/create-tax-report-setting.md): This endpoint creates a new tax report setting associated with the group. - [Retrieve a tax report setting](https://b2brouter.readme.io/reference/get-tax-report-setting.md) - [Update a tax report setting](https://b2brouter.readme.io/reference/put-tax-report-setting.md): This endpoint updates a tax report setting associated with an account. - [Delete a tax report setting](https://b2brouter.readme.io/reference/delete-tax-report-setting.md): This endpoint deletes a tax report setting associated with an account. - Transports - [List configured transports](https://b2brouter.readme.io/reference/get-transports.md): This endpoint list all transports this account has configured. - [Create a transport configuration](https://b2brouter.readme.io/reference/create-transport.md): Some transport types needs configuration. Configurable transport types are: b2brouter, email, peppol, es.pecam, es.eusko_jaurlaritza, edicom, ediversa. - [Retrieve a transport configuration](https://b2brouter.readme.io/reference/get-transport.md) - [Update a transport configuration](https://b2brouter.readme.io/reference/put-transport.md): This endpoint updates a transport configuration associated with an account. - [Delete a transport configuration](https://b2brouter.readme.io/reference/delete-transport.md): This endpoint deletes a transport configuration associated with an account. - [Issue a Peppol migration code](https://b2brouter.readme.io/reference/create-peppol-migration-code.md): Issues the migration code that lets the account move its Peppol participant identifier from B2Brouter to another provider. Hand the code to the gaining provider: they use it to claim the identifier.… - [Cancel a Peppol migration code](https://b2brouter.readme.io/reference/delete-peppol-migration-code.md): Cancels the migration code of the account, so it can no longer be used to claim the identifier. This is the only call that sets `migration_pending` back to `false` on the `peppol` transport.… - TIN Verifications - [Create a TIN verification request](https://b2brouter.readme.io/reference/create-tin-verification.md): Submits a batch of TIN (Tax Identification Number) + name pairs for verification against a tax authority census. Processing is always asynchronous. This endpoint returns `202 Accepted` immediately… - [Get a TIN verification request](https://b2brouter.readme.io/reference/get-tin-verification.md): Retrieves the current status and results of a TIN verification request. While the request is `pending` or `processing`, the `results` array will be empty. Once the status transitions to `success` or… - Invoice Imports - [Create a bulk invoice import batch](https://b2brouter.readme.io/reference/create-invoice-import-batch.md): Submits up to 100 invoice XML files in a single multipart request and imports them asynchronously, using the same per-file pipeline as the web-UI bulk upload. Processing is always asynchronous. This… - [Get a bulk invoice import batch](https://b2brouter.readme.io/reference/get-invoice-import-batch.md): Returns the current state of a batch import and the per-file outcomes. The response includes one `results[]` entry per uploaded file, in the original upload order. Each result carries an explicit… - Validation - [Validates an electronic document](https://b2brouter.readme.io/reference/validate-document.md): This endpoint validates a single electronic document provided in the request body. The validation of the e-document is performed through: - Checking the use of a correct syntax schema (XSD). -… - Attachments - [Delete an attachment](https://b2brouter.readme.io/reference/destroy-attachment.md): Deletes an attachment. Returns the deleted attachment's details. - Payments - [List of payments](https://b2brouter.readme.io/reference/get-account-payments.md): Returns a paginated list of the payments recorded on the account's invoices, newest first, across all its invoices. Use the `invoice_id` parameter to list the payments of a single invoice. - [Record a payment on an invoice](https://b2brouter.readme.io/reference/create-payment.md): Records a payment — total or partial — on one of the account's invoices, identified by the `invoice_id` field of the body. An invoice that does not belong to the account is a `404`. The invoice may… - [Get a payment](https://b2brouter.readme.io/reference/get-payment.md): Retrieves a single payment by its ID. - [Update a payment](https://b2brouter.readme.io/reference/update-payment.md): Updates the payment's own fields (amount, date, payment method, reference). The invoice link is immutable — `invoice_id` in the body is ignored. `full` is only accepted when creating a payment —… - [Delete a payment](https://b2brouter.readme.io/reference/delete-payment.md): Deletes a payment and returns it. Deleting a payment does **not** revert the invoice state: an invoice already marked `paid` stays `paid`. A payment already declared to a tax authority cannot be… - Web Hooks - [List web hooks](https://b2brouter.readme.io/reference/get-web-hooks.md): Retrieves a list of Web Hooks. This endpoint returns all Web Hooks associated with the authenticated integration group, including their configuration details such as destination URL, enabled status,… - [Create a new web hook](https://b2brouter.readme.io/reference/create-web-hook.md): Creates a new Web Hook configuration. A Web Hook allows you to register an HTTP endpoint that will receive real-time notifications when specific events occur in the platform, such as tax report,… - [Get a web hook](https://b2brouter.readme.io/reference/get-web-hook.md): Retrieves the configuration of a specific Web Hook. A Web Hook defines an HTTP endpoint that will receive event notifications from the platform (such as tax report, issued invoice, or ledger state… - [Modify a web hook](https://b2brouter.readme.io/reference/update-web-hook.md): Updates the configuration of an existing Web Hook. This endpoint allows you to modify one or more properties of a Web Hook, such as the destination URL, enabled status, subscribed events or the… - [Deletes a web hook](https://b2brouter.readme.io/reference/delete-web-hook.md): Deletes an existing Web Hook. Once a Web Hook is deleted, its configuration is permanently removed and the platform will immediately stop sending event notifications to its associated endpoint. This… ## API Reference: Webhooks - Invoices - [New state change for a issued invoice](https://b2brouter.readme.io/reference/getnewinvoicestatechange.md): New state change for a issued invoice - [New received invoice](https://b2brouter.readme.io/reference/getnewreceivedinvoicecreated.md): Triggered when a new received invoice is created or imported. - [New state change for a received invoice](https://b2brouter.readme.io/reference/getnewreceivedinvoicestatechange.md): New state change for a received invoice. - [Bulk invoice import batch completed](https://b2brouter.readme.io/reference/getinvoiceimportfinished.md): Fired when a bulk invoice import batch (submitted to `POST /accounts/{account}/invoices/imports`) finishes processing. The payload carries the batch id, final status and summary counts; fetch the… - TaxReports - [New state change for a tax report](https://b2brouter.readme.io/reference/getnewtaxreportstatechange.md): New state change for a tax report. - [SII bulk ingest batch completed](https://b2brouter.readme.io/reference/getsiibatchfinished.md): Fired when an SII bulk ingest batch (submitted to `POST /accounts/{account}/tax_report_batches`) finishes processing. The payload carries the batch id, final status and summary counts; fetch the full… - Ledgers - [[BETA] New state change for a ledger](https://b2brouter.readme.io/reference/getnewledgerstatechange.md): [BETA] New state change for a ledger. - TIN Verifications - [TIN verification request completed](https://b2brouter.readme.io/reference/gettinverificationfinished.md): Fired when a TIN verification request finishes processing (either successfully or with an error). The payload contains the request ID and final status. Use `GET /tin_verifications/{id}` to fetch the…