BahiOne API
Read and write a business's books from your own software: contacts, items, invoices, bills, payments and reports, and webhooks when things happen. The API is part of the Professional Plus plan.
Getting started
- An owner or admin makes a key in Settings → API, read-only or read and write. The key acts as the person who made it, with their role; it stops working if they leave.
- Send it on every request:
Authorization: Bearer ick_… - JSON over HTTPS. Money is a string with 2 decimals (
"11800.00"); dates areYYYY-MM-DD. - Up to 120 requests a minute per key; more gets
429. - Errors come back as
{ "error": "…" }with status 400, 401 (key), 402 (plan), 403 (role or read-only key), 404, 422 (checks, withissues) or 429. - Every call is logged for the business (Settings → API, kept 90 days; no request or response bodies).
- The whole API as OpenAPI 3.1: /api/v1/openapi.json (import it into Postman or your code generator).
Endpoints
Business
GET /api/v1/organization: The business the key belongs to.GET /api/v1/accounts: Chart of accounts (ids for invoice lines and deposits).
Contacts
GET /api/v1/contacts: Customers and vendors, paged. Query:type(customer or vendor)q(Search by name, GSTIN or email)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))GET /api/v1/contacts/{id}: One contact, with outstanding, overdue and unused credits.POST /api/v1/contacts: Create a customer or vendor (the same checks as the screen).{ "type": "customer", "name": "ZZ Traders", "gstin": "29ABCDE1234F1Z5", "email": "accounts@example.com" }
Items
GET /api/v1/items: Items, paged. Query:q(Search by name or SKU)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))GET /api/v1/items/{id}: One item, with stock on hand.POST /api/v1/items: Create an item.{ "name": "Installation", "type": "SERVICE", "sale_price": "1500", "gst_rate": 18, "hsn_sac": "998719" }
Invoices
GET /api/v1/invoices: Invoices, paged. Query:status(DRAFT, OPEN, PARTIALLY_PAID, PAID or VOID)customer_id(One customer's)from(From this date, YYYY-MM-DD)to(Up to this date, YYYY-MM-DD)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))GET /api/v1/invoices/{id}: One invoice with its lines, and the TDS the customer is expected to deduct (expected_tds).POST /api/v1/invoices: Create a draft, or approve it with "approve": true (approval rules and locks apply).{ "customer_id": "…", "date": "2026-12-01", "approve": true, "lines": [ { "item_id": "…", "quantity": 2 }, { "description": "Installation", "rate": "1500", "gst_rate": 18 } ] }
Payments
GET /api/v1/payments-received: Customer payments, paged. Query:customer_id(One customer's)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))POST /api/v1/payments-received: Record a customer payment and apply it to invoices; the rest is an advance.{ "customer_id": "…", "date": "2026-12-05", "amount": "11800", "deposit_account_id": "…", "apply_to": [ { "invoice_id": "…", "amount": "11800" } ] }GET /api/v1/payments-made: Payments to vendors, paged. Query:vendor_id(One vendor's)from(From this date, YYYY-MM-DD)to(Up to this date, YYYY-MM-DD)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))
Bills
GET /api/v1/bills: Bills, paged. Query:status(OPEN, PARTIALLY_PAID, PAID or VOID)vendor_id(One vendor's)from(From this date, YYYY-MM-DD)to(Up to this date, YYYY-MM-DD)page(Page number, from 1)per_page(Results per page, up to 200 (default 50))
Reports
GET /api/v1/reports: The reports the API can run, with the dates each takes.GET /api/v1/reports/{key}: A report as on the screen: columns, then rows of cells (e.g. profit-and-loss, balance-sheet, trial-balance, aged receivables). Query:from(From this date, YYYY-MM-DD)to(Up to this date, YYYY-MM-DD)as_of(For reports on a date (balance sheet), YYYY-MM-DD)basis(accrual (default) or cash, where the report offers it)
Webhooks
In Settings → Workflows, a rule can send a webhook (an HTTPS POST of JSON) when one of these happens, if its conditions match:
invoice.created: An invoice is saved.invoice.approved: An invoice is approved.invoice.paid: An invoice is paid in full.invoice.overdue: An invoice is overdue by the days set on the rule.bill.recorded: A bill is recorded.payment.received: A customer payment is recorded.quote.accepted: A quote is accepted.
The body: { event, orgId, entity, id, number, date, amount, party: { id, name }, branchId, url }. Headers: X-Infocean-Event and X-Infocean-Signature: sha256=<hex>, the HMAC-SHA256 of the raw body with the rule's secret (shown on the rule). Answer within 8 seconds with a 2xx; each rule runs once per record.