API reference · version 1
Webhooks
Subscribe a URL to events (REST hooks for Zapier, Make and n8n).
Receiving webhooks
Add an endpoint in Settings → Webhooks (people with the right to change settings), or subscribe through the API with a key that has the webhooks:manage scope (below). For each event, OmniBooks sends an HTTPS POST with a JSON body to your address. Answer with any 2xx status within 10 seconds; do slow work after answering.
X-OmniBooks-Event: the event type, e.g.invoice.posted.X-OmniBooks-Event-Id: the event's id, the same on every retry and resend. Use it to ignore repeats.X-OmniBooks-Delivery: this attempt's delivery id (shown in the delivery log).X-OmniBooks-Signature:t=<unix seconds>,v1=<hex HMAC-SHA256>.
{
"id": "cmevt7f3k2q9x1",
"type": "invoice.posted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"…": "the invoice, exactly as GET /invoices/{id} returns it"
}
}data is the record as it was when the event happened (read in the same transaction as the change), in the same shape the API returns. A later change sends its own event; to be sure of the latest state, read the record with the API.
Checking the signature
Every endpoint has its own signing secret (whsec_…), shown once when the endpoint is made or when you make a new one. Compute HMAC-SHA256 with the secret over the timestamp, a full stop and the raw body (<t>.<body>), compare it with v1 in constant time, and refuse messages whose timestamp is more than five minutes from your clock. Use the exact bytes received: parsing and re-encoding the JSON changes them.
import crypto from "node:crypto";
import express from "express";
const app = express();
const SECRET = process.env.OMNIBOOKS_WEBHOOK_SECRET; // whsec_…
// Read the raw body: the signature is over the exact bytes sent.
app.post("/omnibooks/webhook", express.raw({ type: "application/json" }), (req, res) => {
const header = req.get("X-OmniBooks-Signature") ?? "";
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const t = Number(parts.t);
const expected = crypto.createHmac("sha256", SECRET).update(`${t}.${req.body}`).digest("hex");
const ok = parts.v1 && parts.v1.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(parts.v1, "hex"), Buffer.from(expected, "hex"));
if (!ok || Math.abs(Date.now() / 1000 - t) > 300) return res.status(400).send("bad signature");
const event = JSON.parse(req.body);
// Ignore repeats: the same event.id can arrive more than once.
// ...store event.id, then do the work (or queue it) ...
res.status(200).send("ok"); // answer 2xx within 10 seconds
});import hashlib, hmac, json, os, time
from flask import Flask, request, abort
app = Flask(__name__)
SECRET = os.environ["OMNIBOOKS_WEBHOOK_SECRET"].encode()
@app.post("/omnibooks/webhook")
def omnibooks_webhook():
body = request.get_data() # the raw bytes
parts = dict(p.split("=", 1) for p in request.headers.get("X-OmniBooks-Signature", "").split(",") if "=" in p)
t = parts.get("t", "0")
expected = hmac.new(SECRET, f"{t}.".encode() + body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, parts.get("v1", "")) or abs(time.time() - int(t)) > 300:
abort(400)
event = json.loads(body)
# ...ignore an event.id you have already handled, then do the work...
return "ok", 200<?php
$secret = getenv('OMNIBOOKS_WEBHOOK_SECRET');
$body = file_get_contents('php://input'); // the raw bytes
$parts = [];
foreach (explode(',', $_SERVER['HTTP_X_OMNIBOOKS_SIGNATURE'] ?? '') as $p) {
[$k, $v] = array_pad(explode('=', $p, 2), 2, '');
$parts[$k] = $v;
}
$t = (int) ($parts['t'] ?? 0);
$expected = hash_hmac('sha256', $t . '.' . $body, $secret);
if (!hash_equals($expected, $parts['v1'] ?? '') || abs(time() - $t) > 300) {
http_response_code(400);
exit('bad signature');
}
$event = json_decode($body, true);
// ...ignore an event id you have already handled, then do the work...
http_response_code(200);
echo 'ok';Retries, order and switching off
- Anything but a 2xx answer (a timeout, a connection error, a redirect: redirects are not followed) is retried after 1 minute, 5 minutes, 15 minutes, 1 hour, 3 hours, 6 hours, 12 hours, then every 12 hours, until three days after the event. Then the delivery is marked failed; you can send it again from the delivery log.
- An endpoint whose deliveries have all failed for three days is switched off, and the people who manage settings are told. Switch it back on in Settings → Webhooks once it works.
- Events are usually sent within seconds, oldest first, but order is not guaranteed and an event can arrive twice. Compare
createdAtor the record'supdatedAt, and keep the event ids you have handled. - Paused endpoints keep their events for up to three days and receive them when switched back on.
- Webhooks go only to
https://addresses that resolve to public IP addresses. Live demos send no webhooks. - The delivery log (Settings → Webhooks → Deliveries) keeps 30 days: each attempt's status, your answer's first 500 characters and the body sent. Send test sends a
webhook.testevent with"test": true.
What an endpoint receives
An endpoint acts as the member who added it (or, through the API, the key's member). An event is sent only while that member may see the record: the right permission, the app installed, and, for members limited to some branches, a record in one of their branches. CRM events need the right to see every deal and lead. Subscriptions made with a key also need the key's read scope for each event, and stop when the key is revoked. Items and contacts imported from a file, and changes made by the system in bulk, send no item or contact events.
Events
Subscribing to * in Settings also receives events added later. New fields may be added to data; ignore fields you don't know.
Contacts
contact.created · Contact created
A customer, supplier or address-book contact was added (on screen, by import, through the API or from a lead).
{
"id": "cmevt7f3k2q9x1",
"type": "contact.created",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}contact.updated · Contact changed
A contact's details were saved.
{
"id": "cmevt7f3k2q9x1",
"type": "contact.updated",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"code": "C-0042",
"name": "Gulf Star Trading LLC",
"kind": "INVOICE",
"legalName": null,
"isCustomer": true,
"isSupplier": false,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"taxRegistrationNumber": null,
"addressLine1": null,
"addressLine2": null,
"city": null,
"postalCode": null,
"poBox": null,
"buildingNumber": null,
"district": null,
"countryCode": "OM",
"paymentTermsDays": 30,
"creditLimit": "105.000",
"currency": "OMR",
"notes": null,
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"people": [
{
"id": "cmabc123def456",
"name": "Gulf Star Trading LLC",
"jobTitle": null,
"email": "accounts@gulfstar.example",
"phone": "+968 2412 3456",
"mobile": null,
"isPrimary": false
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}Items
item.created · Item created
A product or service was added.
{
"id": "cmevt7f3k2q9x1",
"type": "item.created",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"sku": "TILE-60",
"name": "Gulf Star Trading LLC",
"nameAr": null,
"description": "Ceramic floor tile 60×60",
"type": "GOODS",
"trackInventory": false,
"unitCode": "H87",
"barcode": null,
"category": null,
"salesPrice": "105.000",
"retailPrice": "105.000",
"purchasePrice": "105.000",
"salesTaxCodeId": "cmabc123def456",
"purchaseTaxCodeId": "cmabc123def456",
"revenueAccountId": "cmabc123def456",
"purchaseAccountId": "cmabc123def456",
"onHand": "105.000",
"averageCost": "105.000",
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}item.updated · Item changed
An item's details or prices were saved (not stock movements).
{
"id": "cmevt7f3k2q9x1",
"type": "item.updated",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"sku": "TILE-60",
"name": "Gulf Star Trading LLC",
"nameAr": null,
"description": "Ceramic floor tile 60×60",
"type": "GOODS",
"trackInventory": false,
"unitCode": "H87",
"barcode": null,
"category": null,
"salesPrice": "105.000",
"retailPrice": "105.000",
"purchasePrice": "105.000",
"salesTaxCodeId": "cmabc123def456",
"purchaseTaxCodeId": "cmabc123def456",
"revenueAccountId": "cmabc123def456",
"purchaseAccountId": "cmabc123def456",
"onHand": "105.000",
"averageCost": "105.000",
"isActive": true,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}Sales
invoice.posted · Invoice posted
A sales invoice was posted (it has its number and is in the ledger), including invoices made at the till for account sales.
{
"id": "cmevt7f3k2q9x1",
"type": "invoice.posted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}invoice.voided · Invoice voided
A posted sales invoice was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "invoice.voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}credit_note.posted · Credit note posted
A customer credit note was posted.
{
"id": "cmevt7f3k2q9x1",
"type": "credit_note.posted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}credit_note.voided · Credit note voided
A customer credit note was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "credit_note.voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}debit_note.posted · Debit note posted
A sales debit note was posted.
{
"id": "cmevt7f3k2q9x1",
"type": "debit_note.posted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}debit_note.voided · Debit note voided
A sales debit note was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "debit_note.voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}quotation.accepted · Quotation accepted
A quotation was accepted (on screen, online by the customer, or through the API). data is the quotation.
{
"id": "cmevt7f3k2q9x1",
"type": "quotation.accepted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"reference": null,
"notes": null,
"currency": "OMR",
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"quoteId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000",
"lineNumber": 1,
"invoicedQty": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}sales_order.confirmed · Sales order confirmed
A sales order was confirmed, including orders made by accepting a quotation.
{
"id": "cmevt7f3k2q9x1",
"type": "sales_order.confirmed",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"reference": null,
"notes": null,
"currency": "OMR",
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"quoteId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000",
"lineNumber": 1,
"invoicedQty": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}Payments
payment.received · Payment received
A customer receipt was recorded.
{
"id": "cmevt7f3k2q9x1",
"type": "payment.received",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"direction": "SALES",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"paymentDate": "2026-12-05",
"bankAccountId": "cmabc123def456",
"amount": "105.000",
"unallocated": "105.000",
"currency": "OMR",
"exchangeRate": "1",
"reference": null,
"method": null,
"notes": null,
"branchId": "cmabc123def456",
"allocations": [
{
"documentId": "cmabc123def456",
"documentNumber": null,
"amount": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"voidedAt": null
}
}payment.received_voided · Receipt voided
A customer receipt was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "payment.received_voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"direction": "SALES",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"paymentDate": "2026-12-05",
"bankAccountId": "cmabc123def456",
"amount": "105.000",
"unallocated": "105.000",
"currency": "OMR",
"exchangeRate": "1",
"reference": null,
"method": null,
"notes": null,
"branchId": "cmabc123def456",
"allocations": [
{
"documentId": "cmabc123def456",
"documentNumber": null,
"amount": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"voidedAt": null
}
}payment.made · Supplier payment made
A payment to a supplier was recorded.
{
"id": "cmevt7f3k2q9x1",
"type": "payment.made",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"direction": "SALES",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"paymentDate": "2026-12-05",
"bankAccountId": "cmabc123def456",
"amount": "105.000",
"unallocated": "105.000",
"currency": "OMR",
"exchangeRate": "1",
"reference": null,
"method": null,
"notes": null,
"branchId": "cmabc123def456",
"allocations": [
{
"documentId": "cmabc123def456",
"documentNumber": null,
"amount": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"voidedAt": null
}
}payment.made_voided · Supplier payment voided
A supplier payment was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "payment.made_voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"direction": "SALES",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"paymentDate": "2026-12-05",
"bankAccountId": "cmabc123def456",
"amount": "105.000",
"unallocated": "105.000",
"currency": "OMR",
"exchangeRate": "1",
"reference": null,
"method": null,
"notes": null,
"branchId": "cmabc123def456",
"allocations": [
{
"documentId": "cmabc123def456",
"documentNumber": null,
"amount": "105.000"
}
],
"createdAt": "2026-11-30T08:15:00.000Z",
"voidedAt": null
}
}Purchases
bill.posted · Bill posted
A supplier bill, supplier credit or supplier debit note was posted (data.kind says which).
{
"id": "cmevt7f3k2q9x1",
"type": "bill.posted",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}bill.voided · Bill voided
A supplier bill, credit or debit note was voided.
{
"id": "cmevt7f3k2q9x1",
"type": "bill.voided",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"kind": "INVOICE",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"issueDate": "2026-11-30",
"dueDate": "2026-12-30",
"supplyDate": null,
"reference": null,
"notes": null,
"currency": "OMR",
"exchangeRate": "1",
"pricesIncludeTax": false,
"subtotal": "105.000",
"taxTotal": "105.000",
"total": "105.000",
"amountDue": "105.000",
"totalBase": "105.000",
"originalDocumentId": null,
"salesOrderId": null,
"purchaseOrderId": null,
"branchId": "cmabc123def456",
"customFields": {
"delivery_slot": "Morning"
},
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountPercent": "text",
"unitCode": "H87",
"accountId": "cmabc123def456",
"taxCodeId": "cmabc123def456",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000"
}
],
"postedAt": "2026-11-30T08:16:00.000Z",
"voidedAt": null,
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}Point of sale
pos.sale.completed · Till sale completed
A till sale or return was completed online, or an offline sale reached the server. Sent when the sale completes, not when the shift posts.
{
"id": "cmevt7f3k2q9x1",
"type": "pos.sale.completed",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"receiptNumber": null,
"registerId": "cmabc123def456",
"branchId": "cmabc123def456",
"completedAt": null,
"businessDate": "2026-11-30",
"offline": false,
"currency": "OMR",
"contactId": "cmabc123def456",
"customerName": null,
"cashierName": "text",
"subtotal": "105.000",
"taxTotal": "105.000",
"discountTotal": "105.000",
"total": "105.000",
"invoiceId": "cmabc123def456",
"lines": [
{
"lineNumber": 1,
"productId": "cmabc123def456",
"description": "Ceramic floor tile 60×60",
"quantity": "105.000",
"unitPrice": "105.000",
"discountAmount": "105.000",
"netAmount": "105.000",
"taxAmount": "105.000",
"totalAmount": "105.000",
"lineType": "text"
}
],
"payments": [
{
"type": "text",
"amount": "105.000",
"reference": null
}
]
}
}CRM
crm.lead.created · Lead created
A lead was added (on screen, by import, from a form, webhook, email, WhatsApp or SMS).
{
"id": "cmevt7f3k2q9x1",
"type": "crm.lead.created",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"name": "Gulf Star Trading LLC",
"companyName": null,
"jobTitle": null,
"phone": "+968 2412 3456",
"email": "accounts@gulfstar.example",
"status": "POSTED",
"source": null,
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"taxNumber": null,
"budget": null,
"notes": null,
"externalRef": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}crm.deal.won · Deal won
A deal was marked won (by a person or by a confirmed order).
{
"id": "cmevt7f3k2q9x1",
"type": "crm.deal.won",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"title": "text",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"stage": "text",
"pipeline": "text",
"currency": "OMR",
"expectedValue": null,
"expectedClose": null,
"wonValue": null,
"wonCurrency": null,
"wonVia": null,
"wonOrderId": "cmabc123def456",
"wonAt": null,
"lostAt": null,
"lostReason": null,
"competitor": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}crm.deal.lost · Deal lost
A deal was marked lost.
{
"id": "cmevt7f3k2q9x1",
"type": "crm.deal.lost",
"createdAt": "2026-11-30T08:16:00.000Z",
"workspaceId": "o34184086a7295a25f3702f2d",
"companyId": "cmcompany123",
"data": {
"id": "cmabc123def456",
"number": "INV-2026-00042",
"title": "text",
"status": "POSTED",
"contactId": "cmabc123def456",
"contactName": "Gulf Star Trading LLC",
"ownerId": "cmabc123def456",
"branchId": "cmabc123def456",
"stage": "text",
"pipeline": "text",
"currency": "OMR",
"expectedValue": null,
"expectedClose": null,
"wonValue": null,
"wonCurrency": null,
"wonVia": null,
"wonOrderId": "cmabc123def456",
"wonAt": null,
"lostAt": null,
"lostReason": null,
"competitor": null,
"customFields": {
"delivery_slot": "Morning"
},
"createdAt": "2026-11-30T08:15:00.000Z",
"updatedAt": "2026-11-30T08:15:00.000Z"
}
}Building on Zapier, Make or n8n? Use the subscription endpoints below (REST hooks). See also the API guide.
Subscription endpoints
- GET
/webhooks/eventsList event types - GET
/webhooksList this key's subscriptions - POST
/webhooksSubscribe a URL - GET
/webhooks/{id}Get a subscription - DELETE
/webhooks/{id}Unsubscribe
List event types
GET/api/v1/webhooks/events
Every event a webhook can receive, with the read scope a subscription needs. Any valid key.
Example
curl "https://your-workspace.omnibooks.online/api/v1/webhooks/events" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"data": [
{
"type": "text",
"label": "Delivery slot",
"group": "text",
"scope": "text",
"description": "Ceramic floor tile 60×60"
}
]
}Answer fields
| Field | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].typerequired | string | GOODS or SERVICE. |
| data[].labelrequired | string | |
| data[].grouprequired | string | |
| data[].scoperequired | string | |
| data[].descriptionrequired | string | What is sold or bought, as printed. |
List this key's subscriptions
GET/api/v1/webhooks
The webhook subscriptions made with this key (subscriptions made in Settings are not listed).
Example
curl "https://your-workspace.omnibooks.online/api/v1/webhooks" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"data": [
{
"id": "cmabc123def456",
"url": "text",
"description": "Ceramic floor tile 60×60",
"events": [
"text"
],
"status": "POSTED",
"secret": "text",
"createdAt": "2026-11-30T08:15:00.000Z"
}
]
}Answer fields
| Field | Type | Description |
|---|---|---|
| datarequired | array of object | |
| data[].idrequired | string | An OmniBooks id. |
| data[].urlrequired | string | |
| data[].descriptionrequired | string | What is sold or bought, as printed.may be null |
| data[].eventsrequired | array of string | Event types, or * for every event. |
| data[].statusrequired | enum | one of ACTIVE, PAUSED, DISABLED |
| data[].secret | string | Only in the answer to POST /webhooks: keep it to check signatures. It is never shown again. |
| data[].createdAtrequired | string | An instant, ISO 8601 in UTC. |
Subscribe a URL
POST/api/v1/webhooks
Starts sending events to url (https, a public address). events lists event types, or ["*"] for every event the key's read scopes cover; the key needs the read scope of each event (e.g. sales:read for invoice.posted). The answer carries the signing secret once: keep it to check the X-OmniBooks-Signature header. Events reach the subscription only while the key's member may see the record.
Body
| Field | Type | Description |
|---|---|---|
| urlrequired | string | at least 1 characters · at most 500 characters |
| description | string | What is sold or bought, as printed.at most 200 characters · may be null |
| eventsrequired | array of string |
Example
curl -X POST "https://your-workspace.omnibooks.online/api/v1/webhooks" \
-H "Authorization: Bearer $OMNIBOOKS_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"url": "https://hooks.zapier.com/hooks/standard/123456/abcdef/",
"events": [
"invoice.posted",
"payment.received"
],
"description": "Zapier: new invoices"
}'{
"id": "cmabc123def456",
"url": "text",
"description": "Ceramic floor tile 60×60",
"events": [
"text"
],
"status": "POSTED",
"secret": "text",
"createdAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| urlrequired | string | |
| descriptionrequired | string | What is sold or bought, as printed.may be null |
| eventsrequired | array of string | Event types, or * for every event. |
| statusrequired | enum | one of ACTIVE, PAUSED, DISABLED |
| secret | string | Only in the answer to POST /webhooks: keep it to check signatures. It is never shown again. |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
Errors this endpoint may answer
422 TOO_MANY_ENDPOINTS: The company already has 25 webhook endpoints.
Get a subscription
GET/api/v1/webhooks/{id}
One subscription made with this key.
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Example
curl "https://your-workspace.omnibooks.online/api/v1/webhooks/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"{
"id": "cmabc123def456",
"url": "text",
"description": "Ceramic floor tile 60×60",
"events": [
"text"
],
"status": "POSTED",
"secret": "text",
"createdAt": "2026-11-30T08:15:00.000Z"
}Answer fields
| Field | Type | Description |
|---|---|---|
| idrequired | string | An OmniBooks id. |
| urlrequired | string | |
| descriptionrequired | string | What is sold or bought, as printed.may be null |
| eventsrequired | array of string | Event types, or * for every event. |
| statusrequired | enum | one of ACTIVE, PAUSED, DISABLED |
| secret | string | Only in the answer to POST /webhooks: keep it to check signatures. It is never shown again. |
| createdAtrequired | string | An instant, ISO 8601 in UTC. |
Unsubscribe
DELETE/api/v1/webhooks/{id}
Stops the subscription and removes it with its delivery log. Only subscriptions made with this key.
Path
| Field | Type | Description |
|---|---|---|
| idrequired | string | The record's id. |
Example
curl -X DELETE "https://your-workspace.omnibooks.online/api/v1/webhooks/<id>" \
-H "Authorization: Bearer $OMNIBOOKS_KEY"Answers 204 with no body.