Skip to content
Log in

Migration guide v2025-01-01 → v2025-10-13

Everything you need to update your code.

This guide helps you upgrade from X-B2B-API-Version: 2025-01-01 to X-B2B-API-Version: 2025-10-13, focusing on what you need to change, not just what changed.

  1. Update Base URL: Change your API base URL from app.b2brouter.net or app-staging.b2brouter.net to api.b2brouter.net or api-staging.b2brouter.net respectively.

  2. Add Version Header: Include X-B2B-API-Version: 2025-10-13 header in all requests, or configure the default version in your group’s API Key settings.

  3. Remove Format Extensions: Remove .json or .xml extensions from all endpoint paths. All responses are now JSON by default.

  4. Update Path Segments:

  • Replace /projects/ with /accounts/ in all paths
  • Replace /clients/ with /contacts/ in all paths
  • Remove /users/ prefix from code list endpoints
  • Remove /api/v1/ prefix from directory and tax report endpoints
  1. Update Pagination Handling: Update your code to read pagination data from the meta object instead of root-level properties:
const totalCount = response.total_count;
const offset = response.offset;
const limit = response.limit;
  1. Update Property Names: Replace all references to client with contact in your request and response handling code:
// Request body
{
"invoice": {
"client_id": 123,
"client": {
"name": "Client Name",
"taxcode": "9920:ESD29766391"
}
}
}
// Response body
{
"invoice": {
"id": 123,
"client": { ... }
}
}
  1. Consolidate Invoice Listings: Replace separate invoice listing endpoints with the consolidated /accounts/{account}/invoices endpoint using the type parameter:
  • For received invoices: GET /accounts/{account}/invoices?type=ReceivedInvoice
  • For self-invoices: GET /accounts/{account}/invoices?type=IssuedSelfInvoice
  • For simplified invoices: GET /accounts/{account}/invoices?type=IssuedSimplifiedInvoice
  1. Update Tax Reports: Replace old deprecated tax report endpoints with the new consolidated endpoints under /accounts/{account}/tax_reports and /tax_reports/{id}. Check on New Tax Reports API for more details.

  2. Handle Full Responses: Update your code to handle full resource representations returned by PUT, DELETE, and POST operations instead of empty 204 responses.

  3. Remove XML Support: If your integration relied on XML responses, convert your code to handle JSON responses only.

  4. Update Deprecated Invoice Attributes: Replace deprecated invoice attributes with their standardized alternatives:

{
"invoice": {
"contact_person": "John Doe",
"state": "accepted",
"customer_party_identification": "12345",
"accounting_cost": "DEPT-001",
"iban": "ES6000000000000000000000",
"bic": "ABCDESMMXXX",
"num_contracte": "CONTRACT-2024",
"organ_gestor": "ORG-001",
"oficina_comptable": "OFF-001"
}
}
  1. Update Contact/Client Attributes: Replace deprecated contact attributes with their standardized alternatives:
{
"contact": {
"old_channel": "peppol",
"taxcode": "9920:ESD29766391",
"contact": "John Doe",
"bank_account": "ES6000000000000000000000",
"company_identifier": "A12345678",
"transport_type": "peppol",
"document_type": "xml.ubl.invoice.bis3",
"posta_elettronica_certificata": "pec@example.it",
"codice_destinatario": "ABC1234"
}
}
  1. Update Routing Codes: Routing code fields (cin1_value, cin1_scheme, …, cin5_value, cin5_scheme) are no longer accepted as top-level contact attributes. They must be sent inside a routing_codes wrapper:
{
"contact": {
"name": "Ajuntament de Girona",
"cin1_value": "L01170792",
"cin1_scheme": "8014",
"cin2_value": "L01170792",
"cin2_scheme": "8014",
"cin3_value": "L01170792",
"cin3_scheme": "8014"
}
}

In responses, routing codes are also returned inside the routing_codes object.

  1. Update Invoice State Changes: Replace direct state attribute updates with the mark_as endpoint:
PUT /invoices/{id}.json
{
"invoice": {
"state": "accepted"
}
}

We recommend thoroughly testing your integration in the staging environment (api-staging.b2brouter.net) before deploying to production. The X-B2B-API-Version header allows you to test the new version without affecting your current integration.