ISOERP docsAuthenticationAPI referenceMCPImport and exportVerificationGlossarySecurityChangelogFAQ

REST API reference

420 operations, generated from the product's OpenAPI description. All paths are on the product host, for example https://nrerp.khanwco.net/api/accounts. See Authentication for tokens and errors.

accounts

GET /api/accounts

The chart of accounts.

Operation list_accounts · sends X-Company-Id

POST /api/accounts

Add accounts to the chart (owner, CFO or accountant).

Operation add_accounts · sends X-Company-Id

FieldWhereRequiredNotes
accountsbody (array)yesParents before their children.

GET /api/accounts/{code}/ledger

One account's posted lines between two dates with opening balance, running balance and closing balance (base currency, debit positive); a heading account includes the accounts under it.

Operation account_ledger · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
fromqueryFirst date (default: from the beginning)
toqueryLast date (default: through the last posting)
branchquery
projectquery
cost_centrequery
pagequery
page_sizequery

apikeys

GET /api/api-keys

Your API keys (owners and CFOs also see the company's keys).

Operation list_api_keys · sends X-Company-Id

POST /api/api-keys

Make an API key.

Operation create_api_key · sends X-Company-Id

FieldWhereRequiredNotes
namebody (string)yes
kindbody (string)
scopesbody (array)yesread, write, read:<area>, write:<area>, mcp
expires_in_daysbody (integer)
rate_per_minutebody (integer)

GET /api/api-keys/scopes

The scopes a key can have and the areas that read:/write: can name.

Operation api_key_scopes · sends X-Company-Id

POST /api/api-keys/{key_id}/revoke

Revoke a key now (yours, or as owner / CFO any company key).

Operation revoke_api_key · sends X-Company-Id

FieldWhereRequiredNotes
key_idpathyes

POST /api/api-keys/{key_id}/rotate

A new secret for your key (same name, scopes and limit); the old secret stops working now.

Operation rotate_api_key · sends X-Company-Id

FieldWhereRequiredNotes
key_idpathyes

audit

GET /api/audit/verify-chain

Recompute the tamper-evident hash chain of every posted entry; reports the first entry that was altered.

Operation verify_chain · sends X-Company-Id

auth

POST /api/auth/accept-invite

Set your password from the one-time invite link an owner/CFO gave you, and sign in.

Operation accept_invite

FieldWhereRequiredNotes
tokenbody (string)yes
passwordbody (string)yes

POST /api/auth/continue

The one form: email + password.

Operation continue_

FieldWhereRequiredNotes
emailbody (string)yes
passwordbody (string)yesA new account needs at least 10 characters.
full_namebody (string/null)
base_currencybody (string)
countrybody (string)

POST /api/auth/forgot

Forgot password: emails a one-time link (15 minutes, works once; a newer link ends older ones).

Operation forgot_password

FieldWhereRequiredNotes
emailbody (string)yes

POST /api/auth/google

Continue with Google: send the ID token (credential) from Google's button.

Operation google

FieldWhereRequiredNotes
credentialbody (string)yesThe ID token from Google's sign-in button

Sign in by email instead of a password: emails a one-time sign-in link (15 minutes, works once).

Operation magic_link

FieldWhereRequiredNotes
emailbody (string)yes

POST /api/auth/magic-signin

Sign in with the token from an emailed sign-in link.

Operation magic_signin

FieldWhereRequiredNotes
tokenbody (string)yes

GET /api/auth/me

Who am I, and which companies (with my role in each) can I work in.

Operation me

GET /api/auth/options

Which sign-in options are on (no sign-in needed): the public Google client id, or null when Google is off.

Operation auth_options

POST /api/auth/otp/request

Email me a code: ONE email with a 6-digit code (10 minutes, once, 5 tries) and a sign-in link.

Operation otp_request

FieldWhereRequiredNotes
emailbody (string)yes

POST /api/auth/otp/verify

Sign in with the email + the 6-digit code.

Operation otp_verify

FieldWhereRequiredNotes
emailbody (string)yes
codebody (string)yesThe 6 digits from the sign-in email

POST /api/auth/password

Change your password (needs the current one).

Operation change_password

FieldWhereRequiredNotes
current_passwordbody (string)yes
new_passwordbody (string)yes

POST /api/auth/refresh

Spend the refresh token for a new pair.

Operation refresh

FieldWhereRequiredNotes
refresh_tokenbody (string)yes

POST /api/auth/reset

Choose a new password with the token from the emailed link.

Operation reset_password

FieldWhereRequiredNotes
tokenbody (string)yes
new_passwordbody (string)yes

POST /api/auth/signin

Email + password → a 15-minute access token and a rotating refresh token.

Operation signin

FieldWhereRequiredNotes
emailbody (string)yes
passwordbody (string)yes

POST /api/auth/signout

End this sign-in; with all_devices, every sign-in and every access token of this user.

Operation signout

FieldWhereRequiredNotes
refresh_tokenbody (string)yes
all_devicesbody (boolean)

POST /api/auth/signup

Create a new company and its owner account, and sign in.

Operation signup

FieldWhereRequiredNotes
company_namebody (string)yes
full_namebody (string)yes
emailbody (string)yes
passwordbody (string)yesAt least 10 characters.
base_currencybody (string)
countrybody (string)

backup

GET /api/backup

List Backups

Operation list_backups · sends X-Company-Id

POST /api/backup

Start a complete backup of this company (books, parties, stock, documents, files, settings, people without passwords).

Operation make_backup · sends X-Company-Id

GET /api/backup/download/{job_id}

The archive, streamed.

Operation download_backup

FieldWhereRequiredNotes
job_idpathyes
cqueryyes
equeryyes
squeryyes

GET /api/backup/history

Backup History

Operation backup_history · sends X-Company-Id

POST /api/backup/preview

Upload a backup (.zip, as the request body) and see what it holds and what would change in this company.

Operation preview_backup · sends X-Company-Id

GET /api/backup/schedule

Get Backup Schedule

Operation get_backup_schedule · sends X-Company-Id

PUT /api/backup/schedule

Set Backup Schedule

Operation set_backup_schedule · sends X-Company-Id

FieldWhereRequiredNotes
frequencybody (string)yes
keep_copiesbody (integer)

GET /api/backup/{job_id}

Get Backup

Operation get_backup · sends X-Company-Id

FieldWhereRequiredNotes
job_idpathyes

E-mail the download link to the signed-in admin's OWN address (never anyone else).

Operation email_backup_link · sends X-Company-Id

FieldWhereRequiredNotes
job_idpathyes

Backup Link

Operation backup_link · sends X-Company-Id

FieldWhereRequiredNotes
job_idpathyes

POST /api/backup/{job_id}/resume

Resume Backup

Operation resume_backup · sends X-Company-Id

FieldWhereRequiredNotes
job_idpathyes

bank

GET /api/bank-accounts

Every bank and cash account with its book balance (bank currency and base) as of a date (default today).

Operation list_bank_accounts · sends X-Company-Id

FieldWhereRequiredNotes
as_ofquery

POST /api/bank-accounts

Link a postable asset account of the chart as a bank or cash account in one currency (owner, CFO or accountant).

Operation add_bank_account · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yes
namebody (string)yes
accountbody (string)yesA postable asset account of the chart (not a control account)
currencybody (string/null)Default: the base currency
bank_namebody (string)Chosen from /api/lookups/banks (or added there as 'other')
bank_countrybody (string/null)
swiftbody (string)
account_numberbody (string)
reconcile_frombody (string/null)Reconciliation starts on this date
statement_opening_balancebody (number/string)The bank's balance on reconcile_from

GET /api/bank-accounts/{code}

One bank or cash account with its book balance as of a date (default today).

Operation get_bank_account · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
as_ofquery

POST /api/bank-accounts/{code}/auto-match

Match unmatched statement lines to posted ledger lines automatically — only clear, unique matches at or above min_confidence; the rest come back as suggestions for a person.

Operation auto_match · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
min_confidencebody (number)
date_windowbody (integer)Days between the statement and the ledger line that still count

GET /api/bank-accounts/{code}/lines

Statement lines of a bank account (oldest first); filter matched / unmatched and by date.

Operation list_statement_lines · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
statusquery
startquery
endquery

POST /api/bank-accounts/{code}/statements

Import a bank statement file (CSV, OFX or MT940 text) into this bank account.

Operation import_statement · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
contentbody (string)yesThe statement file's text
formatbody (string)
filenamebody (string)
columnsbody (object/null)CSV only: the file's column names when they are not the usual ones
date_formatbody (string/null)CSV only, e.g.

GET /api/bank-lines/{line_id}

One statement line: date, amount (+ in / − out), text, whether it is matched and any draft made from it.

Operation get_statement_line · sends X-Company-Id

FieldWhereRequiredNotes
line_idpathyes

POST /api/bank-lines/{line_id}/draft

Explain an unmatched statement line with a DRAFT: a journal entry (counter account, e.g.

Operation create_from_line · sends X-Company-Id

FieldWhereRequiredNotes
line_idpathyes
branchbody (string/null)Branch / project / cost-centre code (optional)
projectbody (string/null)Branch / project / cost-centre code (optional)
cost_centrebody (string/null)Branch / project / cost-centre code (optional)
kindbody (string)
accountbody (string/null)journal: the counter account code (bank charges, interest …)
partybody (string/null)customer_receipt / vendor_payment: the customer or vendor code
allocationsbody (array)Receipts/payments: invoices or bills it settles
fx_ratebody (number/string/null)
memobody (string/null)

POST /api/bank-lines/{line_id}/match

Tie a statement line to one or more posted ledger lines of the same bank account that add up to it exactly.

Operation manual_match · sends X-Company-Id

FieldWhereRequiredNotes
line_idpathyes
journal_line_idsbody (array)yesPosted ledger lines that add up to the statement line exactly

GET /api/bank-lines/{line_id}/suggestions

Unmatched ledger lines that could be this statement line, best first, with their confidence (0..1).

Operation suggest_matches · sends X-Company-Id

FieldWhereRequiredNotes
line_idpathyes
date_windowquery

POST /api/bank-lines/{line_id}/unmatch

Undo the match of a statement line (recorded: who and when; the match stays in history).

Operation unmatch · sends X-Company-Id

FieldWhereRequiredNotes
line_idpathyes

POST /api/bank-transfers

Money from one bank/cash account to another as DRAFT entries (same currency: one; between currencies: two through a transit account, the exchange difference on the base side).

Operation bank_transfer · sends X-Company-Id

FieldWhereRequiredNotes
from_bankbody (string)yes
to_bankbody (string)yes
transfer_datebody (string)yes
amountbody (number/string)yesAmount sent (from-bank currency)
to_amountbody (number/string/null)Amount received (other currency)
from_ratebody (number/string/null)
to_ratebody (number/string/null)
transit_accountbody (string/null)Between currencies: the money-in-transit account
memobody (string)

companies

GET /api/companies

The companies you belong to: your role, personal or commercial, the plan and whether it is active or expired (read-only).

Operation list_my_companies

POST /api/companies

Create another company with you as its owner (default approval matrix included).

Operation create_company

FieldWhereRequiredNotes
namebody (string)yes
base_currencybody (string)
countrybody (string)
kindbody (string)personal: free for life, just you, one per person

GET /api/subscription

This company's kind, plan, status (active / expired = read-only), trial end, features and how much of each is used.

Operation get_subscription · sends X-Company-Id

company e-mail

DELETE /api/mail-setup

Forget the company address and its password.

Operation remove_mail · sends X-Company-Id

GET /api/mail-setup

The company's own e-mail address and server, if connected.

Operation get_mail_setup · sends X-Company-Id

POST /api/mail-setup/connect

Log in to the company's mail server with this password; when it works the password is saved encrypted.

Operation connect_mail · sends X-Company-Id

FieldWhereRequiredNotes
emailbody (string)yes
passwordbody (string)yes
display_namebody (string)
manualbody (object/null)

POST /api/mail-setup/find

Find the mail server for an address, the way mail apps do (known providers, autoconfig, Autodiscover, DNS, MX, trials).

Operation find_mail_settings · sends X-Company-Id

FieldWhereRequiredNotes
emailbody (string)yes

GET /api/mail-setup/history

Mail History

Operation mail_history · sends X-Company-Id

GET /api/mail-setup/oauth/{provider}

Hook for 'Sign in with Google / Microsoft' (OAuth2 XOAUTH2 for SMTP).

Operation mail_oauth_start · sends X-Company-Id

FieldWhereRequiredNotes
providerpathyes

POST /api/mail-setup/test

Send ONE test message from the company address to YOUR OWN address.

Operation test_mail · sends X-Company-Id

FieldWhereRequiredNotes
tobody (string)yes

crm

GET /api/crm/activities

Calls, meetings, e-mails, visits and WhatsApp notes logged by hand, newest first (filter by contact, customer, deal, lead or mine).

Operation list_crm_activities · sends X-Company-Id

FieldWhereRequiredNotes
contact_idquery
party_idquery
deal_idquery
lead_idquery
minequery

POST /api/crm/activities

Log a call / meeting / e-mail / visit / WhatsApp note with a contact, customer, deal or lead; optionally set the follow-up task.

Operation log_crm_activity · sends X-Company-Id

FieldWhereRequiredNotes
kindbody (string)yes
subjectbody (string)yes
detailsbody (string)
happened_atbody (string/null)When it happened (default: now)
contact_idbody (string/null)
party_idbody (string/null)
deal_idbody (string/null)
lead_idbody (string/null)
follow_upbody (object/null)The next step: becomes a task (To-Do) for its person

GET /api/crm/contacts

Contacts (people at customers / vendors) you may see; search by name, job, phone, e-mail or company.

Operation list_contacts · sends X-Company-Id

FieldWhereRequiredNotes
qquery
party_idquery
include_closedquery

POST /api/crm/contacts

Add a person at one or more customers / vendors.

Operation create_contact · sends X-Company-Id

FieldWhereRequiredNotes
full_namebody (string)yes
job_rolebody (string)Their job at the customer / vendor, e.g.
phonesbody (array)
emailsbody (array)
languagebody (string)Language they prefer, e.g.
whatsapp_opt_inbody (boolean)They agreed to receive WhatsApp messages
party_idsbody (array)Customers / vendors this person works for

GET /api/crm/contacts/{contact_id}

One contact: their customers / vendors, notes timeline, activities and open tasks.

Operation get_contact · sends X-Company-Id

FieldWhereRequiredNotes
contact_idpathyes

PUT /api/crm/contacts/{contact_id}

Change a contact's details, or close it (active=false).

Operation update_contact · sends X-Company-Id

FieldWhereRequiredNotes
contact_idpathyes
full_namebody (string)yes
job_rolebody (string)Their job at the customer / vendor, e.g.
phonesbody (array)
emailsbody (array)
languagebody (string)Language they prefer, e.g.
whatsapp_opt_inbody (boolean)They agreed to receive WhatsApp messages
activebody (boolean)false closes the contact (kept, hidden from lists)

Link a contact to another customer / vendor (or unlink=true).

Operation link_contact_party · sends X-Company-Id

FieldWhereRequiredNotes
contact_idpathyes
party_idbody (string)yes
unlinkbody (boolean)

GET /api/crm/deals

Deals in the pipeline (default: open ones), in stage order.

Operation list_deals · sends X-Company-Id

FieldWhereRequiredNotes
statusquery
owner_idquery
party_idquery

POST /api/crm/deals

Open a deal with a customer or a lead, with its expected value in the company's currency.

Operation create_deal · sends X-Company-Id

FieldWhereRequiredNotes
titlebody (string)yes
party_idbody (string/null)The customer (or give lead_id)
lead_idbody (string/null)
contact_idbody (string/null)
stage_idbody (string/null)Default: the first open stage
valuebody (string)Expected value in the company's base currency
expected_closebody (string/null)
sourcebody (string)
owner_idbody (string/null)

GET /api/crm/deals/{deal_id}

One deal: its stage history, notes, activities, tasks and the quote prepared from it.

Operation get_deal · sends X-Company-Id

FieldWhereRequiredNotes
deal_idpathyes

PUT /api/crm/deals/{deal_id}

Change an open deal's title, value, expected close date, owner, contact or source.

Operation update_deal · sends X-Company-Id

FieldWhereRequiredNotes
deal_idpathyes
titlebody (string)yes
valuebody (string)
expected_closebody (string/null)
owner_idbody (string/null)
contact_idbody (string/null)
sourcebody (string)

POST /api/crm/deals/{deal_id}/move

Move a deal to another stage.

Operation move_deal · sends X-Company-Id

FieldWhereRequiredNotes
deal_idpathyes
stage_idbody (string)yes
lost_reasonbody (string)Needed when moving to the lost stage

POST /api/crm/deals/{deal_id}/quote

Prepare a sales quote DRAFT for the deal's customer.

Operation prepare_deal_quote · sends X-Company-Id

FieldWhereRequiredNotes
deal_idpathyes
linesbody (array)yes
doc_datebody (string/null)

GET /api/crm/forecast

Pipeline forecast: open value per stage, weighted by each stage's chance, won / lost totals and the lost reasons.

Operation pipeline_forecast · sends X-Company-Id

GET /api/crm/leads

Leads (possible customers not yet in the books), newest first.

Operation list_leads · sends X-Company-Id

FieldWhereRequiredNotes
statusquery

POST /api/crm/leads

Add a lead.

Operation create_lead · sends X-Company-Id

FieldWhereRequiredNotes
namebody (string)yesThe person
organisationbody (string)
phonebody (string)
emailbody (string)
sourcebody (string)Where the lead came from, e.g.
owner_idbody (string/null)Member who owns the lead (default: you)

GET /api/crm/leads/{lead_id}

One lead with its notes, activities, tasks and deals.

Operation get_lead · sends X-Company-Id

FieldWhereRequiredNotes
lead_idpathyes

POST /api/crm/leads/{lead_id}/convert

Make the lead a customer (an explicit step): a new customer and a contact at it; its open deals move to the customer.

Operation convert_lead · sends X-Company-Id

FieldWhereRequiredNotes
lead_idpathyes
codebody (string)yesThe new customer's code
namebody (string/null)Customer name (default: the organisation, else the person)
terms_daysbody (integer)

POST /api/crm/leads/{lead_id}/status

Mark a lead qualified, or dropped with a reason.

Operation set_lead_status · sends X-Company-Id

FieldWhereRequiredNotes
lead_idpathyes
statusbody (string)yes
reasonbody (string)Why it was dropped (needed for dropped)

POST /api/crm/notes/{ref_type}/{ref_id}

Add a note to a contact, lead or deal timeline (kept as written, with who and when).

Operation add_crm_note · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes
textbody (string)yes

GET /api/crm/parties

Customers / vendors you may see, with how many contacts and open deals each has.

Operation list_crm_parties · sends X-Company-Id

FieldWhereRequiredNotes
qquery

GET /api/crm/parties/{party_id}/overview

Customer / vendor 360: contacts, deals, open tasks, recent activities, documents and the balance (overdue part too).

Operation customer_overview · sends X-Company-Id

FieldWhereRequiredNotes
party_idpathyes
as_ofquery

GET /api/crm/stages

The company's pipeline stages in board order (the first look creates the starting set, which admins can rename).

Operation list_pipeline_stages · sends X-Company-Id

PUT /api/crm/stages

Rename, reorder, add or close pipeline stages (owner / CFO).

Operation set_pipeline_stages · sends X-Company-Id

FieldWhereRequiredNotes
stagesbody (array)yesAll stages, in board order

customisation

PUT /api/company/nav-tags

The company's own search words for menu items (owner / CFO); everyone in the company finds menus by them.

Operation set_company_menu_tags · sends X-Company-Id

FieldWhereRequiredNotes
nav_tagsbody (object)yes{menu item id: [words]} for the whole company

GET /api/labels

This company's renamed labels for a language: {key: label} — only the overrides.

Operation get_labels · sends X-Company-Id

FieldWhereRequiredNotes
langquery
mergedquery

PUT /api/labels

Rename labels for this company and language (owner, CFO or a member allowed to customise).

Operation set_labels · sends X-Company-Id

FieldWhereRequiredNotes
langquery
labelsbody (object)yes{"menu.crm": "Customer Relations"} — null (or "") puts a label back to its default

GET /api/labels/history

Who renamed which label, when, from what to what (newest first).

Operation label_history · sends X-Company-Id

FieldWhereRequiredNotes
langquery
keyquery
limitquery

GET /api/user/ui-preferences

My menu order, colours, open groups, my names and words for menu items, plus the company's words.

Operation get_my_ui_preferences · sends X-Company-Id

PUT /api/user/ui-preferences

Save my whole menu layout (null = back to standard).

Operation save_my_menu_layout · sends X-Company-Id

FieldWhereRequiredNotes
menu_layoutbody (object/null){order[], colors{group:{swatch,text,highlight}}, open{}, labels{key:text}, tags{id:[words]}}; null = standard

POST /api/user/ui-preferences/collapse-all

Close every group of my menu.

Operation collapse_all_menus · sends X-Company-Id

POST /api/user/ui-preferences/colour

Give a group of MY menu a colour: a swatch, a text colour and / or a highlight background (must stay readable: 4.5:1).

Operation set_menu_colour · sends X-Company-Id

FieldWhereRequiredNotes
groupbody (string)yes
swatchbody (string/null)
textbody (string/null)
highlightbody (string/null)

POST /api/user/ui-preferences/expand-all

Open every group of my menu.

Operation expand_all_menus · sends X-Company-Id

POST /api/user/ui-preferences/move

Move one menu group of MY menu to a position (0 = top).

Operation move_menu_group · sends X-Company-Id

FieldWhereRequiredNotes
groupbody (string)yes
positionbody (integer)yes0 = top
current_orderbody (array)yesThe group ids of the menu as the person sees it now

POST /api/user/ui-preferences/rename

Rename a menu item, form or field for me, or for the whole company (owner / CFO).

Operation rename_menu_item · sends X-Company-Id

FieldWhereRequiredNotes
idbody (string)yesThe label key of the menu item, form or field (e.g.
textbody (string)Empty = back to the standard name
scopebody (string)
langbody (string)

POST /api/user/ui-preferences/reset

Reset to standard: put MY menu (and / or my names and words) back to the company standard.

Operation reset_my_preferences · sends X-Company-Id

FieldWhereRequiredNotes
scopebody (string)

POST /api/user/ui-preferences/tags

Add a word people search with for a menu item (any language), for me or for the whole company (owner / CFO).

Operation add_menu_tag · sends X-Company-Id

FieldWhereRequiredNotes
idbody (string)yes
tagbody (string)yesA word people search with, any language (e.g.
scopebody (string)

POST /api/user/ui-preferences/tags/remove

Remove a search word from a menu item (mine, or the company's: owner / CFO).

Operation remove_menu_tag · sends X-Company-Id

FieldWhereRequiredNotes
idbody (string)yes
tagbody (string)yesA word people search with, any language (e.g.
scopebody (string)

dashboards

GET /api/dashboards

Your dashboards (default first) and the ones shared with your role.

Operation list_dashboards · sends X-Company-Id

GET /api/dashboards/data/{source}

One widget's data: a KPI value, a series of points or a table, with the comparison (previous period / previous year) and a drill-down link.

Operation dashboard_source_data · sends X-Company-Id

FieldWhereRequiredNotes
sourcepathyes
periodquery
startquery
endquery
comparequery
limitquery
accountsqueryComma-separated account codes (cash_balance)
report_idqueryA saved report (saved_report, saved_report_value, saved_report_series)
columnquerysaved_report_value: the report column to show as one figure
labelquerysaved_report_series: the column for the labels
valuequerysaved_report_series: the column for the values

GET /api/dashboards/sources

The data sources your role may put on a dashboard (revenue by month, expenses by account, AR/AP aging, cash, top customers, approvals waiting, drafts, net profit, books balanced…).

Operation dashboard_sources · sends X-Company-Id

DELETE /api/dashboards/{dashboard_id}

Delete one of your dashboards.

Operation delete_dashboard · sends X-Company-Id

FieldWhereRequiredNotes
dashboard_idpathyes

GET /api/dashboards/{dashboard_id}

One dashboard you own or that is shared with your role.

Operation get_dashboard · sends X-Company-Id

FieldWhereRequiredNotes
dashboard_idpathyes

PUT /api/dashboards/{dashboard_id}

Create (a new id; 201) or replace (your own; 200) a dashboard: name, widgets (drag/resize/rename/minimise state included), default flag, roles it is shared with.

Operation save_dashboard · sends X-Company-Id

FieldWhereRequiredNotes
dashboard_idpathyes
namebody (string)yes
widgetsbody (array)
shared_rolesbody (array)Roles that may open (not change) it — owner/CFO only
is_defaultbody (boolean)

GET /api/dashboards/{dashboard_id}/data

Every widget's data in one call.

Operation dashboard_data · sends X-Company-Id

FieldWhereRequiredNotes
dashboard_idpathyes
startquery
endquery

documents

GET /api/documents

Sales (side=customer) or purchase (side=vendor) documents, newest first; filter by type, status and party code.

Operation list_documents · sends X-Company-Id

FieldWhereRequiredNotes
sidequery
doc_typequery
statusquery
partyquery

POST /api/documents

Prepare a DRAFT document: a sales invoice or purchase bill (lines), a customer receipt or vendor payment (amount + bank account + which invoices / bills it settles), a quote, order, delivery or goods-received note.

Operation create_document · sends X-Company-Id

FieldWhereRequiredNotes
branchbody (string/null)Branch / project / cost-centre code (optional)
projectbody (string/null)Branch / project / cost-centre code (optional)
cost_centrebody (string/null)Branch / project / cost-centre code (optional)
partybody (string)yesCustomer or vendor code
doc_datebody (string)yes
due_datebody (string/null)
currencybody (string/null)
fx_ratebody (number/string/null)
linesbody (array)Invoices, bills, notes, quotes, orders, notes
amountbody (number/string/null)Receipts and payments: the amount
bank_accountbody (string/null)Receipts and payments: the cash / bank account code
allocationsbody (array)Receipts / payments: which invoices / bills it settles
memobody (string)
referencebody (string)Customer PO number, vendor bill number, cheque number …
warehousebody (string/null)
source_idbody (string/null)The document this one is made from
instrument_typebody (string)Receipts / payments: how the money moved
instrument_refbody (string)Cheque number, transfer / UTR reference
instrument_datebody (string/null)Cheque date
clearing_datebody (string/null)Date the bank cleared it
deductionsbody (array)Receipts / payments: tax withheld, bank charges (change the bank amount, not the customer / vendor amount)
vendor_invoice_nobody (string)Purchase bills: the vendor's own invoice number (booked once per vendor)
vendor_invoice_datebody (string/null)Purchase bills: the vendor's invoice date
doc_typebody (string)yes

GET /api/documents-setup

Is the company ready for invoices and bills (control accounts, posting rules, numbering)?

Operation get_documents_setup · sends X-Company-Id

POST /api/documents-setup

Make the company ready for sales and purchase documents (owner or CFO): customer and vendor control accounts, default income / expense / tax accounts; seeds posting rules, approval rules, numbering and tax codes.

Operation setup_documents · sends X-Company-Id

FieldWhereRequiredNotes
receivablebody (string)yesCustomer control account code (a fresh asset account)
payablebody (string)yesVendor control account code (a fresh liability account)
incomebody (string)yesDefault sales income account
expensebody (string)yesDefault purchase / expense account
output_taxbody (string)yesSales tax payable account
input_taxbody (string)yesInput tax (recoverable) account

GET /api/documents-setup/cash-accounts

The company's registered bank and cash accounts, for receipts and payments (a strict choice, not free text).

Operation list_cash_accounts · sends X-Company-Id

POST /api/documents-setup/control-accounts

Make one more account a receivable / payable control account (owner or CFO), e.g.

Operation mark_control_account · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yes
kindbody (string)yes

GET /api/documents/{doc_id}

One document with lines, allocations, deductions, what is paid / still open, the tax ids the active tax pack asks for, and whether you may approve it (you_made_it, you_can_self_approve).

Operation get_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes

PUT /api/documents/{doc_id}

Replace a DRAFT's content (only drafts change; send a submitted one back first).

Operation update_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
branchbody (string/null)Branch / project / cost-centre code (optional)
projectbody (string/null)Branch / project / cost-centre code (optional)
cost_centrebody (string/null)Branch / project / cost-centre code (optional)
partybody (string)yesCustomer or vendor code
doc_datebody (string)yes
due_datebody (string/null)
currencybody (string/null)
fx_ratebody (number/string/null)
linesbody (array)Invoices, bills, notes, quotes, orders, notes
amountbody (number/string/null)Receipts and payments: the amount
bank_accountbody (string/null)Receipts and payments: the cash / bank account code
allocationsbody (array)Receipts / payments: which invoices / bills it settles
memobody (string)
referencebody (string)Customer PO number, vendor bill number, cheque number …
warehousebody (string/null)
source_idbody (string/null)The document this one is made from
instrument_typebody (string)Receipts / payments: how the money moved
instrument_refbody (string)Cheque number, transfer / UTR reference
instrument_datebody (string/null)Cheque date
clearing_datebody (string/null)Date the bank cleared it
deductionsbody (array)Receipts / payments: tax withheld, bank charges (change the bank amount, not the customer / vendor amount)
vendor_invoice_nobody (string)Purchase bills: the vendor's own invoice number (booked once per vendor)
vendor_invoice_datebody (string/null)Purchase bills: the vendor's invoice date

POST /api/documents/{doc_id}/approve

Approve a submitted document (never your own; your role's limit must cover the amount).

Operation approve_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
notebody (string)
self_reviewbody (string/null)Only when YOU made it and you are the only person who may approve it: your written review, e.g.

POST /api/documents/{doc_id}/cancel

Cancel a document that is not posted (a posted one is corrected by a credit / debit note).

Operation cancel_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
reasonbody (string)yes

POST /api/documents/{doc_id}/copy

Make the next document from this one as a DRAFT (quote → order → invoice, PO → goods received → bill).

Operation copy_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
doc_typebody (string)yesThe next document: order from quote, invoice from order, bill from PO …
doc_datebody (string)yes

POST /api/documents/{doc_id}/credit-note

DRAFT credit note for a posted sales invoice (whole invoice, or the lines given); it settles the invoice when posted.

Operation create_credit_note · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
doc_datebody (string)yes
reasonbody (string)yes
linesbody (array/null)Leave out for the whole invoice / bill

POST /api/documents/{doc_id}/debit-note

DRAFT debit note for a posted purchase bill (returns, price corrections).

Operation create_debit_note · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
doc_datebody (string)yes
reasonbody (string)yes
linesbody (array/null)Leave out for the whole invoice / bill

POST /api/documents/{doc_id}/post

Post an APPROVED document to the books (owner, CFO or accountant): builds its journal entry, numbers it, settles what it allocates.

Operation post_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes

The document as a printable page (HTML) or PDF: letterhead, DRAFT mark until posted, tax ids with the active tax pack's labels, lines and totals (receipts and payments: instrument, deductions, net to bank).

Operation print_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
formatquery

POST /api/documents/{doc_id}/reject

Send a submitted or approved document back to its maker as a draft, with the reason.

Operation reject_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
reasonbody (string)yes

POST /api/documents/{doc_id}/submit

Send a draft for approval: the people who may approve it get a To-Do (and an e-mail when the company has it on).

Operation submit_document · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes

GET /api/items

Items and services with prices and default tax code.

Operation list_items · sends X-Company-Id

POST /api/items

Add an item or service (owner, CFO, accountant, clerk, sales or purchase).

Operation add_item · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesNever changes
namebody (string)yes
unitbody (string)
sale_pricebody (number/string)
purchase_pricebody (number/string)
tax_codebody (string/null)Default tax code
incomebody (string/null)Own income account (else the default)
expensebody (string/null)Own expense account (else the default)

GET /api/parties

Customers (side=customer), vendors (side=vendor) or both.

Operation list_parties · sends X-Company-Id

FieldWhereRequiredNotes
sidequery

POST /api/parties

Add a customer, a vendor or both (owner, CFO, accountant, clerk, sales or purchase).

Operation add_party · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesNever changes
namebody (string)yes
customerbody (boolean)
vendorbody (boolean)
terms_daysbody (integer)Payment terms in days (sets due dates)
currencybody (string/null)
tax_numberbody (string)
emailbody (string)
phonebody (string)

GET /api/tax-codes

The company's tax codes and rates.

Operation list_tax_codes · sends X-Company-Id

foreign-exchange

GET /api/fx/rates

The rate table (base-currency units per 1 foreign unit), by currency and date.

Operation list_rates · sends X-Company-Id

FieldWhereRequiredNotes
currencyqueryCurrency code, e.g.
startquery
endquery

PUT /api/fx/rates

Record or correct the rate of a currency on a date (owner, CFO or accountant).

Operation set_rate · sends X-Company-Id

FieldWhereRequiredNotes
currencybody (string)yes
rate_datebody (string)yes
ratebody (number/string)yesBase-currency units per 1 unit of the currency
notebody (string)Why (required when you change a rate that was fetched automatically)

POST /api/fx/rates/fetch

The company's rate for a currency on a date: kept if already there, else looked up automatically from public sources (only the currency code and date go out) and stored with its source and time; 'unavailable' rather than an invented rate.

Operation fetch_rate · sends X-Company-Id

FieldWhereRequiredNotes
currencybody (string)yes
rate_datebody (string)yes

GET /api/fx/rates/{currency}/on

The rate in force on a day (the latest on or before it); refused when there is none.

Operation rate_on · sends X-Company-Id

FieldWhereRequiredNotes
currencypathyes
datequeryyes

GET /api/fx/revaluations

Revaluations, newest first; filter by status.

Operation list_revaluations · sends X-Company-Id

FieldWhereRequiredNotes
statusquery

POST /api/fx/revaluations

Prepare the period-end revaluation as DRAFTS (one per foreign currency with something to adjust).

Operation prepare_revaluation · sends X-Company-Id

FieldWhereRequiredNotes
as_ofbody (string)yes
currencybody (string/null)Default: every foreign currency

GET /api/fx/revaluations/preview

What a revaluation on the date would do — nothing is written: per currency the closing rate, every open item and bank balance with its adjustment, and the net unrealised gain (+) / loss (−).

Operation preview_revaluation · sends X-Company-Id

FieldWhereRequiredNotes
as_ofqueryyes
currencyqueryCurrency code, e.g.

GET /api/fx/revaluations/{revaluation_id}

One revaluation with every line it revalued, its entry and (once posted) its reversal.

Operation get_revaluation · sends X-Company-Id

FieldWhereRequiredNotes
revaluation_idpathyes

POST /api/fx/revaluations/{revaluation_id}/cancel

Drop a revaluation that is not posted (it stays as cancelled; its draft entry can never post).

Operation cancel_revaluation · sends X-Company-Id

FieldWhereRequiredNotes
revaluation_idpathyes

POST /api/fx/revaluations/{revaluation_id}/post

Post an APPROVED revaluation (owner, CFO or accountant) together with its reversal dated the next day.

Operation post_revaluation · sends X-Company-Id

FieldWhereRequiredNotes
revaluation_idpathyes

GET /api/fx/settings

The exchange gain/loss accounts (realised and unrealised); null when foreign exchange is not set up.

Operation get_fx_settings · sends X-Company-Id

PUT /api/fx/settings

Choose the exchange gain/loss accounts (owner or CFO; postable income/expense accounts).

Operation setup_fx · sends X-Company-Id

FieldWhereRequiredNotes
realised_gainbody (string)yes
realised_lossbody (string)yes
unrealised_gainbody (string/null)Default: the realised gain account
unrealised_lossbody (string/null)Default: the realised loss account

hub

GET /api/hub/meetings

Meetings you may see (company-wide ones and those you are invited to), newest first.

Operation list_meetings · sends X-Company-Id

POST /api/hub/meetings

Plan a meeting with its agenda and people (you are the organizer).

Operation create_meeting · sends X-Company-Id

FieldWhereRequiredNotes
titlebody (string)yes
starts_atbody (string)yes
ends_atbody (string/null)
purposebody (string)
locationbody (string)
visibilitybody (string)participants = only invited people see it, also in search
participantsbody (array)Member user ids
minute_takerbody (string/null)
agendabody (array)

GET /api/hub/meetings/{meeting_id}

One meeting: agenda, people, discussion, minutes, decisions and their tasks.

Operation get_meeting · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes

POST /api/hub/meetings/{meeting_id}/agenda

Add an agenda point (organizer or minute-taker).

Operation add_agenda_item · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes
titlebody (string)yes
detailsbody (string)
owner_idbody (string/null)The member who presents this point
ref_typebody (string/null)
ref_idbody (string/null)A transaction this point is about

POST /api/hub/meetings/{meeting_id}/cancel

Cancel a planned meeting (organizer).

Operation cancel_meeting · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes

POST /api/hub/meetings/{meeting_id}/decisions

Record a decision and its action items; each action item becomes a task (To-Do) for its person.

Operation record_decision · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes
textbody (string)yes
tasksbody (array)Action items: each becomes a task (To-Do) for its person

PUT /api/hub/meetings/{meeting_id}/minutes

Write the minutes (organizer or minute-taker); final=true freezes them (organizer).

Operation write_minutes · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes
minutesbody (string)yes
finalbody (boolean)Final minutes never change again (organizer only)

POST /api/hub/meetings/{meeting_id}/people

Invite members (organizer or minute-taker).

Operation invite_people · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes
user_idsbody (array)yes
partbody (string)

POST /api/hub/meetings/{meeting_id}/posts

Write in the meeting's discussion; tag members with mentions (they get a notice).

Operation post_in_meeting · sends X-Company-Id

FieldWhereRequiredNotes
meeting_idpathyes
textbody (string)yes
mentionsbody (array)Member user ids tagged (@person): they get a notice

GET /api/hub/my-day

What needs you today: tasks overdue / today / this week, meetings today and tomorrow, unread mentions, approvals waiting.

Operation my_day · sends X-Company-Id

GET /api/hub/tasks

Tasks for you and tasks you gave.

Operation my_hub_tasks · sends X-Company-Id

FieldWhereRequiredNotes
statusquery

POST /api/hub/tasks

Give a task to a member (optionally about a transaction).

Operation create_hub_task · sends X-Company-Id

FieldWhereRequiredNotes
titlebody (string)yes
assignee_idbody (string)yes
detailsbody (string)
due_datebody (string/null)
ref_typebody (string/null)
ref_idbody (string/null)

POST /api/hub/tasks/{task_id}/finish

Mark your task done (with a note), or cancel a task you gave.

Operation finish_hub_task · sends X-Company-Id

FieldWhereRequiredNotes
task_idpathyes
statusbody (string)yes
notebody (string)

GET /api/hub/threads/{ref_type}/{ref_id}

The discussion on a transaction or a customer / vendor (for people who may open it).

Operation get_record_thread · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes

POST /api/hub/threads/{ref_type}/{ref_id}/posts

Write in a transaction's / customer's / vendor's discussion; tag people (they get a notice).

Operation post_on_record · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes
textbody (string)yes
mentionsbody (array)Member user ids tagged (they must be able to open the record)

import

GET /api/import/batches

Imports of this company, newest first.

Operation list_imports · sends X-Company-Id

POST /api/import/batches

Upload an import package (JSON).

Operation upload_import_package · sends X-Company-Id

FieldWhereRequiredNotes
packagebody (object)yesThe canonical import package (format isoerp-next-import, version 1)
labelbody (string)A name for this import, e.g.

GET /api/import/batches/{batch_id}

One import: status, what the file contains, errors and skipped records, mapping, progress, verification, history.

Operation get_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
include_problemsquery

POST /api/import/batches/{batch_id}/discard

Take back an import that was never posted: every draft, account, party and added person it created is removed.

Operation discard_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
reasonbody (string)

POST /api/import/batches/{batch_id}/explain

Write down why one account differs from the old system's trial balance (a person's judgement; it is kept with the import).

Operation explain_import_difference · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
accountbody (string)yes
reasonbody (string)yesWhy the new books differ from the old system's trial balance for this account

PUT /api/import/batches/{batch_id}/mapping

How to read the package: old role → new role, account type corrections, suspense account, which old years to lock.

Operation set_import_mapping · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
rolesbody (object)Old role name → cfo, accountant, clerk, sales, purchase, warehouse, hr or viewer (never owner)
account_typesbody (object)Account code → asset, liability, equity, income or expense
suspense_accountbody (string/null)A postable account that absorbs an unbalanced opening entry
lock_closed_beforebody (string/null)Lock the accounting periods that end before this date once the import is posted

POST /api/import/batches/{batch_id}/party-openings

After staging: make one DRAFT opening document per customer / vendor balance (invoice, credit note, bill or debit note marked 'Opening balance from <old system>'); they are submitted with the import and approved + posted by another person.

Operation stage_import_party_openings · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes

POST /api/import/batches/{batch_id}/post

A DIFFERENT authorised person approves and posts the submitted entries (or the reversal entries of a reversing import).

Operation post_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
limitbody (integer)

POST /api/import/batches/{batch_id}/reverse

Take back a POSTED import with reversal entries (another person posts them with the post step).

Operation reverse_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
reversal_datebody (string)yes
reasonbody (string)yes
limitbody (integer)

POST /api/import/batches/{batch_id}/stage

Create the accounts, parties, items and every voucher as DRAFTS (nothing is posted).

Operation stage_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
max_vouchersbody (integer)How many vouchers to create in this call (call again until done)

POST /api/import/batches/{batch_id}/submit

Send every staged draft for approval (the person who staged it).

Operation submit_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes
limitbody (integer)
acknowledge_no_control_totalbody (boolean)Accept that there is no old trial balance to check against

GET /api/import/batches/{batch_id}/verification

Compare the staged books with the package and with the old system's own trial balance, account by account.

Operation verify_import · sends X-Company-Id

FieldWhereRequiredNotes
batch_idpathyes

POST /api/import/legacy

Upload rows copied from the OLD ISOERP (a copy of its database, never the live one).

Operation upload_legacy_rows · sends X-Company-Id

FieldWhereRequiredNotes
rowsbody (object)yesRows copied from the OLD ISOERP, keyed by table name (see EXTRACT_SQL): HeadofAccount, ControlAccount, SubControlAccount, ChartOfAccount, Transaction, TransactionDetails, Customer, Supplier, Branches, AbpUsers
company_namebody (string)yes
base_currencybody (string)
countrybody (string)
extracted_atbody (string)
head_typesbody (object)Old head-of-account code → asset, liability, equity, income or expense (only for heads whose title says nothing)
include_opening_vouchersbody (boolean)
count_submittedbody (boolean/null)Old vouchers stored as 'Submitted': true = they are part of the books, false = leave them out.
orphan_accountbody (string/null)
party_controlbody (object/null)Old control accounts whose lines name customers / vendors: {"receivable": [codes], "payable": [codes], "accept_unassigned": false}.
trial_balancebody (object/null)The old system's own trial balance: {as_of, rows: [{account, debit, credit}]}
labelbody (string)

inventory

GET /api/inventory/settings

The inventory accounts (GRNI, COGS, adjustment, price variance), the default warehouse and whether negative stock is allowed; null when inventory is not set up yet.

Operation get_inventory_settings · sends X-Company-Id

PATCH /api/inventory/settings

Change the default COGS / adjustment / price-variance accounts, the default warehouse or whether negative stock is allowed (owner or CFO).

Operation update_inventory_settings · sends X-Company-Id

FieldWhereRequiredNotes
cogsbody (string/null)
adjustmentbody (string/null)
price_variancebody (string/null)
default_warehousebody (string/null)Warehouse code
allow_negative_stockbody (boolean/null)

POST /api/inventory/setup

Turn inventory on (owner or CFO; the plan must include inventory): GRNI, COGS, adjustment and price-variance account codes and the default warehouse (created if new).

Operation setup_inventory · sends X-Company-Id

FieldWhereRequiredNotes
grnibody (string)yesGoods received not invoiced: a fresh liability account (becomes a control account)
cogsbody (string)yesDefault cost of goods sold account
adjustmentbody (string)yesDefault stock gain/loss account
price_variancebody (string)yesPurchase price variance account
warehouse_codebody (string/null)Default warehouse code (created if new)
warehouse_namebody (string/null)
allow_negative_stockbody (boolean)

GET /api/items/{code}/stock

An item's cost method, COGS account, reorder level / quantity and quantity on hand.

Operation get_item_stock · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes

PATCH /api/items/{code}/stock

Set an item's cost method ('average' or 'fifo' — only before its first movement), its own COGS account, reorder level and reorder quantity (owner, CFO, accountant or warehouse).

Operation set_item_stock · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
cost_methodbody (string/null)Only before the item's first movement
cogsbody (string/null)The item's own COGS account code
reorder_levelbody (number/string/null)
reorder_qtybody (number/string/null)

GET /api/stock-docs

Stock adjustments and transfers, newest first; filter by kind and status.

Operation list_stock_docs · sends X-Company-Id

FieldWhereRequiredNotes
kindquery
statusquery

POST /api/stock-docs/adjustments

Prepare a DRAFT stock adjustment in one warehouse: + found / − lost per item (stock coming in may carry a unit cost).

Operation create_stock_adjustment · sends X-Company-Id

FieldWhereRequiredNotes
branchbody (string/null)Branch / project / cost-centre code (optional)
projectbody (string/null)Branch / project / cost-centre code (optional)
cost_centrebody (string/null)Branch / project / cost-centre code (optional)
doc_datebody (string)yes
warehousebody (string)yes
linesbody (array)yes
counter_accountbody (string/null)Where the gain/loss goes (default: the adjustment account)
reasonbody (string)

POST /api/stock-docs/transfers

Prepare a DRAFT transfer between two warehouses (quantities above zero; stock moves at its cost).

Operation create_stock_transfer · sends X-Company-Id

FieldWhereRequiredNotes
branchbody (string/null)Branch / project / cost-centre code (optional)
projectbody (string/null)Branch / project / cost-centre code (optional)
cost_centrebody (string/null)Branch / project / cost-centre code (optional)
doc_datebody (string)yes
from_warehousebody (string)yes
to_warehousebody (string)yes
linesbody (array)yes
reasonbody (string)

GET /api/stock-docs/{stock_doc_id}

One stock adjustment or transfer with its lines, status, maker, approver and journal number once posted.

Operation get_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes

POST /api/stock-docs/{stock_doc_id}/approve

Approve a submitted stock document.

Operation approve_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes
notebody (string)

POST /api/stock-docs/{stock_doc_id}/cancel

Cancel a stock document that is not posted, with a reason (it stays in history).

Operation cancel_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes
reasonbody (string)yes

POST /api/stock-docs/{stock_doc_id}/post

Post an APPROVED stock document: moves the stock at cost and posts its journal entry (SA-/ST- number).

Operation post_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes

POST /api/stock-docs/{stock_doc_id}/reject

Send a submitted or approved stock document back to draft, with a reason.

Operation reject_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes
reasonbody (string)yes

POST /api/stock-docs/{stock_doc_id}/submit

Send a draft stock document for approval.

Operation submit_stock_doc · sends X-Company-Id

FieldWhereRequiredNotes
stock_doc_idpathyes

GET /api/warehouses

Every warehouse (store, shop, yard) of this company, closed ones too.

Operation list_warehouses · sends X-Company-Id

POST /api/warehouses

Add a warehouse (owner, CFO, accountant or warehouse; the plan must include inventory).

Operation add_warehouse · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesNever changes
namebody (string)yes
branchbody (string/null)Branch code its stock postings belong to (optional)

GET /api/warehouses/{code}

One warehouse by code.

Operation get_warehouse · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes

PATCH /api/warehouses/{code}

Rename, close (active=false — only when it holds no stock) or reopen a warehouse.

Operation update_warehouse · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
namebody (string/null)
activebody (boolean/null)false = close (only when it holds no stock); true = reopen

GET /api/warehouses/{code}/location

A warehouse's place and its weather now / next days (cached; 'unavailable' when the service does not answer).

Operation get_warehouse_location · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes

PUT /api/warehouses/{code}/location

Where a warehouse / depot / site is (from the place search): for weather, wind and maps (owner, CFO, accountant, warehouse).

Operation set_warehouse_location · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
placebody (string)The place as chosen from the place search
latitudebody (number/null)
longitudebody (number/null)
countrybody (string/null)

journal

GET /api/approvals/context/{ref_type}/{ref_id}

For one entry / document: did you make it, may you approve it yourself as the ONLY possible approver right now, and who else may approve it (screens hide Approve from the maker unless the sole-approver step applies).

Operation approval_context · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes

GET /api/approvals/inbox

Entries waiting for YOUR approval: submitted, not made by you, and within your approval limit.

Operation approvals_inbox · sends X-Company-Id

GET /api/approvals/mine

What I made that is not finished yet (drafts, waiting for approval, waiting to be posted) and whom it waits on — including drafts the assistant (Star) or WhatsApp prepared for me.

Operation my_pending_items · sends X-Company-Id

GET /api/entries

Journal entries, newest first, 50 per page by default; filter by status and date.

Operation list_entries · sends X-Company-Id

FieldWhereRequiredNotes
statusquery
date_fromquery
date_toquery
pagequery
page_sizequery

POST /api/entries

Create a journal entry as a draft.

Operation create_draft · sends X-Company-Id

FieldWhereRequiredNotes
entry_datebody (string)yes
memobody (string)
currencybody (string/null)Defaults to the company's base currency
linesbody (array)yes
branchbody (string/null)Default branch for lines that name none
projectbody (string/null)Default project for lines that name none
cost_centrebody (string/null)Default cost centre for lines that name none

GET /api/entries/{entry_id}

One entry with its lines and its full approval history (who, what, when, why).

Operation get_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes

PATCH /api/entries/{entry_id}

Change a DRAFT entry: date, memo, currency and/or all its lines (it must still balance).

Operation update_draft_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes
entry_datebody (string/null)
memobody (string/null)
currencybody (string/null)
linesbody (array/null)Replaces every line
branchbody (string/null)Default branch for new lines that name none
projectbody (string/null)
cost_centrebody (string/null)

POST /api/entries/{entry_id}/approve

Approve a submitted entry.

Operation approve_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes
notebody (string)
self_reviewbody (string/null)Only when YOU made it and you are the only person who may approve it: your written review, e.g.

POST /api/entries/{entry_id}/post

Post an approved entry to the books: it gets its number and joins the tamper-evident chain.

Operation post_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes

POST /api/entries/{entry_id}/reject

Send a submitted or approved entry back to draft, with a reason.

Operation reject_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes
reasonbody (string)yes

POST /api/entries/{entry_id}/reverse

Correct a posted entry: creates an opposite DRAFT that goes through the same approval before it posts.

Operation reverse_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes
entry_datebody (string)yes
reasonbody (string)yes

POST /api/entries/{entry_id}/submit

Send a draft for approval.

Operation submit_entry · sends X-Company-Id

FieldWhereRequiredNotes
entry_idpathyes

learning

GET /api/lms/access

Is Learning on for this company, and what is my part in it (admin / instructor / none).

Operation lms_my_access · sends X-Company-Id

PATCH /api/lms/assessments/{assessment_id}

Change or publish a quiz (only before any learner has taken it).

Operation lms_update_assessment · sends X-Company-Id

FieldWhereRequiredNotes
assessment_idpathyes
titlebody (string/null)
pass_markbody (integer/null)
max_attemptsbody (integer/null)
requiredbody (boolean/null)
statusbody (string/null)
questionsbody (array/null)

GET /api/lms/certificates

Certificates issued (admins: all; instructors: their courses).

Operation lms_list_certificates · sends X-Company-Id

FieldWhereRequiredNotes
course_idquery

GET /api/lms/certificates/chain-check

Re-check every certificate this company issued: hashes, links between them, signatures, no gaps.

Operation lms_certificate_chain_check · sends X-Company-Id

GET /api/lms/certificates/{certificate_id}

One certificate with its public verification link and QR code (to print).

Operation lms_get_certificate · sends X-Company-Id

FieldWhereRequiredNotes
certificate_idpathyes

POST /api/lms/certificates/{certificate_id}/revoke

Revoke a certificate, with the reason (Learning admins).

Operation lms_revoke_certificate · sends X-Company-Id

FieldWhereRequiredNotes
certificate_idpathyes
reasonbody (string)yes

GET /api/lms/courses

Courses (admins: all; instructors: the ones they teach) with enrolled and passed counts.

Operation lms_list_courses · sends X-Company-Id

FieldWhereRequiredNotes
statusquery

POST /api/lms/courses

Create a course as a draft (Learning admins).

Operation lms_create_course · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesShort code, e.g.
titlebody (string)yes
descriptionbody (string)
categorybody (string)
levelbody (string)
languagebody (string)
self_enrolbody (boolean)Signed-in adults may join by themselves
certificate_enabledbody (boolean)
fee_itembody (string/null)Item code used when a tuition invoice is drafted

GET /api/lms/courses/{course_id}

One course: modules, lessons, assessments with questions and answers, classes, instructors, announcements.

Operation lms_get_course · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes

PATCH /api/lms/courses/{course_id}

Change a course; publish (needs a lesson) or archive it.

Operation lms_update_course · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
codebody (string/null)
titlebody (string/null)
descriptionbody (string/null)
categorybody (string/null)
levelbody (string/null)
languagebody (string/null)
statusbody (string/null)
self_enrolbody (boolean/null)
certificate_enabledbody (boolean/null)
fee_itembody (string/null)

POST /api/lms/courses/{course_id}/announcements

Post an announcement to a course's learners (or one class).

Operation lms_post_announcement · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
titlebody (string)yes
bodybody (string)
cohort_idbody (string/null)

POST /api/lms/courses/{course_id}/assessments

Add a quiz (multiple choice, true/false, short answer) with its pass mark and allowed attempts, as a draft.

Operation lms_create_assessment · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
titlebody (string)yes
pass_markbody (integer)Percent needed to pass
max_attemptsbody (integer)
requiredbody (boolean)Must be passed to complete the course
questionsbody (array)

POST /api/lms/courses/{course_id}/cohorts

Add a class (cohort / batch) to a course.

Operation lms_create_cohort · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
namebody (string)yes
starts_onbody (string/null)
ends_onbody (string/null)

GET /api/lms/courses/{course_id}/enrolments

Learners of a course with their status and progress.

Operation lms_list_enrolments · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes

GET /api/lms/courses/{course_id}/gradebook

Gradebook: per learner progress, best score and attempts per quiz, attendance and certificate.

Operation lms_gradebook · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes

PUT /api/lms/courses/{course_id}/instructors

Who teaches this course (members with the instructor part).

Operation lms_set_instructors · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
user_idsbody (array)

POST /api/lms/courses/{course_id}/modules

Add a module (a chapter) to a course.

Operation lms_add_module · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
titlebody (string)yes

POST /api/lms/courses/{course_id}/modules/{module_id}/lessons

Add a lesson to a module: text, or a link to a file or video (https).

Operation lms_add_lesson · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
module_idpathyes
titlebody (string)yes
kindbody (string)
bodybody (string)
link_urlbody (string/null)https link of the file or video
requiredbody (boolean)

GET /api/lms/courses/{course_id}/sessions

Class sessions of a course with how many attended.

Operation lms_list_sessions · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes

POST /api/lms/courses/{course_id}/sessions

Plan a class session (for the whole course or one class).

Operation lms_create_session · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
titlebody (string)yes
starts_atbody (string)yes
ends_atbody (string/null)
locationbody (string)
cohort_idbody (string/null)Only this class; empty = everyone in the course

POST /api/lms/enrolments

Enrol a learner in a published course (a learner under 18 needs the guardian's enrolment consent first).

Operation lms_enrol · sends X-Company-Id

FieldWhereRequiredNotes
learner_idbody (string)yes
course_idbody (string)yes
cohort_idbody (string/null)

POST /api/lms/enrolments/{enrolment_id}/certificate

Issue the certificate of a PASSED course: number, tamper-evident public code and QR.

Operation lms_issue_certificate · sends X-Company-Id

FieldWhereRequiredNotes
enrolment_idpathyes

POST /api/lms/enrolments/{enrolment_id}/tuition-invoice

Draft the tuition invoice for an enrolment (a DRAFT sales invoice; a person submits, approves and posts it in Sales).

Operation lms_draft_tuition_invoice · sends X-Company-Id

FieldWhereRequiredNotes
enrolment_idpathyes
partybody (string/null)Customer code of who pays (default: the learner's payer)
unit_pricebody (string/null)Default: the fee item's price

POST /api/lms/enrolments/{enrolment_id}/withdraw

Withdraw an active enrolment (a completed course stays completed).

Operation lms_withdraw · sends X-Company-Id

FieldWhereRequiredNotes
enrolment_idpathyes

POST /api/lms/invitations

E-mail a sign-in link: a learner joins the course (under 18: only after the guardian's consent); a guardian gets a read-only view of their learners.

Operation lms_invite · sends X-Company-Id

FieldWhereRequiredNotes
person_idbody (string)yesA learner (with course_id) or a guardian (no course)
course_idbody (string/null)
cohort_idbody (string/null)

GET /api/lms/learners

Learners (admins: all with e-mail; instructors: names of learners in their courses).

Operation lms_list_learners · sends X-Company-Id

FieldWhereRequiredNotes
qquery

POST /api/lms/learners

Add a learner (the minimum: name; e-mail for sign-in; birth year only to know a minor).

Operation lms_create_learner · sends X-Company-Id

FieldWhereRequiredNotes
full_namebody (string)yes
emailbody (string/null)
phonebody (string/null)
birth_yearbody (integer/null)Year only, to know whether the learner is under 18
is_minorbody (boolean)
languagebody (string)
payerbody (string/null)Customer code of who pays the fees (optional)

GET /api/lms/learners/{learner_id}

One learner: profile, guardians, consents and courses (instructors see only their courses, no contacts).

Operation lms_get_learner · sends X-Company-Id

FieldWhereRequiredNotes
learner_idpathyes

PATCH /api/lms/learners/{learner_id}

Change a learner's details.

Operation lms_update_learner · sends X-Company-Id

FieldWhereRequiredNotes
learner_idpathyes
full_namebody (string/null)
emailbody (string/null)
phonebody (string/null)
birth_yearbody (integer/null)
is_minorbody (boolean/null)
languagebody (string/null)
statusbody (string/null)
payerbody (string/null)

POST /api/lms/learners/{learner_id}/erase

Erase a learner's personal data on request (name, contacts, written answers; a public check that printed the full name is withdrawn).

Operation lms_erase_learner · sends X-Company-Id

FieldWhereRequiredNotes
learner_idpathyes
confirm_namebody (string)yesThe learner's full name, typed to confirm

GET /api/lms/learners/{learner_id}/export

Everything held on one learner, as one file (privacy request).

Operation lms_export_learner · sends X-Company-Id

FieldWhereRequiredNotes
learner_idpathyes

POST /api/lms/learners/{learner_id}/guardians

Link a guardian to a learner (read-only view of the learner's courses and certificates when they sign in).

Operation lms_add_guardian · sends X-Company-Id

FieldWhereRequiredNotes
learner_idpathyes
full_namebody (string)yes
emailbody (string/null)
phonebody (string/null)

DELETE /api/lms/lessons/{lesson_id}

Remove a lesson nobody has done yet (otherwise mark it not required).

Operation lms_delete_lesson · sends X-Company-Id

FieldWhereRequiredNotes
lesson_idpathyes

PATCH /api/lms/lessons/{lesson_id}

Change a lesson.

Operation lms_update_lesson · sends X-Company-Id

FieldWhereRequiredNotes
lesson_idpathyes
titlebody (string/null)
kindbody (string/null)
bodybody (string/null)
link_urlbody (string/null)
requiredbody (boolean/null)

Record a consent answer (who accepted what, which text version, now).

Operation lms_record_consent · sends X-Company-Id

FieldWhereRequiredNotes
person_idpathyes
purposebody (string)yes
acceptedbody (boolean)yes
given_bybody (string)yes
given_by_namebody (string)yes
text_versionbody (string)

GET /api/lms/sessions/{session_id}

One session with its learners and their attendance.

Operation lms_get_session · sends X-Company-Id

FieldWhereRequiredNotes
session_idpathyes

POST /api/lms/sessions/{session_id}/attendance

Mark attendance (present, absent, late, excused); optionally mark the session held or cancelled.

Operation lms_mark_attendance · sends X-Company-Id

FieldWhereRequiredNotes
session_idpathyes
marksbody (array)
statusbody (string/null)

GET /api/lms/staff

Members and their Learning parts (admin, instructor).

Operation lms_list_staff · sends X-Company-Id

POST /api/lms/staff

Give or take a Learning part (admin or instructor) for a member.

Operation lms_set_staff · sends X-Company-Id

FieldWhereRequiredNotes
user_idbody (string)yesA member of the company
partbody (string)yes
onbody (boolean)true = give the part, false = take it away

learning-me

GET /api/lms/me

My learning here: my courses and progress, announcements, upcoming sessions, courses I may join; for a guardian, the wards.

Operation lms_me · sends X-Company-Id

GET /api/lms/me/assessments/{assessment_id}

A quiz to take: its questions (never the answers) and attempts left.

Operation lms_my_assessment · sends X-Company-Id

FieldWhereRequiredNotes
assessment_idpathyes

POST /api/lms/me/assessments/{assessment_id}/attempts

Submit my answers: scored at once against the pass mark; uses one attempt.

Operation lms_submit_attempt · sends X-Company-Id

FieldWhereRequiredNotes
assessment_idpathyes
answersbody (object){question id: chosen index or written answer}

GET /api/lms/me/certificates/{certificate_id}

My certificate (or my ward's) with its verification link and QR code.

Operation lms_my_certificate · sends X-Company-Id

FieldWhereRequiredNotes
certificate_idpathyes

GET /api/lms/me/courses/{course_id}

One of my courses: lessons (done or not), quizzes with attempts left and best score, announcements, certificate.

Operation lms_my_course · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes

POST /api/lms/me/courses/{course_id}/join

Join a course that allows self-enrolment (adults only).

Operation lms_self_enrol · sends X-Company-Id

FieldWhereRequiredNotes
course_idpathyes
adultbody (boolean)yesI am 18 or older

POST /api/lms/me/invitations/accept

Accept a course invitation link (only with the e-mail address it was sent to).

Operation lms_accept_invitation

FieldWhereRequiredNotes
tokenbody (string)yes

POST /api/lms/me/lessons/{lesson_id}/done

Mark a lesson as done.

Operation lms_lesson_done · sends X-Company-Id

FieldWhereRequiredNotes
lesson_idpathyes

GET /api/lms/me/places

The schools / academies where I am a learner or guardian.

Operation lms_my_places

lookups

GET /api/lookups/banks

Banks by name (or SWIFT/BIC), optionally in one country first; includes banks your company added.

Operation find_banks · sends X-Company-Id

FieldWhereRequiredNotes
qquery
countryquery
limitquery

POST /api/lookups/banks

Add a bank missing from the list ('other'); refused when it is already there under the same name or SWIFT.

Operation add_missing_bank · sends X-Company-Id

FieldWhereRequiredNotes
countrybody (string)yes
namebody (string)yes
swiftbody (string)

GET /api/lookups/countries

Countries by name (English / Urdu / Arabic), ISO code or dial code: flag, dial code, currency, languages.

Operation find_countries · sends X-Company-Id

FieldWhereRequiredNotes
qquery
limitquery

GET /api/lookups/currencies

Currencies by code, name, symbol or country ('yen', 'JPY', 'Japan', 'جاپان' all find Japanese Yen): symbol, minor units.

Operation find_currencies · sends X-Company-Id

FieldWhereRequiredNotes
qquery
limitquery

GET /api/lookups/places

A place name to coordinates (OpenStreetMap; looked up when you press Enter, cached; only the place name goes out).

Operation find_places · sends X-Company-Id

FieldWhereRequiredNotes
qqueryyes

GET /api/lookups/sources

Where every list and outside service comes from: licence, limits, attribution, last success.

Operation lookup_sources · sends X-Company-Id

GET /api/lookups/weather

Weather now (temperature, humidity, wind) and the next days at a coordinate; cached one hour; 'unavailable' when the service does not answer.

Operation weather_at · sends X-Company-Id

FieldWhereRequiredNotes
latqueryyes
lonqueryyes

members

GET /api/members

Everyone in this company with their role.

Operation list_members · sends X-Company-Id

POST /api/members

Add a person to this company with a role (owner or CFO only; only an owner can make another owner).

Operation add_member · sends X-Company-Id

FieldWhereRequiredNotes
emailbody (string)yes
full_namebody (string)yes
rolebody (string)yes

POST /api/members/{user_id}/invite

A fresh one-time invite link for a member who has not joined yet (owner or CFO): emailed to them and returned so it can also be shared another way.

Operation resend_invite · sends X-Company-Id

FieldWhereRequiredNotes
user_idpathyes

GET /api/members/{user_id}/permissions

A member's extra permissions on top of their role (e.g.

Operation get_member_permissions · sends X-Company-Id

FieldWhereRequiredNotes
user_idpathyes

PUT /api/members/{user_id}/permissions

Set a member's extra permissions (owner or CFO).

Operation set_member_permissions · sends X-Company-Id

FieldWhereRequiredNotes
user_idpathyes
permissionsbody (array)yesExtra capabilities on top of the role: customize = rename labels

notifications

GET /api/notifications

Your notifications, newest first.

Operation list_notifications · sends X-Company-Id

FieldWhereRequiredNotes
categoryquery
unread_onlyquery
limitquery

POST /api/notifications/read

Mark your notifications read — the given ids, or all of them when ids is left out.

Operation mark_notifications_read · sends X-Company-Id

FieldWhereRequiredNotes
idsbody (array/null)Notification ids; leave out to mark ALL your notifications read

GET /api/notifications/summary

How many unread bell notices and open to-dos you have (for badges).

Operation notification_summary · sends X-Company-Id

POST /api/notifications/{notification_id}/read

Mark one of your notifications read.

Operation mark_notification_read · sends X-Company-Id

FieldWhereRequiredNotes
notification_idpathyes

organisation

GET /api/branches

Every branch of this company (closed ones too unless include_closed=false).

Operation list_branches · sends X-Company-Id

FieldWhereRequiredNotes
include_closedquery

POST /api/branches

Add a branch (owner, CFO or accountant; within the plan's limit).

Operation create_branch · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesShort code, e.g.
namebody (string)yes

GET /api/branches/{item_id}

One branch.

Operation get_branch · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes

POST /api/branches/{item_id}

Rename, close (active=false) or reopen a branch.

Operation update_branch · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes
namebody (string/null)
activebody (boolean/null)false closes it: no new postings; history stays

GET /api/cost-centres

Every cost centre of this company (closed ones too unless include_closed=false).

Operation list_cost_centres · sends X-Company-Id

FieldWhereRequiredNotes
include_closedquery

POST /api/cost-centres

Add a cost centre (owner, CFO or accountant; within the plan's limit).

Operation create_cost_centre · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesShort code, e.g.
namebody (string)yes

GET /api/cost-centres/{item_id}

One cost centre.

Operation get_cost_centre · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes

POST /api/cost-centres/{item_id}

Rename, close (active=false) or reopen a cost centre.

Operation update_cost_centre · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes
namebody (string/null)
activebody (boolean/null)false closes it: no new postings; history stays

GET /api/projects

Every project of this company (closed ones too unless include_closed=false).

Operation list_projects · sends X-Company-Id

FieldWhereRequiredNotes
include_closedquery

POST /api/projects

Add a project (owner, CFO or accountant; within the plan's limit).

Operation create_project · sends X-Company-Id

FieldWhereRequiredNotes
codebody (string)yesShort code, e.g.
namebody (string)yes
branchbody (string/null)Code of the branch the project runs under
start_datebody (string/null)
end_datebody (string/null)

GET /api/projects/{item_id}

One project.

Operation get_project · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes

POST /api/projects/{item_id}

Rename, close (active=false) or reopen a project, or change its branch and dates.

Operation update_project · sends X-Company-Id

FieldWhereRequiredNotes
item_idpathyes
namebody (string/null)
activebody (boolean/null)false closes it: no new postings; history stays
branchbody (string/null)Branch code; send "" to detach from a branch
start_datebody (string/null)
end_datebody (string/null)

periods

GET /api/periods

Accounting periods and whether each is open or locked.

Operation list_periods · sends X-Company-Id

POST /api/periods

Open an accounting period (owner, CFO or accountant).

Operation open_period · sends X-Company-Id

FieldWhereRequiredNotes
start_datebody (string)yes
end_datebody (string)yes

POST /api/periods/{start_date}/lock

Lock the period starting on this date (owner or CFO).

Operation lock_period · sends X-Company-Id

FieldWhereRequiredNotes
start_datepathyes

plans

GET /api/plans

Every plan and what it includes (users, branches, projects, cost centres, modules).

Operation list_plans

public

GET /api/public/verify/{code}

Public check of a printed document's verification code: type, number, issuer, date, total (if the issuer allows), status and whether the stored facts still match their hash chain.

Operation verify_document_public

FieldWhereRequiredNotes
codepathyes

records

GET /api/attachments/{attachment_id}

One file's details and read text.

Operation get_attachment_info · sends X-Company-Id

FieldWhereRequiredNotes
attachment_idpathyes

GET /api/attachments/{attachment_id}/file

The file itself (only for people who may open its record).

Operation download_attachment · sends X-Company-Id

FieldWhereRequiredNotes
attachment_idpathyes

PUT /api/attachments/{attachment_id}/ocr-text

Correct what the machine read (owner, CFO, accountant); the machine-read text is kept as it was.

Operation correct_attachment_text · sends X-Company-Id

FieldWhereRequiredNotes
attachment_idpathyes
textbody (string)yes

POST /api/attachments/{attachment_id}/remove

Remove a file (soft: it stays on record as removed, with who, when and why).

Operation remove_attachment · sends X-Company-Id

FieldWhereRequiredNotes
attachment_idpathyes
reasonbody (string)yes

GET /api/records/{ref_type}/{ref_id}/attachments

Files of a record, with the reading status (pending / done / failed / skipped), the read text and removed files (on record).

Operation list_record_attachments · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes

POST /api/records/{ref_type}/{ref_id}/attachments

Attach a file (PDF, photo, Excel/CSV, Word, text) to a record.

Operation attach_file · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes
filenamebody (string)yesWith its extension: pdf, png, jpg, webp, gif, tif, xlsx, xls, csv, docx, doc, txt
content_base64body (string)yes

GET /api/records/{ref_type}/{ref_id}/notes

Description and remarks of a record (any transaction type).

Operation get_record_notes · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes

PUT /api/records/{ref_type}/{ref_id}/notes

Write the description / remarks of a record (allowed after posting too; every change is kept in its history).

Operation set_record_notes · sends X-Company-Id

FieldWhereRequiredNotes
ref_typepathyes
ref_idpathyes
descriptionbody (string/null)
remarksbody (string/null)Free remarks, e.g.

report-studio

GET /api/report-studio/datasets

What your role may build reports from: datasets, their fields (type, allowed totals, date groupings).

Operation list_report_datasets · sends X-Company-Id

POST /api/report-studio/preview

Run a report definition now without saving it (the builder's live preview).

Operation preview_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
datasetbody (string)yesjournal_lines, documents, document_lines, parties, items, stock_balances, einvoices
columnsbody (array)yes
filtersbody (array)
sortbody (array)
limitbody (integer)
periodbody (object/null)
startbody (string/null)Override the period: first date
endbody (string/null)Override the period: last date
preview_limitbody (integer)How many rows to show in the preview

GET /api/report-studio/reports

Your saved reports and the ones shared with your role.

Operation list_custom_reports · sends X-Company-Id

POST /api/report-studio/reports

Save a report definition under a name (optionally shared with roles — owner/CFO only).

Operation save_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
datasetbody (string)yesjournal_lines, documents, document_lines, parties, items, stock_balances, einvoices
columnsbody (array)yes
filtersbody (array)
sortbody (array)
limitbody (integer)
periodbody (object/null)
namebody (string)yes
descriptionbody (string)
shared_rolesbody (array)Roles that may open (not change) it — owner/CFO only

DELETE /api/report-studio/reports/{report_id}

Delete one of your own saved reports.

Operation delete_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
report_idpathyes

GET /api/report-studio/reports/{report_id}

One saved report with its definition.

Operation get_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
report_idpathyes

PUT /api/report-studio/reports/{report_id}

Replace one of your own saved reports.

Operation update_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
report_idpathyes
datasetbody (string)yesjournal_lines, documents, document_lines, parties, items, stock_balances, einvoices
columnsbody (array)yes
filtersbody (array)
sortbody (array)
limitbody (integer)
periodbody (object/null)
namebody (string)yes
descriptionbody (string)
shared_rolesbody (array)Roles that may open (not change) it — owner/CFO only

GET /api/report-studio/reports/{report_id}/export

A saved report as JSON, printable HTML, PDF, Excel or CSV (up to its row limit).

Operation export_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
report_idpathyes
formatquery
startquery
endquery

GET /api/report-studio/reports/{report_id}/run

Run a saved report with YOUR role's view of the data (start / end override its period).

Operation run_custom_report · sends X-Company-Id

FieldWhereRequiredNotes
report_idpathyes
startquery
endquery
limitquery

reports

GET /api/reports

The reports your role may open and export, with their parameters and formats.

Operation list_reports · sends X-Company-Id

GET /api/reports/aging/{kind}

Who owes us (receivable) / whom we owe (payable), by how overdue, in base currency.

Operation aging_report · sends X-Company-Id

FieldWhereRequiredNotes
kindpathyes
as_ofquery

GET /api/reports/balance-sheet

Assets, liabilities, equity and accumulated profit as of a date (default today).

Operation balance_sheet · sends X-Company-Id

FieldWhereRequiredNotes
as_ofquery

GET /api/reports/bank-reconciliation/{code}

Bank reconciliation as of a date (default today): statement balance, book balance, uncleared ledger lines, unmatched statement lines and the difference (0 when reconciled).

Operation reconciliation_report · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
as_ofquery

GET /api/reports/fx-summary

Realised and unrealised exchange results posted between two dates (base currency; + = gain).

Operation fx_summary · sends X-Company-Id

FieldWhereRequiredNotes
startqueryyes
endqueryyes

GET /api/reports/grni

Goods received not invoiced as of a date (default today): each open goods-received line, the total, the GRNI control balance and the difference (always 0).

Operation grni_report · sends X-Company-Id

FieldWhereRequiredNotes
as_ofquery

GET /api/reports/party-statement/{party}

A customer's or vendor's statement for a period: opening, each posted document, running balance, closing.

Operation party_statement · sends X-Company-Id

FieldWhereRequiredNotes
partypathyes
startqueryyes
endqueryyes
kindquery

GET /api/reports/profit-and-loss

Income, expenses and net profit between two dates (inclusive).

Operation profit_and_loss · sends X-Company-Id

FieldWhereRequiredNotes
startqueryyes
endqueryyes
branchquery
projectquery
cost_centrequery

GET /api/reports/profit-and-loss-by

Net profit per branch, project or cost centre between two dates, plus an "unassigned" row; the rows add up to the P&L.

Operation profit_and_loss_by · sends X-Company-Id

FieldWhereRequiredNotes
startqueryyes
endqueryyes
dimensionqueryyes

GET /api/reports/reorder

Stock items at or below their reorder level, with the quantity to order.

Operation reorder_report · sends X-Company-Id

FieldWhereRequiredNotes
warehousequery

GET /api/reports/stock-ledger/{item}

Every movement of one item between two dates: opening, each move (source number, warehouse, in/out, value, running quantity and value), closing.

Operation stock_ledger · sends X-Company-Id

FieldWhereRequiredNotes
itempathyes
startqueryyes
endqueryyes
warehousequery

GET /api/reports/stock-valuation

Quantity, value and unit cost per item × warehouse as of a date (default today), the total and — for the whole company — the inventory control balance and the difference (always 0).

Operation stock_valuation · sends X-Company-Id

FieldWhereRequiredNotes
as_ofquery
warehousequery

GET /api/reports/trial-balance

Trial balance as of a date (default today).

Operation trial_balance · sends X-Company-Id

FieldWhereRequiredNotes
as_ofquery
branchquery
projectquery
cost_centrequery

GET /api/reports/{name}/export

Any report as JSON (every row with its drill-down link to the source entry/document), HTML (printable, branded with the company name), PDF, Excel (XLSX) or CSV.

Operation export_report · sends X-Company-Id

FieldWhereRequiredNotes
namepathyes
formatquery
as_ofquery
startquery
endquery
dimensionquery
accountqueryAccount code (account-ledger)
partyqueryCustomer/vendor code (statement)
warehousequeryWarehouse code (stock-valuation)
bankqueryBank account code (bank-reconciliation)
packqueryTax pack code, e.g.
branchquery
projectquery
cost_centrequery

GET /api/search

Find accounts, customers/vendors, items, documents (number, party, reference), journal entries (number, memo), members, branches, projects and cost centres — typo-tolerant, Urdu/Arabic aware, only what your role may see.

Operation search_records · sends X-Company-Id

FieldWhereRequiredNotes
qqueryyes
limitquery

settings

GET /api/settings/approvals

This company's approval settings: may a SOLE approver approve their own work with a written review (audited), and do eligible approvers also get an e-mail (the bell and To-Do always).

Operation get_approval_settings · sends X-Company-Id

PUT /api/settings/approvals

Change the approval settings (owner or CFO).

Operation set_approval_settings · sends X-Company-Id

FieldWhereRequiredNotes
sole_approver_self_approvalbody (boolean/null)
email_approversbody (boolean/null)

DELETE /api/settings/approvals/limits

The role may no longer approve this document type (owner or CFO; audited; never the last unlimited approver).

Operation remove_approval_limit · sends X-Company-Id

FieldWhereRequiredNotes
doc_typequeryyes
rolequeryyes

PUT /api/settings/approvals/limits

Set what a role may approve for a document type (max_amount null = no limit).

Operation set_approval_limit · sends X-Company-Id

FieldWhereRequiredNotes
doc_typebody (string)yes
rolebody (string)yes
max_amountbody (number/string/null)

supply_chain

GET /api/supply-chain/categories

The item categories in use, with how many items and critical items each has.

Operation list_item_categories · sends X-Company-Id

GET /api/supply-chain/critical-items

Early warnings: for each critical item, days of stock left (stock ÷ average daily use from our own issues) against days until the next arrival (open purchase orders), with status stockout / late / gap / watch / ok and a reorder suggestion.

Operation list_critical_items · sends X-Company-Id

FieldWhereRequiredNotes
window_daysquery
minequery
include_allquery

POST /api/supply-chain/critical-items/draft-requisition

Put the reorder suggestions of the chosen items into ONE DRAFT purchase requisition (nothing is ordered; a person submits it).

Operation draft_requisition_from_suggestions · sends X-Company-Id

FieldWhereRequiredNotes
itemsbody (array)yesItem codes from the reorder suggestions
needed_bybody (string/null)
warehousebody (string/null)

GET /api/supply-chain/feeds

The feeds this company reads, with when each was last read and how it went.

Operation list_signal_feeds · sends X-Company-Id

POST /api/supply-chain/feeds

Add an RSS / Atom feed (https, on a trusted site) to read: trade, chemicals, shipping, ports, news or prices (owner or CFO).

Operation add_signal_feed · sends X-Company-Id

FieldWhereRequiredNotes
urlbody (string)yeshttps address of an RSS or Atom feed on a trusted site
titlebody (string)
topicbody (string)

PATCH /api/supply-chain/feeds/{feed_id}

Rename a feed, change its topic, or switch it off / on (owner or CFO).

Operation update_signal_feed · sends X-Company-Id

FieldWhereRequiredNotes
feed_idpathyes
titlebody (string/null)
topicbody (string/null)
activebody (boolean/null)

POST /api/supply-chain/feeds/{feed_id}/read-now

Read one feed now (owner or CFO; the company's signals must be switched on).

Operation read_signal_feed_now · sends X-Company-Id

FieldWhereRequiredNotes
feed_idpathyes

GET /api/supply-chain/hub-cards

Supply chain cards for my day: my critical items at risk, requisitions waiting for my decision, supplier papers expiring, and this week's top signals (not verified).

Operation supply_chain_hub_cards · sends X-Company-Id

GET /api/supply-chain/items

Items with their supply settings: category, critical, single source, lead time, cover days, buyer and number of approved sources.

Operation list_item_supply · sends X-Company-Id

FieldWhereRequiredNotes
criticalquery
categoryquery
qquery

GET /api/supply-chain/items/{code}

One item's supply settings, its approved sources (primary and alternates with channel) and sourcing risks (single source ...).

Operation get_item_supply · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes

PATCH /api/supply-chain/items/{code}

Mark an item critical or single-source, set its category, planning lead time, cover days and the buyer who watches it.

Operation update_item_supply · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
categorybody (string/null)The company's own category words: Valves, Drilling chemicals ...
criticalbody (boolean/null)
single_sourcebody (boolean/null)
lead_time_daysbody (integer/null)Planning lead time; empty = use what our deliveries show
cover_daysbody (integer/null)Warn when days of stock left falls below this
buyer_idbody (string/null)The member who watches this item

POST /api/supply-chain/items/{code}/sources

Approve a supplier as the primary source or an approved alternate for an item, with its channel (OEM, distributor, agent ...).

Operation add_item_source · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
supplierbody (string)yesSupplier (vendor) code
rolebody (string)
channelbody (string)
notebody (string)

POST /api/supply-chain/items/{code}/sources/{supplier}/remove

The supplier is no longer an approved source of the item (kept on record as inactive).

Operation remove_item_source · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
supplierpathyes

GET /api/supply-chain/papers/expiring

Supplier papers already expired or expiring within the given days, soonest first.

Operation list_expiring_supplier_papers · sends X-Company-Id

FieldWhereRequiredNotes
within_daysquery

GET /api/supply-chain/requisitions

Purchase requisitions, newest first; mine=true: the ones I made; waiting_me=true: submitted ones someone else made (for approvers).

Operation list_purchase_requisitions · sends X-Company-Id

FieldWhereRequiredNotes
statusquery
minequery
waiting_mequery

POST /api/supply-chain/requisitions

Prepare a DRAFT purchase requisition (items, quantities, estimated prices, needed-by date, warehouse, reason).

Operation create_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
linesbody (array)yes
needed_bybody (string/null)
warehousebody (string/null)
reasonbody (string)

GET /api/supply-chain/requisitions/{requisition_id}

One requisition with its lines, estimated value, status, who made / decided it, its history and its purchase order.

Operation get_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes

PUT /api/supply-chain/requisitions/{requisition_id}

Change a draft requisition (its maker only).

Operation update_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
linesbody (array)yes
needed_bybody (string/null)
warehousebody (string/null)
reasonbody (string)

POST /api/supply-chain/requisitions/{requisition_id}/approve

Approve a submitted requisition: never by its maker; the role and limit come from the company's approval rules.

Operation approve_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
notebody (string)

POST /api/supply-chain/requisitions/{requisition_id}/cancel

Cancel a requisition that is not ordered yet (its maker, the owner or the CFO).

Operation cancel_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
reasonbody (string)

GET /api/supply-chain/requisitions/{requisition_id}/offers

Offers side by side: landed cost (price + freight + duty + other, in base currency), lines covered, lead time, validity, and the supplier's on-time and return record from our own deliveries.

Operation compare_requisition_offers · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes

POST /api/supply-chain/requisitions/{requisition_id}/offers

Enter a supplier's offer against a requisition: unit prices, currency and exchange rate, freight, duty, other costs, lead time, when we asked and when it came (for the supplier's response time).

Operation add_requisition_offer · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
supplierbody (string)yes
linesbody (array)yes
currencybody (string/null)
fx_ratebody (number/string)Offer currency → base currency
freightbody (number/string)
dutybody (number/string)
other_costsbody (number/string)
lead_time_daysbody (integer/null)
requested_onbody (string/null)
received_onbody (string/null)
valid_untilbody (string/null)
notebody (string)

DELETE /api/supply-chain/requisitions/{requisition_id}/offers/{offer_id}

Remove an offer typed in by mistake (not after the requisition is ordered).

Operation remove_requisition_offer · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
offer_idpathyes

POST /api/supply-chain/requisitions/{requisition_id}/offers/{offer_id}/choose

Choose the offer the purchase order will use (one per requisition).

Operation choose_requisition_offer · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
offer_idpathyes

POST /api/supply-chain/requisitions/{requisition_id}/purchase-order

From an APPROVED requisition and its chosen offer, prepare a DRAFT purchase order (it then goes through the normal purchase-order approval).

Operation create_po_from_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
doc_datebody (string/null)

POST /api/supply-chain/requisitions/{requisition_id}/reject

Send a submitted requisition back to its maker with the reason (never by its maker).

Operation reject_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes
reasonbody (string)yes

POST /api/supply-chain/requisitions/{requisition_id}/reopen

Turn a sent-back requisition into a draft again so its maker can fix it.

Operation reopen_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes

POST /api/supply-chain/requisitions/{requisition_id}/submit

Send a draft requisition for approval (its maker); it gets its PR number.

Operation submit_purchase_requisition · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes

GET /api/supply-chain/requisitions/{requisition_id}/supplier-suggestions

For each line: the approved sources of the item and the suppliers who delivered it in our own orders (last price, orders, on-time %).

Operation suggest_requisition_suppliers · sends X-Company-Id

FieldWhereRequiredNotes
requisition_idpathyes

GET /api/supply-chain/scorecards

Supplier scorecards from our own orders, goods receipts, debit notes and offers: on-time %, promised vs actual lead time, return rate, price trend, response time — per supplier or per item category (default: the last 365 days).

Operation list_supplier_scorecards · sends X-Company-Id

FieldWhereRequiredNotes
byquery
fromquery
toquery

GET /api/supply-chain/scorecards/{code}

One supplier's scorecard with its price history per item and the deliveries behind the numbers.

Operation get_supplier_scorecard · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
fromquery
toquery

GET /api/supply-chain/signal-keywords

The company's own words that make a feed item relevant, and what each points at (category, supplier, region, item).

Operation list_signal_keywords · sends X-Company-Id

POST /api/supply-chain/signal-keywords

Add a keyword with its weight (1-5) and what it points at; recent signals are scored again (owner, CFO or purchase).

Operation add_signal_keyword · sends X-Company-Id

FieldWhereRequiredNotes
keywordbody (string)yes
target_typebody (string)
targetbody (string)The category name, supplier code, region or item code it points at
weightbody (integer)

GET /api/supply-chain/signal-keywords/suggestions

Words the company already uses (item categories, supplier names, regions served), ready to add as keywords.

Operation suggest_signal_keywords · sends X-Company-Id

DELETE /api/supply-chain/signal-keywords/{keyword_id}

Remove a keyword; recent signals are scored again (owner, CFO or purchase).

Operation remove_signal_keyword · sends X-Company-Id

FieldWhereRequiredNotes
keyword_idpathyes

GET /api/supply-chain/signal-settings

Whether this company's feeds are read, its trusted sites and the minimum relevance shown.

Operation get_signal_settings · sends X-Company-Id

PATCH /api/supply-chain/signal-settings

Switch the feed reader on or off for this company, set the trusted sites and the minimum relevance (owner or CFO).

Operation update_signal_settings · sends X-Company-Id

FieldWhereRequiredNotes
enabledbody (boolean/null)Read this company's feeds in the background
allowed_hostsbody (array/null)Trusted sites: www.example.com or *.example.com
min_scorebody (integer/null)

GET /api/supply-chain/signals

Signals for your items: news / trade / shipping feed items matched to the company's keywords, most relevant first, each with a link to its source.

Operation list_supply_signals · sends X-Company-Id

FieldWhereRequiredNotes
daysquery
min_scorequery
target_typequery
targetquery
include_dismissedquery

POST /api/supply-chain/signals/{signal_id}/dismiss

Hide a signal that is not useful (for everyone in the company).

Operation dismiss_supply_signal · sends X-Company-Id

FieldWhereRequiredNotes
signal_idpathyes

GET /api/supply-chain/suppliers

Suppliers (vendors) with their supply profile: type (OEM, authorised distributor, local agent ...), regions and countries served, qualification, and how many of their papers are expired or expiring.

Operation list_supply_suppliers · sends X-Company-Id

FieldWhereRequiredNotes
supplier_typequery
qualificationquery
countryquery
regionquery
qquery

GET /api/supply-chain/suppliers/{code}

One supplier's supply profile, its papers (certificates with expiry state) and the items it is an approved source for.

Operation get_supply_supplier · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes

PATCH /api/supply-chain/suppliers/{code}

Set a supplier's type, regions, countries, qualification status and review date (owner, CFO, accountant, clerk, purchase).

Operation update_supplier_profile · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
supplier_typebody (string/null)
regionsbody (array/null)Regions served, in the company's own words (Gulf, Sindh ...)
countriesbody (array/null)Two-letter country codes served (PK, SA, AE ...)
qualificationbody (string/null)
qualified_onbody (string/null)
review_duebody (string/null)When the qualification must be reviewed again
notesbody (string/null)

POST /api/supply-chain/suppliers/{code}/papers

Record a supplier paper (quality certificate, registration, local-content certificate, authorisation letter ...) with its expiry.

Operation add_supplier_paper · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
kindbody (string)yes
titlebody (string)yese.g.
referencebody (string)
issued_onbody (string/null)
expires_onbody (string/null)

POST /api/supply-chain/suppliers/{code}/papers/{paper_id}/withdraw

Withdraw a supplier paper that was replaced or wrong (it stays on record as withdrawn; nothing is deleted).

Operation withdraw_supplier_paper · sends X-Company-Id

FieldWhereRequiredNotes
codepathyes
paper_idpathyes

system

GET /api/health

Liveness + database check (no sign-in needed).

Operation health

GET /api/tools

Every capability of the API as a tool (name, description, input schema, writes → preview + confirm).

Operation tool_catalog

GET /api/version

The build id of the live screens.

Operation version

tax

GET /api/tax/einvoices

E-invoices of the company, newest first.

Operation list_einvoices · sends X-Company-Id

FieldWhereRequiredNotes
statusquerydraft, confirmed, submitted, accepted, rejected, cancelled
document_idquery
limitquery

POST /api/tax/einvoices

Prepare the government e-invoice DRAFT of a posted sales invoice / credit note.

Operation create_einvoice_draft · sends X-Company-Id

FieldWhereRequiredNotes
document_idbody (string)yesThe posted sales invoice or credit note
pack_codebody (string/null)

GET /api/tax/einvoices/ready

Posted sales invoices and credit notes that have no e-invoice yet — the ones a person can prepare next.

Operation list_invoices_ready_for_einvoice · sends X-Company-Id

FieldWhereRequiredNotes
pack_codequery
limitquery

GET /api/tax/einvoices/{einvoice_id}

One e-invoice: summary (buyer, totals, QR text, hash), open issues and its history.

Operation get_einvoice · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes
include_payloadquery

POST /api/tax/einvoices/{einvoice_id}/cancel

Withdraw a draft or confirmed (not yet submitted) e-invoice, with the reason.

Operation cancel_einvoice · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes
reasonbody (string)yes

POST /api/tax/einvoices/{einvoice_id}/confirm

A PERSON confirms the e-invoice they checked (content_hash as shown).

Operation confirm_einvoice · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes
content_hashbody (string)yesThe hash shown on the draft (summary.content_hash / data_hash): proof you saw this content
statementbody (string)yesYour own words that you checked it, e.g.

GET /api/tax/einvoices/{einvoice_id}/file

The e-invoice as a file (FBR JSON or ZATCA UBL XML) to check or to upload in the authority's portal.

Operation download_einvoice_file · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes

POST /api/tax/einvoices/{einvoice_id}/refresh

Rebuild a DRAFT after fixing the customer / item profile or the pack details.

Operation refresh_einvoice_draft · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes

POST /api/tax/einvoices/{einvoice_id}/result

Write down the authority's answer (accepted + reference, or rejected + why), e.g.

Operation record_einvoice_result · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes
acceptedbody (boolean)yes
referencebody (string)The reference the authority gave (needed when accepted)
messagebody (string)

POST /api/tax/einvoices/{einvoice_id}/submit

Send a CONFIRMED e-invoice to the tax authority through the company's connection.

Operation submit_einvoice · sends X-Company-Id

FieldWhereRequiredNotes
einvoice_idpathyes

GET /api/tax/items/{item_code}/profile

An item's tax profile: HS code, unit, sale type, retail price.

Operation get_item_tax_profile · sends X-Company-Id

FieldWhereRequiredNotes
item_codepathyes

PUT /api/tax/items/{item_code}/profile

Set an item's tax profile (only the fields you send change).

Operation set_item_tax_profile · sends X-Company-Id

FieldWhereRequiredNotes
item_codepathyes
hs_codebody (string/null)Pakistan: HS code like 0101.2100
uombody (string/null)Pakistan: unit exactly as in FBR's list; Saudi: UN/ECE code (PCE, KGM …)
sale_typebody (string/null)Pakistan: standard, reduced, exempt, zero, third_schedule, services
sro_item_serial_nobody (string/null)
retail_pricebody (string/null)Third-schedule goods: the printed retail price

GET /api/tax/packs

The country tax packs (Pakistan FBR, Saudi ZATCA) and whether this company has switched each on.

Operation list_tax_packs · sends X-Company-Id

GET /api/tax/packs/{pack_code}

One pack as data: the registration details it needs, its tax rules (with rates), the invoice fields and the return layout.

Operation get_tax_pack · sends X-Company-Id

FieldWhereRequiredNotes
pack_codepathyes

GET /api/tax/packs/{pack_code}/company

This company's use of a pack: details, tax codes, e-invoice counts and what is still missing (plain sentences).

Operation get_company_tax_pack · sends X-Company-Id

FieldWhereRequiredNotes
pack_codepathyes

POST /api/tax/packs/{pack_code}/enable

Switch a tax pack on (owner or CFO): saves the company's registration details and creates the pack's tax codes.

Operation enable_tax_pack · sends X-Company-Id

FieldWhereRequiredNotes
pack_codepathyes
settingsbody (object)yesThe registration details the pack asks for (see the pack's `settings`): e.g.
output_accountbody (string/null)Account code for tax payable on sales (default: the one document setup uses)
input_accountbody (string/null)Account code for tax recoverable on purchases (default: the one document setup uses)

PUT /api/tax/packs/{pack_code}/settings

Change the registration details of a switched-on pack (owner or CFO).

Operation update_tax_pack_settings · sends X-Company-Id

FieldWhereRequiredNotes
pack_codepathyes
settingsbody (object)yesALL the pack's settings again (this replaces them).

POST /api/tax/packs/{pack_code}/tax-codes

Add a company tax code that follows a pack rule (e.g.

Operation add_pack_tax_code · sends X-Company-Id

FieldWhereRequiredNotes
pack_codepathyes
rulebody (string)yesA rule of the pack (e.g.
codebody (string)yes
namebody (string)yes
ratebody (string/null)Percent; only for rules whose rate the company sets (reduced, services)
reason_codebody (string)ZATCA exemption reason (VATEX-SA-…) for zero-rated, exempt, out of scope
sro_schedule_nobody (string)FBR: the SRO that gives this rate

GET /api/tax/parties/{party_code}/profile

A customer's tax profile: registration type and address as the tax authority wants them.

Operation get_party_tax_profile · sends X-Company-Id

FieldWhereRequiredNotes
party_codepathyes

PUT /api/tax/parties/{party_code}/profile

Set a customer's tax profile (only the fields you send change).

Operation set_party_tax_profile · sends X-Company-Id

FieldWhereRequiredNotes
party_codepathyes
registration_typebody (string/null)
provincebody (string/null)
addressbody (string/null)
streetbody (string/null)
building_numberbody (string/null)
districtbody (string/null)
citybody (string/null)
postal_codebody (string/null)
country_codebody (string/null)
crnbody (string/null)
extra_idsbody (object/null)More tax ids the active tax pack asks for (its party_ids keys), e.g.

GET /api/tax/returns

Saved tax return snapshots.

Operation list_tax_returns · sends X-Company-Id

POST /api/tax/returns

Save the working paper of a period as a draft snapshot for a person to check.

Operation create_tax_return_draft · sends X-Company-Id

FieldWhereRequiredNotes
pack_codebody (string)yes
startbody (string)yes
endbody (string)yes

GET /api/tax/returns/working-paper

The tax return working paper of a period: output and input tax by rule, net payable, and anything not mapped to the pack.

Operation get_tax_working_paper · sends X-Company-Id

FieldWhereRequiredNotes
pack_codequeryyes
startqueryyes
endqueryyes

GET /api/tax/returns/{return_id}

One saved tax return snapshot with its figures and history.

Operation get_tax_return · sends X-Company-Id

FieldWhereRequiredNotes
return_idpathyes

POST /api/tax/returns/{return_id}/cancel

Withdraw a draft or confirmed return snapshot, with the reason.

Operation cancel_tax_return · sends X-Company-Id

FieldWhereRequiredNotes
return_idpathyes
reasonbody (string)yes

POST /api/tax/returns/{return_id}/confirm

A PERSON confirms the figures they checked (content_hash = data_hash shown).

Operation confirm_tax_return · sends X-Company-Id

FieldWhereRequiredNotes
return_idpathyes
content_hashbody (string)yesThe hash shown on the draft (summary.content_hash / data_hash): proof you saw this content
statementbody (string)yesYour own words that you checked it, e.g.

POST /api/tax/returns/{return_id}/filed

Write down that a person filed the confirmed return with the authority, with the authority's reference.

Operation mark_tax_return_filed · sends X-Company-Id

FieldWhereRequiredNotes
return_idpathyes
referencebody (string)yes

GET /api/tax/tax-codes

All tax codes of the company and which pack rule each follows.

Operation list_company_tax_codes · sends X-Company-Id

GET /api/tax/withholding-categories

Withholding categories of the company's active tax packs, for deduction lines on receipts and payments (rates are the company's tax adviser's, never ours).

Operation list_withholding_categories · sends X-Company-Id

verify

GET /api/verify-settings

Whether the public verification page of this company's printed documents shows the total.

Operation get_verify_settings · sends X-Company-Id

PUT /api/verify-settings

Show or hide the total on the public verification page (owner or CFO).

Operation set_verify_settings · sends X-Company-Id

FieldWhereRequiredNotes
show_totalbody (boolean)yesShow the document total and currency on the public verification page

POST /api/verify/documents/{doc_id}/revoke

Revoke the public verification code of one printed document, with the reason (owner, CFO or accountant).

Operation revoke_document_verification · sends X-Company-Id

FieldWhereRequiredNotes
doc_idpathyes
reasonbody (string)yes

verticals

GET /api/verticals

The industry sections of this company (Learning now; Community, Laboratory, Hospital later) and whether each is on.

Operation list_verticals · sends X-Company-Id

PUT /api/verticals/{vertical}

Switch an industry section on or off (company owner only).

Operation set_vertical · sends X-Company-Id

FieldWhereRequiredNotes
verticalpathyes
enabledbody (boolean)yes

work

POST /api/work/milestones/{milestone_id}/finish

Mark a milestone done (all its tasks finished), or reopen it.

Operation finish_project_milestone · sends X-Company-Id

FieldWhereRequiredNotes
milestone_idpathyes
reopenbody (boolean)

GET /api/work/projects

Projects as work: people, milestones and task progress (% of tasks done).

Operation list_work_projects · sends X-Company-Id

FieldWhereRequiredNotes
include_closedquery

GET /api/work/projects/{project_id}

One project: people, milestones (at risk when open tasks outnumber the days left) and progress.

Operation get_work_project · sends X-Company-Id

FieldWhereRequiredNotes
project_idpathyes

POST /api/work/projects/{project_id}/members

Add a member to a project as lead or member, or remove them (project lead or owner / CFO / accountant).

Operation set_project_member · sends X-Company-Id

FieldWhereRequiredNotes
project_idpathyes
user_idbody (string)yes
partbody (string)
removebody (boolean)

POST /api/work/projects/{project_id}/milestones

Add a milestone with an optional due date (project lead or owner / CFO / accountant).

Operation add_project_milestone · sends X-Company-Id

FieldWhereRequiredNotes
project_idpathyes
titlebody (string)yes
due_datebody (string/null)

GET /api/work/tasks

Tasks: mine, given by me, my team's (owner / CFO see all; others their projects'), or one project's.

Operation list_work_tasks · sends X-Company-Id

FieldWhereRequiredNotes
scopequery
statusquery
project_idquery
include_snoozedquery

POST /api/work/tasks

Give a task to a member: due date, repeat, escalation, priority, project / milestone, link to any record.

Operation create_work_task · sends X-Company-Id

FieldWhereRequiredNotes
titlebody (string)yes
assignee_idbody (string)yes
detailsbody (string)
due_datebody (string/null)
repeatbody (string)When done, the next one is created by itself
escalate_after_daysbody (integer/null)Still open this many days after the due date -> escalated
escalate_tobody (string/null)Member told on escalation (default: who gave it)
prioritybody (string)
stagebody (string)
project_idbody (string/null)
milestone_idbody (string/null)
ref_typebody (string/null)
ref_idbody (string/null)The record the task is about

GET /api/work/tasks/{task_id}

One task with its plan (repeat, snooze, escalation), project and linked record.

Operation get_work_task · sends X-Company-Id

FieldWhereRequiredNotes
task_idpathyes

POST /api/work/tasks/{task_id}/plan

Change a task you gave: due date, repeat, escalation or priority (a new due date restarts reminders and escalation).

Operation plan_work_task · sends X-Company-Id

FieldWhereRequiredNotes
task_idpathyes
due_datebody (string/null)
repeatbody (string/null)
escalate_after_daysbody (integer/null)
escalate_tobody (string/null)
prioritybody (string/null)
clear_escalationbody (boolean)

POST /api/work/tasks/{task_id}/snooze

Snooze your task until a date (it comes back with a notice); until=null ends the snooze.

Operation snooze_work_task · sends X-Company-Id

FieldWhereRequiredNotes
task_idpathyes
untilbody (string/null)Hide until this date; null ends the snooze

POST /api/work/tasks/{task_id}/stage

Move a task on the board: to do, doing or waiting (mark it done to finish it).

Operation move_work_task · sends X-Company-Id

FieldWhereRequiredNotes
task_idpathyes
stagebody (string)yes

workspace

GET /api/ux/actions/{kind}/{ref_id}

The right-click actions I may use on one record (open, copy link, task, note, share, attach, print, history, ask Star).

Operation get_context_actions · sends X-Company-Id

FieldWhereRequiredNotes
kindpathyes
ref_idpathyes

PUT /api/ux/company/brand

Owner / CFO: the company's brand colour (buttons, highlights) for everyone in the company.

Operation set_company_brand · sends X-Company-Id

FieldWhereRequiredNotes
brandbody (object/null){colour, ink}; words on the brand colour must be 4.5:1; null = standard

PUT /api/ux/company/screens/{screen}

Owner / CFO: make a layout the company default of one screen (null = clear).

Operation set_company_screen_default · sends X-Company-Id

FieldWhereRequiredNotes
screenpathyes
layoutbody (object/null){tiles:[{id,w,h,hidden,colour}], columns:[{id,width,hidden,pin}], collapsed:{group:bool}}; null = standard

GET /api/ux/company/share-limits

The sharing cap in force (own mail account: the company's choice; our system address: our fixed cap, which can only be lowered).

Operation get_share_limits · sends X-Company-Id

PUT /api/ux/company/share-limits

Owner / CFO: how many people one person may mail per hour and the company per day.

Operation set_share_limits · sends X-Company-Id

FieldWhereRequiredNotes
per_user_hourbody (integer/null)recipients one person may mail per hour; empty = no limit (own mail account only)
per_company_daybody (integer/null)recipients the whole company may mail per day; empty = no limit (own mail account only)

POST /api/ux/news/seen

I have read "What's new" up to this release.

Operation mark_whats_new_seen · sends X-Company-Id

FieldWhereRequiredNotes
versionbody (string)yes

GET /api/ux/people

People of this company for the @-mention picker (never anyone outside the company; never me).

Operation list_company_people · sends X-Company-Id

FieldWhereRequiredNotes
qquery

GET /api/ux/screens/{screen}

The layout I see on one screen: mine, else the company default, else the standard.

Operation get_screen_layout · sends X-Company-Id

FieldWhereRequiredNotes
screenpathyes

PUT /api/ux/screens/{screen}

Save MY layout of one screen (cards moved / resized / hidden / coloured, table columns, collapsed groups).

Operation save_screen_layout · sends X-Company-Id

FieldWhereRequiredNotes
screenpathyes
layoutbody (object/null){tiles:[{id,w,h,hidden,colour}], columns:[{id,width,hidden,pin}], collapsed:{group:bool}}; null = standard

POST /api/ux/screens/{screen}/reset

Reset one screen of mine: back to the company default (or the standard).

Operation reset_screen_layout · sends X-Company-Id

FieldWhereRequiredNotes
screenpathyes

POST /api/ux/share

Send it to @people: e-mail a link to a record or screen to people of this company whose role may see it.

Operation share_by_email · sends X-Company-Id

FieldWhereRequiredNotes
kindbody (string)yes
recipientsbody (array)yesCompany people (user ids) from /api/ux/people
ref_kindbody (string/null)document, entry, stock_doc, import_batch, fx_revaluation, party, item, account, ...
ref_idbody (string/null)
pathbody (string/null)For kind=screen: the screen path, e.g.
notebody (string)

GET /api/ux/suggest

Suggest me: the next best actions for me on this screen, each counted from the company's real records just now.

Operation suggest_next_actions · sends X-Company-Id

FieldWhereRequiredNotes
screenquery

PUT /api/ux/theme

My look: light / dark, density, text and background colour (must stay readable), accent colour.

Operation set_my_theme · sends X-Company-Id

FieldWhereRequiredNotes
themebody (object/null){mode, density, text, background, accent}; text on background must be 4.5:1; null = standard

GET /api/ux/workspace

My theme, my screen layouts, the company's brand colour and default layouts, and whether I may change the company's.

Operation get_my_workspace · sends X-Company-Id