canonical: https://jentic.com/apis/b2brouter.net/b2brouter

# B2Brouter API

The B2Brouter API handles electronic invoicing and billing document exchange: creating, sending, validating, and tracking invoices and orders across accounts and contacts. It supports tax report settings, attachments, and multiple document formats for compliant e-invoicing. Requests authenticate with an API key sent in the X-B2B-API-Key header.

## For AI agents

Create, send, validate, and track electronic invoices and orders, and manage the accounts and contacts they belong to.

## Scope

Does not handle payment collection, payroll, or general ledger accounting - use for electronic invoicing and document exchange only.

## Capabilities

- Create and send compliant electronic invoices for an account
- Validate invoices and track their delivery and acknowledgement state
- Import invoices from a file and attach supporting documents
- Manage accounts, bank accounts, and tax report settings
- Maintain client and provider contacts used on documents

## Use cases

### Automated invoice issuance

A billing system needs to issue compliant electronic invoices and route them to recipients. The B2Brouter API creates an invoice under an account, validates it, and sends it through the e-invoicing network, returning delivery state for tracking.

Example prompt: Create an invoice via POST `/accounts/{account}/invoices`, then send it with POST `/invoices/send_invoice/{id}`

### Invoice validation and compliance

Before an invoice is sent, it must pass structural and tax checks. The validate operation returns whether an invoice is well-formed so a backend can catch errors before transmission and generate tax reports.

Example prompt: Call GET `/invoices/{id}/validate` and, when valid, generate a tax report from the invoice

### Contact and account management

A finance platform managing many billing entities needs to maintain accounts and their clients. The account and contact operations create accounts, configure bank accounts, and maintain client and provider contacts used on documents.

Example prompt: Create a contact via POST for an account and list its existing invoices

### AI agent billing automation

An AI agent handling accounts receivable can draft, validate, and send invoices without hand-wiring the B2Brouter auth header. Through Jentic the agent discovers the invoicing operations by intent and calls them with the stored key.

Example prompt: Search Jentic for 'create and send an invoice', load the schema, and issue an invoice for a client

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/accounts/{account}/invoices` | List the invoices for an account |
| POST | `/accounts/{account}/invoices` | Create an invoice under an account |
| GET | `/invoices/{id}` | Retrieve a single invoice |
| POST | `/invoices/send_invoice/{id}` | Send an invoice through the network |
| GET | `/invoices/{id}/validate` | Validate an invoice before sending |
| GET | `/accounts/{account}/contacts` | List the contacts for an account |

## Key resources

- **Invoices** — Create, update, validate, send, and track invoices
- **Orders** — List orders and switch their state
- **Accounts** — Create and manage billing accounts and their bank accounts
- **Contacts** — Maintain client and provider contacts used on documents
- **Tax report settings** — Configure and manage tax reporting for an account

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 62 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 47 / 100
  - Developer Experience & Jentic Compatibility: 75 / 100
  - AI-Readiness & Agent Experience: 58 / 100
  - Agent Usability: 91 / 100
  - Security: 50 / 100
  - AI Discoverability: 68 / 100
- **View full report:** https://jentic.com/apis/b2brouter.net/b2brouter/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the B2Brouter API by hand means setting the X-B2B-API-Key header on every request and shaping the invoice, order, and contact payloads yourself. Through Jentic you install once, import the API from the API Directory, store your credential once, and your agent calls it.
- **Permission scoping:** The B2Brouter API addresses invoices, orders, and contacts by id in the URL path, so you can limit the agent to the operations it needs, such as creating or validating an invoice. You credit the agent only with the operations you allow, so deleting an invoice stays out unless you add it.
- **Credential handling:** Your the B2Brouter credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create and send an invoice', and Jentic returns the matching B2Brouter operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Xero Accounting API** — Full accounting ledger with invoicing and reconciliation
- **Taxamo API** — Tax calculation and compliance for cross-border sales
- **Stripe API** — Card and bank payment collection for issued invoices

## FAQ

### What authentication does the B2Brouter API use?

The B2Brouter API authenticates with an API key sent in the X-B2B-API-Key header. Through Jentic the key is stored encrypted in your own instance and injected into each request at run time.

### Is there a the B2Brouter API MCP server?

You don't need an MCP server to give your agent the B2Brouter API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it. That keeps another server's tool definitions out of your agent's context while still giving it the operation set from the spec.

### Can the B2Brouter API validate an invoice before sending it?

Yes. The GET `/invoices/{id}/validate` operation checks an invoice for structural and tax issues, so a backend can confirm it is well-formed before transmitting it through the e-invoicing network.

### Can I limit what my agent is allowed to do with the B2Brouter API?

Yes. Because you run Jentic One yourself, your own rules decide which the B2Brouter API operations and credentials the agent may use. You grant only the operations it needs, such as creating and sending invoices, so deleting an account stays off limits unless you add it. The choice of what the agent may call is yours.

### How do I connect my agent to the B2Brouter API through Jentic?

Search Jentic by intent such as 'create and send an invoice' to discover the operation, load its input schema, and your agent calls it with your stored credential injected at run time. To run it on your own infrastructure, install Jentic One from its GitHub repo.
