Skip to content

Developers

Billing

Sales invoices, credit notes and quotes.

GET /billing

List sales documents

Returns sales invoices, credit notes, quotes and proformas for your account. Dates filter on `issueDate` (inclusive).

Required permission: sales:invoices.read (Sales › Invoices, proformas and credit notes › Read)

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

Parameters

NameInTypeDescription
kindquerystring
Values: INVOICE, CREDIT_NOTE, QUOTE, PROFORMA, DELIVERY_NOTE
statusquerystring
Values: DRAFT, ISSUED, PAID, PARTIALLY_PAID, OVERDUE, CANCELLED, VOID
dateFromquerystring (date)Inclusive lower bound on issueDate (YYYY-MM-DD).
dateToquerystring (date)Inclusive upper bound on issueDate (YYYY-MM-DD).
pagequeryinteger
Default: 1
limitqueryinteger
Default: 50 · maximum: 500

Responses

200 List of billing documents · application/json

NameTypeDescription
documentsobject[]
documents[].idstring
documents[].numberstring
documents[].kindstring
Values: INVOICE, CREDIT_NOTE, QUOTE, PROFORMA, DELIVERY_NOTE
documents[].statusstring
Values: DRAFT, ISSUED, PAID, PARTIALLY_PAID, OVERDUE, CANCELLED, VOID
documents[].accountNamestring
nullable
documents[].accountNifstring
nullable
documents[].issuerNamestring
documents[].issueDatestring (date)
documents[].dueDatestring (date)
nullable
documents[].subtotalnumber
documents[].ivaAmountnumber
documents[].irpfAmountnumber
documents[].totalnumber
documents[].amountPaidnumber
documents[].currencystring
documents[].itemsobject[]
documents[].items[].idstring
documents[].items[].descriptionstring
documents[].items[].quantitynumber
documents[].items[].unitPricenumber
documents[].items[].discountnumber
nullable
documents[].items[].ivaRatenumber
documents[].items[].irpfRatenumber
documents[].items[].lineTotalnumber
documents[].items[].taxCodestring
nullable
SII regime code, e.g. S1
documents[].items[].accountCodestring
nullable
PGC account code, e.g. 700
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/billing?limit=50" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/billing?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/billing?limit=50",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()

POST /billing

Create a sales document

Creates an invoice, credit note, quote or proforma FOR YOUR ACCOUNT (the issuer/account is forced from the token). Amounts as numbers; the server computes totals and VeriFactu fields.

Required permission: sales:invoices.create (Sales › Invoices, proformas and credit notes › Create)

Pagination: Not paginated: returns the full set.

Request body application/json

NameTypeDescription
kindrequiredstring
Values: INVOICE, CREDIT_NOTE, QUOTE, PROFORMA
issueDatestring (date)
dueDatestring (date)
nullable
currencystring
notesstring
nullable
itemsrequiredobject[]
items[].descriptionrequiredstring
items[].quantityrequirednumber
items[].unitPricerequirednumber
items[].ivaRatenumbere.g. 21
items[].irpfRatenumber
nullable
items[].accountCodestring
nullable
PGC account, e.g. 700

Responses

201 Document created · application/json

NameTypeDescription
idstring
numberstring
kindstring
Values: INVOICE, CREDIT_NOTE, QUOTE, PROFORMA, DELIVERY_NOTE
statusstring
Values: DRAFT, ISSUED, PAID, PARTIALLY_PAID, OVERDUE, CANCELLED, VOID
accountNamestring
nullable
accountNifstring
nullable
issuerNamestring
issueDatestring (date)
dueDatestring (date)
nullable
subtotalnumber
ivaAmountnumber
irpfAmountnumber
totalnumber
amountPaidnumber
currencystring
itemsobject[]
items[].idstring
items[].descriptionstring
items[].quantitynumber
items[].unitPricenumber
items[].discountnumber
nullable
items[].ivaRatenumber
items[].irpfRatenumber
items[].lineTotalnumber
items[].taxCodestring
nullable
SII regime code, e.g. S1
items[].accountCodestring
nullable
PGC account code, e.g. 700

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/billing" \
  -H "Authorization: Bearer $BMC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kind":"INVOICE","items":[{"description":"string","quantity":1,"unitPrice":1}]}'
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/billing", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BMC_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "INVOICE",
    "items": [
      {
        "description": "string",
        "quantity": 1,
        "unitPrice": 1
      }
    ]
  }),
});
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/billing",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    json={
        "kind": "INVOICE",
        "items": [{
            "description": "string",
            "quantity": 1,
            "unitPrice": 1,
        }],
    },
    timeout=30,
)
res.raise_for_status()
data = res.json()

GET /billing/{id}

Get one sales document

Full document including line items and tax lines.

Required permission: sales:invoices.read (Sales › Invoices, proformas and credit notes › Read)

Pagination: Not paginated: returns the full set.

Parameters

NameInTypeDescription
idrequiredpathstring

Responses

200 Billing document · application/json

NameTypeDescription
idstring
numberstring
kindstring
Values: INVOICE, CREDIT_NOTE, QUOTE, PROFORMA, DELIVERY_NOTE
statusstring
Values: DRAFT, ISSUED, PAID, PARTIALLY_PAID, OVERDUE, CANCELLED, VOID
accountNamestring
nullable
accountNifstring
nullable
issuerNamestring
issueDatestring (date)
dueDatestring (date)
nullable
subtotalnumber
ivaAmountnumber
irpfAmountnumber
totalnumber
amountPaidnumber
currencystring
itemsobject[]
items[].idstring
items[].descriptionstring
items[].quantitynumber
items[].unitPricenumber
items[].discountnumber
nullable
items[].ivaRatenumber
items[].irpfRatenumber
items[].lineTotalnumber
items[].taxCodestring
nullable
SII regime code, e.g. S1
items[].accountCodestring
nullable
PGC account code, e.g. 700

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)

404 Resource not found (or belongs to a different 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/billing/<id>" \
  -H "Authorization: Bearer $BMC_TOKEN"
TypeScript (fetch)
const res = await fetch("https://app.bm.consulting/api/v1/billing/<id>", {
  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/billing/<id>",
    headers={"Authorization": f"Bearer {os.environ['BMC_TOKEN']}"},
    timeout=30,
)
res.raise_for_status()
data = res.json()
Email
Contact