API reference
Accounting tools
Xero, Exact Online, Holded, Odoo and Moloni ON: what syncs (teams as cost centres or tracking, legal entities as companies, people as suppliers) and the monthly headcount-cost journals HR prepares and approves. Journals carry pay: they are listed, prepared and approved in the web app only.
6 actions · base URL https://api.bizisy.com/v1 · generated from the same definitions as the API.
Get an accounting tool’s sync#
POST/v1/accounting/overviewRead
One accounting tool (Xero, Exact Online per region, Holded, Odoo, Moloni ON) as Bizisy keeps it in step: what it can do (capabilities), whether it is connected, its companies as the last sync read them and which Bizisy legal entity each is, its accounts and books (for the journal settings), each team's dimension in the tool (tracking option, cost centre, analytic account or tag) and whether it was sent, how many people are linked as suppliers, and per company whether the monthly journal is set up. No pay. Owners, admins and HR. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules); this read of stored data keeps working while it is off.
- Who can call it
- Manage key owner admin hr
- MCP tool
accounting_overviewon HR Assistant- Method
POSTwith a JSON body, orGETwith the input as query parameters
Input
connectorstringrequiredAn accounting connector id: xero, exact_nl, exact_be, exact_de, exact_uk, exact_fr, exact_es, holded, odoo or moloni.
1–50 characters. Pattern
^[a-z][a-z0-9_]*$.
Returns
13 fields
connectorstringrequirednamestringrequiredavailablebooleanrequiredcapabilitiesobjectrequired6 fields
companies"one" | "many"requireddimension"tracking" | "cost_centre" | "analytic" | "tag"requireddimension_namedbooleanrequiredsuppliersbooleanrequiredjournal"draft" | "open" | "posted"requiredbooksbooleanrequired
status"not_connected" | "connecting" | "connected" | "error" | "removed"requiredaccountstring | nullrequiredlast_run_atstring | nullrequiredsettingsobjectrequiredrefreshed_atstring | nullrequiredWhen the last sync read the tool (null: not yet: Sync now).
companiesobject[]required8 fields
idstringrequirednamestringrequiredcurrencystring | nullrequiredlegal_entity_idstring | nullrequiredThe Bizisy legal entity it is; "all": everyone; null: not matched (nothing syncs there).
in_usebooleanrequiredaccountsobject[]required4 fields
idstringrequiredcodestringrequirednamestringrequiredkind"expense" | "liability" | "other"required
booksobject[]required2 fields
idstringrequirednamestringrequired
journal_readybooleanrequired
legal_entitiesobject[]required3 fields
idstringrequirednamestringrequiredcountrystringrequired
teamsobject[]required6 fields
companystringrequiredunit_idstringrequirednamestringrequiredarchivedbooleanrequireddimensionstring | nullrequiredsentbooleanrequired
suppliers_linkedintegerrequired
Errors
validation_failed unauthenticated forbidden not_found rate_limited internal
curl https://api.bizisy.com/v1/accounting/overview \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connector":"xero"}'const res = await fetch('https://api.bizisy.com/v1/accounting/overview', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"connector": "xero"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/overview",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}"},
json={
"connector": "xero",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"connector": "xero",
"name": "Xero",
"available": true,
"capabilities": {
"companies": "one",
"dimension": "tracking",
"dimension_named": true,
"suppliers": true,
"journal": "draft",
"books": false
},
"status": "connected",
"account": "Acme Ltd",
"last_run_at": "2026-10-04T10:00:00.000Z",
"settings": {
"companies": {
"tenant-1": "le1"
},
"teams": true,
"dimension_name": "Team",
"suppliers": false,
"journal": {
"tenant-1": {
"expense_account": "477",
"payable_account": "814",
"book": null
}
}
},
"refreshed_at": "2026-10-04T10:00:00.000Z",
"companies": [
{
"id": "tenant-1",
"name": "Acme Ltd",
"currency": "EUR",
"legal_entity_id": "le1",
"in_use": true,
"accounts": [
{
"id": "477",
"code": "477",
"name": "Salaries",
"kind": "expense"
},
{
"id": "814",
"code": "814",
"name": "Wages Payable",
"kind": "liability"
}
],
"books": [],
"journal_ready": true
}
],
"legal_entities": [
{
"id": "le1",
"name": "Acme Ltd",
"country": "IE"
}
],
"teams": [
{
"company": "tenant-1",
"unit_id": "u1",
"name": "Engineering",
"archived": false,
"dimension": "Engineering",
"sent": true
}
],
"suppliers_linked": 0
}
}List headcount-cost journals#
POST/v1/accounting/journals.listRead
The monthly headcount-cost journals of one accounting tool, newest month first (at most 36), with their status (draft, approved, posting, posted, failed, discarded), totals and where they went, and whether pay may be sent to the tool (consent: granted, not_granted, unavailable). Pay totals: owners, admins and HR, in the app only. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules); this read of stored data keeps working while it is off.
- Web app only
- Refused for API keys and connected apps. Headcount-cost journals carry pay totals: they are read in the app only.
- MCP tool
accounting_journals_liston HR Assistant- Method
POSTwith a JSON body, orGETwith the input as query parameters
Input
connectorstringrequiredAn accounting connector id: xero, exact_nl, exact_be, exact_de, exact_uk, exact_fr, exact_es, holded, odoo or moloni.
1–50 characters. Pattern
^[a-z][a-z0-9_]*$.
Returns
consentobjectrequired3 fields
state"granted" | "not_granted" | "unavailable"requiredgranted_atstring | nullrequiredmanage_pathstring | nullrequired
journalsobject[]required21 fields
idstringrequiredconnectorstringrequiredcompanystringrequiredcompany_namestring | nullrequiredmonthstringrequiredstatus"draft" | "approved" | "posting" | "posted" | "failed" | "discarded"requireddraft: prepared, not approved; approved: Bizisy sends it at the next run; posting: being sent; posted: in the tool; failed: not sent (error says why; approve again to retry); discarded.
currencystringrequiredbasisstringrequiredtotalnumberrequiredheadcountintegerrequiredexcludedintegerrequiredPeople left out because they are paid in another currency than the company’s.
expense_accountstringrequiredpayable_accountstringrequiredbookstring | nullrequiredprepared_atstringrequiredapproved_atstring | nullrequiredposted_atstring | nullrequiredexternal_idstring | nullrequiredexternal_urlstring | nullrequirederrorstring | nullrequiredlinesobject[] | nullrequiredOne debit line per team of at least 3 people (smaller teams and people without a team share one line without a team; null in lists). The credit line is the total on the payable account.
5 fields
unit_idstring | nullrequiredteamstring | nullrequireddimensionstring | nullrequiredamountnumberrequiredheadcountintegerrequired
Errors
validation_failed unauthenticated forbidden not_found rate_limited internal
curl https://api.bizisy.com/v1/accounting/journals.list \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"connector":"xero"}'const res = await fetch('https://api.bizisy.com/v1/accounting/journals.list', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"connector": "xero"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/journals.list",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}"},
json={
"connector": "xero",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"consent": {
"state": "granted",
"granted_at": "2026-10-01T09:00:00.000Z",
"manage_path": "/manage/payroll"
},
"journals": [
{
"id": "o1:xero:tenant-1:2026-09",
"connector": "xero",
"company": "tenant-1",
"company_name": "Acme Ltd",
"month": "2026-09",
"status": "draft",
"currency": "EUR",
"basis": "Base pay for September 2026, prorated for joiners and leavers.",
"total": 8200.5,
"headcount": 2,
"excluded": 0,
"expense_account": "477",
"payable_account": "814",
"book": null,
"prepared_at": "2026-10-04T10:00:00.000Z",
"approved_at": null,
"posted_at": null,
"external_id": null,
"external_url": null,
"error": null,
"lines": null
}
]
}
}Get a headcount-cost journal#
POST/v1/accounting/journals.getRead
One monthly headcount-cost journal with its lines: one debit line per team (team, its dimension in the tool, people, amount) on the expense account, balanced by one credit line of the total on the payable account. Owners, admins and HR, in the app only. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules); this read of stored data keeps working while it is off.
- Web app only
- Refused for API keys and connected apps. Headcount-cost journals carry pay totals: they are read in the app only.
- MCP tool
accounting_journals_geton HR Assistant- Method
POSTwith a JSON body, orGETwith the input as query parameters
Input
journal_idstringrequired1–300 characters.
Returns
21 fields
idstringrequiredconnectorstringrequiredcompanystringrequiredcompany_namestring | nullrequiredmonthstringrequiredstatus"draft" | "approved" | "posting" | "posted" | "failed" | "discarded"requireddraft: prepared, not approved; approved: Bizisy sends it at the next run; posting: being sent; posted: in the tool; failed: not sent (error says why; approve again to retry); discarded.
currencystringrequiredbasisstringrequiredtotalnumberrequiredheadcountintegerrequiredexcludedintegerrequiredPeople left out because they are paid in another currency than the company’s.
expense_accountstringrequiredpayable_accountstringrequiredbookstring | nullrequiredprepared_atstringrequiredapproved_atstring | nullrequiredposted_atstring | nullrequiredexternal_idstring | nullrequiredexternal_urlstring | nullrequirederrorstring | nullrequiredlinesobject[] | nullrequiredOne debit line per team of at least 3 people (smaller teams and people without a team share one line without a team; null in lists). The credit line is the total on the payable account.
5 fields
unit_idstring | nullrequiredteamstring | nullrequireddimensionstring | nullrequiredamountnumberrequiredheadcountintegerrequired
Errors
validation_failed unauthenticated forbidden not_found rate_limited internal
curl https://api.bizisy.com/v1/accounting/journals.get \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"journal_id":"o1:xero:tenant-1:2026-09"}'const res = await fetch('https://api.bizisy.com/v1/accounting/journals.get', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"journal_id": "o1:xero:tenant-1:2026-09"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/journals.get",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}"},
json={
"journal_id": "o1:xero:tenant-1:2026-09",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"id": "o1:xero:tenant-1:2026-09",
"connector": "xero",
"company": "tenant-1",
"company_name": "Acme Ltd",
"month": "2026-09",
"status": "draft",
"currency": "EUR",
"basis": "Base pay for September 2026, prorated for joiners and leavers.",
"total": 8200.5,
"headcount": 2,
"excluded": 0,
"expense_account": "477",
"payable_account": "814",
"book": null,
"prepared_at": "2026-10-04T10:00:00.000Z",
"approved_at": null,
"posted_at": null,
"external_id": null,
"external_url": null,
"error": null,
"lines": [
{
"unit_id": "u1",
"team": "Engineering",
"dimension": "Engineering",
"amount": 5000,
"headcount": 1
},
{
"unit_id": "u2",
"team": "Sales",
"dimension": "Sales",
"amount": 3200.5,
"headcount": 1
}
]
}
}Prepare a headcount-cost journal#
POST/v1/accounting/journals.prepareWrite
Prepares (or prepares again) the headcount-cost journal of one month (YYYY-MM: this month or up to 24 before) for one company of a connected accounting tool: the month's pay of the people of the legal entity that company is, totalled per team (never per person), one debit line per team on the expense account with the team's dimension, one credit line on the payable account. Nothing is sent: an owner, admin or HR approves it first (accounting_journals_approve). Needs the company matched to a legal entity, its journal accounts set in the tool's settings, and the pay consent for this tool (Payroll). Refused when that month is already approved or sent. Owners, admins and HR, in the app only. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules).
- Web app only
- Refused for API keys and connected apps. HR prepares a journal from pay in the app only (pay consent, P11).
- MCP tool
accounting_journals_prepareon HR Assistant- Preview
?dry_run=trueruns every check and saves nothing- Retries
- An Idempotency-Key prevents a second run, but the result is never stored (it holds a secret or personal data): a retry gets a 409 that points to Activity
Input
connectorstringrequiredAn accounting connector id: xero, exact_nl, exact_be, exact_de, exact_uk, exact_fr, exact_es, holded, odoo or moloni.
1–50 characters. Pattern
^[a-z][a-z0-9_]*$.companystringrequired1–100 characters.
monthstringrequiredPattern
^\d{4}-(0[1-9]|1[0-2])$.
Returns
21 fields
idstringrequiredconnectorstringrequiredcompanystringrequiredcompany_namestring | nullrequiredmonthstringrequiredstatus"draft" | "approved" | "posting" | "posted" | "failed" | "discarded"requireddraft: prepared, not approved; approved: Bizisy sends it at the next run; posting: being sent; posted: in the tool; failed: not sent (error says why; approve again to retry); discarded.
currencystringrequiredbasisstringrequiredtotalnumberrequiredheadcountintegerrequiredexcludedintegerrequiredPeople left out because they are paid in another currency than the company’s.
expense_accountstringrequiredpayable_accountstringrequiredbookstring | nullrequiredprepared_atstringrequiredapproved_atstring | nullrequiredposted_atstring | nullrequiredexternal_idstring | nullrequiredexternal_urlstring | nullrequirederrorstring | nullrequiredlinesobject[] | nullrequiredOne debit line per team of at least 3 people (smaller teams and people without a team share one line without a team; null in lists). The credit line is the total on the payable account.
5 fields
unit_idstring | nullrequiredteamstring | nullrequireddimensionstring | nullrequiredamountnumberrequiredheadcountintegerrequired
Errors
validation_failed unauthenticated forbidden not_found conflict rate_limited internal
curl https://api.bizisy.com/v1/accounting/journals.prepare \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"connector":"xero","company":"tenant-1","month":"2026-09"}'const res = await fetch('https://api.bizisy.com/v1/accounting/journals.prepare', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"connector": "xero",
"company": "tenant-1",
"month": "2026-09"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os, uuid
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/journals.prepare",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"connector": "xero",
"company": "tenant-1",
"month": "2026-09",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"id": "o1:xero:tenant-1:2026-09",
"connector": "xero",
"company": "tenant-1",
"company_name": "Acme Ltd",
"month": "2026-09",
"status": "draft",
"currency": "EUR",
"basis": "Base pay for September 2026, prorated for joiners and leavers.",
"total": 8200.5,
"headcount": 2,
"excluded": 0,
"expense_account": "477",
"payable_account": "814",
"book": null,
"prepared_at": "2026-10-04T10:00:00.000Z",
"approved_at": null,
"posted_at": null,
"external_id": null,
"external_url": null,
"error": null,
"lines": [
{
"unit_id": "u1",
"team": "Engineering",
"dimension": "Engineering",
"amount": 5000,
"headcount": 1
},
{
"unit_id": "u2",
"team": "Sales",
"dimension": "Sales",
"amount": 3200.5,
"headcount": 1
}
]
}
}Approve a headcount-cost journal#
POST/v1/accounting/journals.approveWrite
Approves a prepared (or failed) headcount-cost journal: Bizisy sends it to the tool right after (or at the next hourly run) — as a draft manual journal in Xero, a draft entry in Odoo, an open general journal entry in Exact Online (deletable there), and a booked ledger entry in Holded (no drafts there; delete it in Holded to undo). The pay consent is checked again. Owners, admins and HR, in the app only. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules).
- Web app only
- Refused for API keys and connected apps. Approving a journal needs a person signed in to Bizisy.
- MCP tool
accounting_journals_approveon HR Assistant- Preview
?dry_run=trueruns every check and saves nothing- Retries
- An Idempotency-Key replays the first result
Input
journal_idstringrequired1–300 characters.
prepared_atdate-timerequiredThe prepared_at of the version you reviewed: a journal prepared again since is refused.
ISO 8601 date and time (UTC).
Returns
21 fields
idstringrequiredconnectorstringrequiredcompanystringrequiredcompany_namestring | nullrequiredmonthstringrequiredstatus"draft" | "approved" | "posting" | "posted" | "failed" | "discarded"requireddraft: prepared, not approved; approved: Bizisy sends it at the next run; posting: being sent; posted: in the tool; failed: not sent (error says why; approve again to retry); discarded.
currencystringrequiredbasisstringrequiredtotalnumberrequiredheadcountintegerrequiredexcludedintegerrequiredPeople left out because they are paid in another currency than the company’s.
expense_accountstringrequiredpayable_accountstringrequiredbookstring | nullrequiredprepared_atstringrequiredapproved_atstring | nullrequiredposted_atstring | nullrequiredexternal_idstring | nullrequiredexternal_urlstring | nullrequirederrorstring | nullrequiredlinesobject[] | nullrequiredOne debit line per team of at least 3 people (smaller teams and people without a team share one line without a team; null in lists). The credit line is the total on the payable account.
5 fields
unit_idstring | nullrequiredteamstring | nullrequireddimensionstring | nullrequiredamountnumberrequiredheadcountintegerrequired
Errors
validation_failed unauthenticated forbidden not_found conflict rate_limited internal
curl https://api.bizisy.com/v1/accounting/journals.approve \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"journal_id": "o1:xero:tenant-1:2026-09",
"prepared_at": "2026-10-04T10:00:00.000Z"
}'const res = await fetch('https://api.bizisy.com/v1/accounting/journals.approve', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"journal_id": "o1:xero:tenant-1:2026-09",
"prepared_at": "2026-10-04T10:00:00.000Z"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os, uuid
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/journals.approve",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"journal_id": "o1:xero:tenant-1:2026-09",
"prepared_at": "2026-10-04T10:00:00.000Z",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"id": "o1:xero:tenant-1:2026-09",
"connector": "xero",
"company": "tenant-1",
"company_name": "Acme Ltd",
"month": "2026-09",
"status": "approved",
"currency": "EUR",
"basis": "Base pay for September 2026, prorated for joiners and leavers.",
"total": 8200.5,
"headcount": 2,
"excluded": 0,
"expense_account": "477",
"payable_account": "814",
"book": null,
"prepared_at": "2026-10-04T10:00:00.000Z",
"approved_at": "2026-10-04T10:05:00.000Z",
"posted_at": null,
"external_id": null,
"external_url": null,
"error": null,
"lines": [
{
"unit_id": "u1",
"team": "Engineering",
"dimension": "Engineering",
"amount": 5000,
"headcount": 1
},
{
"unit_id": "u2",
"team": "Sales",
"dimension": "Sales",
"amount": 3200.5,
"headcount": 1
}
]
}
}Discard a headcount-cost journal#
POST/v1/accounting/journals.discardDestructive
Discards a prepared, approved (not yet sent) or failed headcount-cost journal: nothing is sent. A sent journal is changed only in the tool. Owners, admins and HR, in the app only. Part of the Finance module (included): companies with it switched off get module_disabled (an owner or admin switches it on in Manage → Settings → Modules).
- Web app only
- Refused for API keys and connected apps. Discarding a journal happens in the app.
- MCP tool
accounting_journals_discardon HR Assistant- Preview
?dry_run=trueruns every check and saves nothing- Retries
- An Idempotency-Key replays the first result
Input
journal_idstringrequired1–300 characters.
Returns
21 fields
idstringrequiredconnectorstringrequiredcompanystringrequiredcompany_namestring | nullrequiredmonthstringrequiredstatus"draft" | "approved" | "posting" | "posted" | "failed" | "discarded"requireddraft: prepared, not approved; approved: Bizisy sends it at the next run; posting: being sent; posted: in the tool; failed: not sent (error says why; approve again to retry); discarded.
currencystringrequiredbasisstringrequiredtotalnumberrequiredheadcountintegerrequiredexcludedintegerrequiredPeople left out because they are paid in another currency than the company’s.
expense_accountstringrequiredpayable_accountstringrequiredbookstring | nullrequiredprepared_atstringrequiredapproved_atstring | nullrequiredposted_atstring | nullrequiredexternal_idstring | nullrequiredexternal_urlstring | nullrequirederrorstring | nullrequiredlinesobject[] | nullrequiredOne debit line per team of at least 3 people (smaller teams and people without a team share one line without a team; null in lists). The credit line is the total on the payable account.
5 fields
unit_idstring | nullrequiredteamstring | nullrequireddimensionstring | nullrequiredamountnumberrequiredheadcountintegerrequired
Errors
validation_failed unauthenticated forbidden not_found conflict rate_limited internal
curl https://api.bizisy.com/v1/accounting/journals.discard \
-H "Authorization: Bearer $BIZISY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"journal_id":"o1:xero:tenant-1:2026-09"}'const res = await fetch('https://api.bizisy.com/v1/accounting/journals.discard', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BIZISY_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
"journal_id": "o1:xero:tenant-1:2026-09"
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
console.log(body.data);import os, uuid
import requests
res = requests.post(
"https://api.bizisy.com/v1/accounting/journals.discard",
headers={"Authorization": f"Bearer {os.environ['BIZISY_API_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"journal_id": "o1:xero:tenant-1:2026-09",
},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
print(body["data"]){
"data": {
"id": "o1:xero:tenant-1:2026-09",
"connector": "xero",
"company": "tenant-1",
"company_name": "Acme Ltd",
"month": "2026-09",
"status": "discarded",
"currency": "EUR",
"basis": "Base pay for September 2026, prorated for joiners and leavers.",
"total": 8200.5,
"headcount": 2,
"excluded": 0,
"expense_account": "477",
"payable_account": "814",
"book": null,
"prepared_at": "2026-10-04T10:00:00.000Z",
"approved_at": null,
"posted_at": null,
"external_id": null,
"external_url": null,
"error": null,
"lines": [
{
"unit_id": "u1",
"team": "Engineering",
"dimension": "Engineering",
"amount": 5000,
"headcount": 1
},
{
"unit_id": "u2",
"team": "Sales",
"dimension": "Sales",
"amount": 3200.5,
"headcount": 1
}
]
}
}Something missing or wrong on this page? Write to hello@bizisy.com.