---
updatedAt: 2026-04-21T06:16:37.000Z
agentTools:
  projectIndex: https://b2brouter.readme.io/llms.txt
---

# List accounts

This endpoint lists all accounts associated with the group. Supports optional query language filtering.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "B2Brouter API",
    "description": "The B2Brouter API allows you to send and receive electronic documents.",
    "version": "2026-06-26",
    "contact": {
      "name": "Service Delivery Team",
      "email": "servicedelivery@b2brouter.net"
    }
  },
  "servers": [
    {
      "url": "https://api-staging.b2brouter.net",
      "description": "Test server"
    },
    {
      "url": "https://api.b2brouter.net",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Accounts",
      "description": "Related to accounts"
    }
  ],
  "paths": {
    "/accounts": {
      "get": {
        "operationId": "get-accounts",
        "tags": [
          "Accounts"
        ],
        "summary": "List accounts",
        "description": "This endpoint lists all accounts associated with the group. Supports optional query language filtering.",
        "parameters": [
          {
            "$ref": "#/components/parameters/api_version_header"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "query",
            "in": "query",
            "description": "Query language filter expression for flexible account filtering.\n\n**Operators:**\n- `=` Exact match\n- `~` Substring match (case-insensitive)\n- `>` Greater than\n- `<` Less than\n- `>=` Greater than or equal\n- `<=` Less than or equal\n- `-` Negation\n- `AND` Logical AND\n- `OR` Logical OR\n\n**Searchable Fields:**\n- `tin_value`, `tin_scheme`, `cin_value`, `cin_scheme`, `country`, `name` (from Company)\n- `name`, `identifier`, `created_at`, `status` (from Project/Account)\n\n**Examples:**\n- `tin_value=ES92915236C` - Find account with specific TIN\n- `name~\"Acme Corp\"` - Find accounts containing \"Acme Corp\" in name\n- `country=es AND tin_scheme=9920` - Spanish accounts with specific TIN scheme\n- `-status=9` - Exclude archived accounts (status 9)\n\nReturns 400 Bad Request with error code `invalid_query` if field is not recognized or syntax is invalid.\n",
            "required": false,
            "schema": {
              "type": "string",
              "example": "country=es AND tin_scheme=9920"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accounts": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Account"
                          },
                          {
                            "$ref": "#/components/schemas/TransactionsEdocsync"
                          }
                        ]
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/IndexMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "description": "API Key of your account",
        "name": "X-B2B-API-Key",
        "in": "header"
      }
    },
    "parameters": {
      "api_version_header": {
        "name": "X-B2B-API-Version",
        "in": "header",
        "description": "Specifies the version of the API to use in this request. If not specified uses the API-Version set in the group conifguration\nB2Brouter UI Application -> Developers -> API Keys -> API Version\n",
        "required": false,
        "schema": {
          "type": "string",
          "example": "2026-06-26",
          "default": "2026-06-26"
        }
      },
      "offset": {
        "name": "offset",
        "description": "Jump to the first object.",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 0,
          "example": 0
        }
      },
      "limit": {
        "name": "limit",
        "description": "Number of items in the response (500 maximum)",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 25,
          "example": 25
        }
      }
    },
    "schemas": {
      "SchemeCode": {
        "type": "string",
        "nullable": true,
        "description": "Identifier scheme code (e.g. for TIN, CIN or PIN). Returned as a zero-padded string in this API version. Use the **Schemes** endpoint in Code lists section (`/schemes`) to get all valid scheme codes.\n",
        "example": "9920"
      },
      "Account": {
        "type": "object",
        "description": "Represents an account as an object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 12345,
            "readOnly": true,
            "description": "Internal account ID"
          },
          "tin_value": {
            "type": "string",
            "description": "Tax identification number value",
            "maxLength": 255,
            "example": "A13585625",
            "nullable": true
          },
          "tin_scheme": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemeCode"
              }
            ],
            "description": "Tax identification number scheme",
            "maxLength": 255,
            "example": 9920
          },
          "cin_value": {
            "type": "string",
            "description": "Company identifier number value",
            "maxLength": 255,
            "nullable": true,
            "example": "1234567890123"
          },
          "cin_scheme": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SchemeCode"
              }
            ],
            "description": "Company identifier number scheme",
            "maxLength": 255,
            "nullable": true,
            "example": "0088"
          },
          "routing_codes": {
            "type": "object",
            "description": "Additional company identifier numbers (CIN 1–5) used for routing purposes.",
            "properties": {
              "cin1_value": {
                "type": "string",
                "description": "First additional company identifier number value",
                "maxLength": 255,
                "nullable": true,
                "example": "7080000950171"
              },
              "cin1_scheme": {
                "type": "string",
                "description": "Scheme of the first additional company identifier number. Returned as a zero-padded 4-character string (e.g. \"0088\"), or null when unknown.",
                "maxLength": 255,
                "nullable": true,
                "example": "0088"
              },
              "cin2_value": {
                "type": "string",
                "description": "Second additional company identifier number value",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin2_scheme": {
                "type": "string",
                "description": "Scheme of the second additional company identifier number. Returned as a zero-padded 4-character string (e.g. \"0088\"), or null when unknown.",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin3_value": {
                "type": "string",
                "description": "Third additional company identifier number value",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin3_scheme": {
                "type": "string",
                "description": "Scheme of the third additional company identifier number. Returned as a zero-padded 4-character string (e.g. \"0088\"), or null when unknown.",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin4_value": {
                "type": "string",
                "description": "Fourth additional company identifier number value",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin4_scheme": {
                "type": "string",
                "description": "Scheme of the fourth additional company identifier number. Returned as a zero-padded 4-character string (e.g. \"0088\"), or null when unknown.",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin5_value": {
                "type": "string",
                "description": "Fifth additional company identifier number value",
                "maxLength": 255,
                "nullable": true,
                "example": null
              },
              "cin5_scheme": {
                "type": "string",
                "description": "Scheme of the fifth additional company identifier number. Returned as a zero-padded 4-character string (e.g. \"0088\"), or null when unknown.",
                "maxLength": 255,
                "nullable": true,
                "example": null
              }
            }
          },
          "name": {
            "type": "string",
            "description": "Account name",
            "maxLength": 255,
            "example": "My Company S.L."
          },
          "address": {
            "type": "string",
            "description": "Primary address",
            "maxLength": 255,
            "example": "Carrer Example 123"
          },
          "address2": {
            "type": "string",
            "description": "Secondary address",
            "maxLength": 255,
            "nullable": true,
            "example": "Floor 2, Office 3"
          },
          "city": {
            "type": "string",
            "description": "City",
            "maxLength": 255,
            "example": "Barcelona",
            "nullable": true
          },
          "postalcode": {
            "type": "string",
            "description": "Postal code",
            "maxLength": 255,
            "example": "08001"
          },
          "province": {
            "type": "string",
            "description": "Province or state",
            "maxLength": 255,
            "nullable": true,
            "example": "Barcelona"
          },
          "country": {
            "type": "string",
            "description": "Country code",
            "maxLength": 2,
            "example": "es",
            "default": "es"
          },
          "currency": {
            "type": "string",
            "description": "Default currency",
            "maxLength": 3,
            "example": "EUR",
            "default": "EUR"
          },
          "contact_person": {
            "type": "string",
            "description": "Main contact person",
            "maxLength": 255,
            "nullable": true,
            "example": "John Doe"
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "maxLength": 255,
            "nullable": true,
            "example": 34666777888
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "maxLength": 255,
            "format": "email",
            "example": "contact@company.com",
            "nullable": true
          },
          "rounding_method": {
            "type": "string",
            "enum": [
              "half_up",
              "bankers",
              "truncate"
            ],
            "description": "Roundings (only for imported invoices)\n * `half_up` - Round half up\n * `bankers` - Bank rounding\n * `truncate` - Truncate decimals\n",
            "default": "half_up",
            "example": "half_up"
          },
          "round_before_sum": {
            "type": "boolean",
            "description": "Whether to round before summing",
            "default": false
          },
          "unit_code_format": {
            "type": "string",
            "enum": [
              "internal",
              "unece_rec20"
            ],
            "description": "Code list used for invoice line unit codes when reading and writing\ninvoices through the API.\n * `internal` - B2BRouter's own integer unit code list\n * `unece_rec20` - UN/ECE Recommendation 20 codes (e.g. `HUR`, `KGM`)\n",
            "default": "internal",
            "example": "internal"
          },
          "apply_taxes_per_line": {
            "type": "boolean",
            "description": "Whether to apply taxes per line",
            "default": false
          },
          "skip_line_taxable_base_rounding": {
            "type": "boolean",
            "description": "When enabled, per-line taxable bases and tax amounts are not individually rounded — only the final accumulated tax total is rounded. Intended exclusively for accounts whose ERP uses VAT-inclusive totals, as it deviates from the standard tax calculation. Requires `apply_taxes_per_line: true` to have any effect.",
            "default": false,
            "example": false
          },
          "registered_for_empl_tax": {
            "type": "boolean",
            "description": "Whether registered for employment tax",
            "default": false
          },
          "transport_type_code": {
            "type": "string",
            "description": "Default transport type code",
            "maxLength": 255,
            "nullable": true,
            "example": "peppol"
          },
          "document_type_code": {
            "type": "string",
            "description": "Default document type code",
            "maxLength": 255,
            "nullable": true,
            "example": "xml.ubl.2.1"
          },
          "has_logo": {
            "type": "boolean",
            "description": "Whether the account has an uploaded logo",
            "readOnly": true,
            "example": true
          },
          "transactions_count": {
            "type": "integer",
            "description": "Number of transactions in current period",
            "readOnly": true,
            "example": 150
          },
          "transactions_count_previous_period": {
            "type": "integer",
            "description": "Number of transactions in previous period",
            "readOnly": true,
            "example": 120
          },
          "transactions_limit": {
            "type": "integer",
            "description": "Transaction limit for the subscription",
            "readOnly": true,
            "example": 1000
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Account creation timestamp",
            "example": "2024-07-07T11:51:57Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Account last update timestamp",
            "example": "2024-07-07T11:51:57Z"
          },
          "parent_id": {
            "type": "integer",
            "example": 12345,
            "nullable": true,
            "description": "Parent account ID. When provided on creation (`POST /accounts`), creates the account as an office (subsidiary) under the specified parent. The parent must be a top-level account within the same group and not itself an office. Returned in responses only for office accounts."
          },
          "auto_remittance": {
            "type": "boolean",
            "description": "When enabled, automatically generates a structured remittance information (OGM/VCS code) for invoices sent between two Belgian parties.",
            "default": false,
            "example": false
          }
        }
      },
      "TransactionsEdocsync": {
        "properties": {
          "transactions_count": {
            "type": "integer",
            "example": 16,
            "description": "The transactions the account has made during the current period",
            "nullable": true,
            "readOnly": true
          },
          "transactions_count_previous_period": {
            "type": "integer",
            "example": 28,
            "description": "The transactions the account has made in the past period",
            "nullable": true,
            "readOnly": true
          },
          "transactions_limit": {
            "type": "integer",
            "example": 25,
            "description": "The number of transactions available for the current product",
            "nullable": true,
            "readOnly": true
          }
        }
      },
      "IndexMeta": {
        "type": "object",
        "description": "Represents meta data for listing endpoints",
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Total count of returned objects",
            "example": 1
          },
          "offset": {
            "type": "integer",
            "description": "Offset set by the params",
            "example": 0
          },
          "limit": {
            "type": "integer",
            "description": "Limit of the returned list set by the params",
            "example": 25
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Represents an error object returned in a failed request",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A unique error code identifying the type of error. See https://developer.b2brouter.net/docs/error_codes for the full code list.",
                "example": "parameter_empty"
              },
              "message": {
                "type": "string",
                "description": "A human-readable error message providing more context about the error.",
                "example": "The parameter 'param' is missing or the value is empty"
              },
              "param": {
                "type": "string",
                "description": "The parameter in the request that caused the error (if applicable).",
                "example": "param"
              },
              "type": {
                "type": "string",
                "description": "The type of error. Currently the only possible value is \"invalid_request_error\".",
                "example": "invalid_request"
              }
            }
          }
        }
      },
      "UnauthorizedError": {
        "type": "object",
        "description": "Represents an error object returned in a failed request",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A unique error code identifying the type of error.",
                "example": "unauthorized",
                "default": "unauthorized"
              },
              "message": {
                "type": "string",
                "description": "A human-readable error message providing more context about the error.",
                "example": "Invalid API Key provided, or the API key might not have the necessary permissions for this action."
              },
              "type": {
                "type": "string",
                "description": "The type of error, often mirrors the error code for clarity.",
                "example": "invalid_request_error",
                "default": "invalid_request_error"
              }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UnauthorizedError"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
```