Skip to content

Developers

Accounting

Double-entry books: journal, chart of accounts, financial reports, exports.

GET /books/{companyId}/journal-lines

List posted journal lines

Paginated POSTED journal lines for a date range, optionally filtered by account-code prefix. Dates default to the current quarter. Amounts are decimal strings.

Required permission: accounting:journal.read (Accounting › Journal › Read)

Pagination: Parameters page and limit. The response includes total, page, limit, hasMore.

Parameters

NameInTypeDescription
companyIdrequiredpathstringYour account id (must match the token's tenant).
fromquerystring (date)
toquerystring (date)
accountquerystringPGC account-code prefix filter, e.g. '400' or '7'.
pagequeryinteger
Default: 1
limitqueryinteger
Default: 100 · maximum: 500

Responses

200 Paginated journal lines · application/json

NameTypeDescription
dataobject[]
data[].idstring
data[].entryDatestring (date)
data[].entryNumberinteger
nullable
data[].periodstringAccounting period, e.g. 2026-Q1
data[].referencestring
nullable
data[].entryDescriptionstring
data[].accountCodestring
data[].lineDescriptionstring
nullable
data[].debitstringDecimal string, e.g. 1234.56
data[].creditstringDecimal string, e.g. 0.00
data[].currencystring
paginationobject
pagination.pageinteger
pagination.limitinteger
pagination.totalinteger
pagination.hasMoreboolean
totalintegerTotal items matching the filter.
pageintegerPage returned (starts at 1).
limitintegerPage size applied.
hasMorebooleanThere are more pages after this one.

400 Invalid date format · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/journal-lines?limit=50" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/journal-lines?limit=50", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/journal-lines?limit=50",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/accounts

Chart of accounts with period balances

Chart of accounts with computed period balances (netBalance = openingBalance + debitTotal - creditTotal). Amounts are decimal strings.

Required permission: accounting:ledger_accounts.read (Accounting › Chart of accounts › Read)

Pagination: Parameters page and limit. The response includes total, page, limit, hasMore.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)
typequerystring
Values: asset, liability, equity, income, expense
activequeryboolean
Default: true
pagequeryinteger
Default: 1
limitqueryinteger
Default: 200 · maximum: 500

Responses

200 Chart of accounts · application/json

NameTypeDescription
dataobject[]
data[].codestringPGC account code, e.g. 400
data[].namestring
data[].typestring
Values: asset, liability, equity, income, expense
data[].isActiveboolean
data[].openingBalancestring
data[].debitTotalstring
data[].creditTotalstring
data[].netBalancestringopeningBalance + debitTotal - creditTotal
paginationobject
pagination.pageinteger
pagination.limitinteger
pagination.totalinteger
pagination.hasMoreboolean
totalintegerTotal items matching the filter.
pageintegerPage returned (starts at 1).
limitintegerPage size applied.
hasMorebooleanThere are more pages after this one.

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/accounts?limit=50" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/accounts?limit=50", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/accounts?limit=50",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/opening-balances

Opening balances for a year

Seed (opening) balances per account for the requested fiscal year. Amounts are decimal strings.

Required permission: accounting:opening_balances.read (Accounting › Opening balances › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
yearqueryinteger

Responses

200 Opening balances

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/opening-balances" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/opening-balances", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/opening-balances",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

POST /books/{companyId}/opening-balances

Set opening balances for a year

Seeds per-account opening balances for a fiscal year. `replace=true` overwrites existing seeds. Amounts as decimal strings. `companyId` must match your account.

Required permission: accounting:opening_balances.create (Accounting › Opening balances › Create)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
replacequeryboolean
Default: false

Request body application/json

NameTypeDescription
yearrequiredinteger
balancesrequiredobject[]
balances[].accountCodestring
balances[].amountstringDecimal string

Responses

200 Opening balances stored

400 Validation error · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X POST "https://app.bm.consulting/api/v1/books/<companyId>/opening-balances" \
  -H "Authorization: Bearer $BMC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"year":2026,"balances":[{"accountCode":"570","amount":"string"}]}'
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/opening-balances", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "year": 2026,
    "balances": [
      {
        "accountCode": "570",
        "amount": "string"
      }
    ]
  }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.post(
    "https://app.bm.consulting/api/v1/books/<companyId>/opening-balances",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    json={
        "year": 2026,
        "balances": [{
            "accountCode": "570",
            "amount": "string",
        }],
    },
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/consolidation

Consolidated figures

Consolidated balances across the account's companies. Amounts are decimal strings.

Required permission: accounting:reports.read (Accounting › Reports (P&L, balance sheet, ledger) › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)

Responses

200 Consolidation result

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/consolidation" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/consolidation", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/consolidation",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/cost-centers/allocations

Cost-centre allocations

Allocations per cost centre with a summary. Amounts are decimal strings.

Required permission: accounting:reports.read (Accounting › Reports (P&L, balance sheet, ledger) › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)

Responses

200 Allocations + summary

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/cost-centers/allocations" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/cost-centers/allocations", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/cost-centers/allocations",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/reports/profit-loss

Profit & Loss (JSON)

Cuenta de Pérdidas y Ganancias for a period. Dates default to the current quarter. Amounts are decimal strings.

Required permission: accounting:reports.read (Accounting › Reports (P&L, balance sheet, ledger) › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)

Responses

200 P&L report · application/json

NameTypeDescription
companyIdstring
fromstring (date)
tostring (date)
rowsobject[]
rows[].accountCodestring
rows[].labelstring
rows[].amountstringDecimal string

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/reports/balance-sheet

Balance sheet (JSON)

Balance (Activo/Pasivo) for a period. Amounts are decimal strings.

Required permission: accounting:reports.read (Accounting › Reports (P&L, balance sheet, ledger) › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)

Responses

200 Balance sheet · application/json

NameTypeDescription
companyIdstring
fromstring (date)
tostring (date)
rowsobject[]
rows[].accountCodestring
rows[].labelstring
rows[].amountstringDecimal string

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/reports/balance-sheet" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/reports/balance-sheet", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/reports/balance-sheet",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/reports/trial-balance

Trial balance (JSON)

Sumas y saldos for a period. Amounts are decimal strings.

Required permission: accounting:reports.read (Accounting › Reports (P&L, balance sheet, ledger) › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
fromquerystring (date)
toquerystring (date)

Responses

200 Trial balance · application/json

NameTypeDescription
companyIdstring
fromstring (date)
tostring (date)
rowsobject[]
rows[].accountCodestring
rows[].labelstring
rows[].amountstringDecimal string

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/reports/trial-balance" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/reports/trial-balance", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/reports/trial-balance",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /books/{companyId}/reports/{report}/export

Export a report as CSV / XLSX / PDF

Streams the chosen report as a file. `report` is one of `profit-loss`, `balance-sheet`, `trial-balance`, `libro-diario`, `libro-mayor`.

Required permission: accounting:reports.export (Accounting › Reports (P&L, balance sheet, ledger) › Export)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
companyIdrequiredpathstring
reportrequiredpathstring
Values: profit-loss, balance-sheet, trial-balance, libro-diario, libro-mayor
formatrequiredquerystring
Values: csv, xlsx, pdf
fromquerystring (date)
toquerystring (date)

Responses

200 The report file · text/csv

400 Missing or invalid ?format= · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

401 Missing or invalid Bearer token. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

403 Token lacks the required permission, or the resource is outside the token's tenant. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

429 Rate limit exceeded. · application/json

NameTypeDescription
errorstringHuman-readable error message
required_permissionstringPresent on 403 - the missing permission (area:resource.action)

Examples

curl
curl -X GET "https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss/export?format=csv" \
  -H "Authorization: Bearer $BMC_TOKEN" \
  -o fichero
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss/export?format=csv", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
  },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const file = Buffer.from(await res.arrayBuffer());
Python (requests)
import os
import requests

res = requests.get(
    "https://app.bm.consulting/api/v1/books/<companyId>/reports/profit-loss/export?format=csv",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
contenido = res.content
Email
Contact