Skip to content
Anzma module

Accounting ERP API: connect your accounting software to any system with REST and signed webhooks

A token with only the scopes you pick, a documented REST API that creates invoices and reads stock and bookings, and signed webhooks that tell your system about every event.

Last updated: 7 min readBe the first to rate this page
Accounting ERP API: connect your accounting software to any system with REST and signed webhooks

In short

Anzma’s API is a REST interface documented in OpenAPI, working with scoped access tokens and HMAC-signed webhooks, to connect Anzma to stores, apps and partner systems without re-keying data. It suits developers and integrators, and comes with the Comprehensive and Enterprise plans or as a paid add-on on the others.

Who is it for?

  • Online stores
  • Trading and wholesale companies
  • Software houses and integrators
  • Companies with their own app
  • IT teams
Interface
JSON REST on version v1, with 68 operations
Authentication
Anzma bearer token, shown once and never beyond its creator’s permissions
Documentation
A public OpenAPI 3.1 file and an in-app developer docs page
Webhooks
15 events with HMAC-SHA256 signing and automatic retries
Rate limit
120 requests per minute per token by default
Plans
Comprehensive and Enterprise, or a paid add-on on Basic and Advanced

What you get, at a glance

  • Scoped tokens

    Create a token with a name, the scopes you pick, an IP allow-list and an expiry. It never gets more than its creator holds, and you revoke it in one click.

  • OpenAPI docs

    An OpenAPI 3.1 specification generated from the code itself so it does not go stale, plus an in-app docs page with examples and a changelog.

  • Invoices, receipts and notes

    Create a draft invoice and the server computes prices, taxes and totals; issue or cancel it, and record a receipt and allocate it to invoices.

  • Bookings with live availability

    Read free start times for a service on a date, create the booking after the slot is re-checked and locked, and cancel it under the deposit policy.

  • Signed webhooks

    Subscribe to invoice, receipt, booking, stock and payment events; each message carries a timestamped signature you verify.

  • Retries and replay

    If your system is unreachable Anzma retries at growing intervals and keeps a delivery log you can replay from in one click.

  • Safe retries on writes

    Send an Idempotency-Key and a retry after a network drop returns the first response instead of a duplicate invoice.

  • Per-token rate limit

    A per-minute limit applies to each token; a token can lower it but never raise it above your plan, and response headers tell your client what is left.

Inside the product

API tokens and webhooksAn illustrative screen of token and subscription settings, not real data.
On this page
Section 01

What can you connect through the API?

Anything that speaks HTTP and JSON: your online store, a mobile app for your company, a booking website, a dashboard or a partner’s system. People search for it as “ERP integration for e-commerce” or “accounting software API”. It runs on the data of sales and invoicing software, customer accounts software, appointment booking software and the books of general ledger software, so you never need a second copy of your data.

You should know it is an interface for a developer who writes the connection, not a set of ready connectors. There is no prebuilt plugin for store platforms and no Zapier link, so your team or an integrator you hire writes the code that calls the API and receives the webhooks. If you have no development capacity, book a meeting and we will tell you honestly whether an integration is worth it.

API resources: what you can read and what you can write
ResourceReadWrite
ContactsList and detailCreate, update, delete one with no history
Products and stockProducts, services, stock per warehouse, price listsRead only
QuotationsList and detail with linesCreate a draft, send, PDF link
InvoicesList, detail, customer page linkDraft, edit, delete, issue, cancel
Receipts and notesList and detailReceipt, allocate, cancel; credit or debit note and posting
PurchasesPurchase orders, bills, supplier paymentsDraft purchase order and bill
BookingsAvailability, bookings, services, resourcesCreate and cancel a booking
Employees and attendanceEmployees and punchesRecord a punch like a time clock
AccountingJournal entries and trial balanceRead only
WebhooksEvents, subscriptions, delivery logCreate, edit, replay
Section 02

How do access tokens work and how are they protected?

A company admin creates a token in the API settings with a name and the scopes they choose, plus an optional IP allow-list and expiry. The full token appears once and starts with anz_; Anzma stores only its hash, so it cannot be recovered and a lost token is replaced by a new one. It is Anzma’s own token scheme, not Sanctum or another package.

A token’s scopes are the permissions of the user who created it, no more, and only for modules enabled in your company. Someone who cannot issue invoices cannot hand that scope to a token. A revoked, expired or out-of-range token is rejected with a clear error instead of being ignored, and each token records its last use and daily request count.

  • One token per integration, so you can revoke the store without stopping the app.
  • Choose the narrowest scopes that work: a store that reads stock and writes invoices does not need accounting.
  • Restrict the token to your server’s address when it is fixed.
  • The default is 120 requests per minute per token; a token can lower it but not raise it above your plan.
Section 03

What do a request and a response look like?

Every request carries an Authorization: Bearer header and returns JSON. Money is a decimal string rather than a floating-point number so no fraction is lost, dates are ISO 8601, and error messages come in Arabic or English per the Accept-Language header. Errors share one format with a text code such as plan_required, insufficient_scope or invalid_filter.

Lists use cursor pagination rather than page numbers: pass page[size] from 1 to 100 and page[after] from the previous response. Filters and sorting accept a whitelist per resource, and a filter outside it returns a 422 instead of being silently ignored. When you create an invoice you send its lines and the server computes prices, taxes and totals, so you never trust the client’s arithmetic.

Each response returns X-Request-Id and X-Api-Version headers; quote the first when you write to us about a specific request and we trace it in the log. A path for a module that is off in your company, or one your token’s scopes do not cover, returns a 403 naming the missing scope, so you know what to add instead of guessing.

  1. 1

    Create the token

    In the API settings, and keep it on your server only.

  2. 2

    Create a draft invoice

    POST to invoices with an Idempotency-Key; the server computes the totals.

  3. 3

    Issue the invoice

    POST to invoices/{id}/issue; it posts to the ledger and locks.

  4. 4

    Get the customer link

    GET pdf-link for the invoice page and PDF link.

  5. 5

    Receive the payment

    Subscribe to invoice.paid or payment.online_succeeded and get a message when it is settled.

Section 04

What happens if the connection drops mid-request?

Send an Idempotency-Key with a unique value of your own on each POST. Anzma stores the first successful response for that key for 24 hours, and a repeat with the same key returns the same response plus an Idempotent-Replayed header, without creating a second invoice. If a duplicate arrives while the first is still running, you get a 409 with a Retry-After header. Attendance punches ignore duplicates on their own.

Section 05

What are the webhook events and how do I verify their signature?

A webhook is a POST that Anzma sends to an address you set when an event happens, so your system does not have to ask every minute. You create a subscription with a name, a URL and events, and receive the signing secret once; later you can rotate it or send a test event. The URL must be http or https and resolve to public addresses, so Anzma refuses one that points at an internal network. A message is created only after the operation has committed, so you never get an invoice that is then rolled back.

Each request carries the headers X-Anzma-Event, X-Anzma-Event-Id, X-Anzma-Delivery, X-Anzma-Timestamp and X-Anzma-Signature. The signature is sha256= followed by an HMAC-SHA256 over the string “timestamp, a dot, then the raw request body” using the subscription secret. Compute it yourself, compare in constant time, and reject the message if the timestamp is more than five minutes off so a captured old message cannot be replayed. Store the event ID to skip any you have already handled.

Available webhook events
EventWhen it firesModule
invoice.issued / invoice.paid / invoice.cancelledAn invoice is issued, fully paid or cancelledSales
credit_note.postedA credit or debit note is postedSales
receipt.createdA receipt is createdSales
quotation.acceptedA customer accepts a quotationSales
purchase_bill.issuedA purchase bill is issuedPurchases
booking.created / cancelled / completedA booking is created, cancelled or completedBookings
stock.lowAn item reaches its reorder levelWarehouses
payment.online_succeededAn online payment succeedsPayment gateways
employee.created / contact.createdAn employee or contact is addedEmployees and contacts
membership.renewedA membership is renewedMemberships
Section 06

What happens if my system is unreachable?

A delivery counts as successful when your server answers with a 2xx code. Otherwise Anzma retries after one minute, five minutes, half an hour, two hours and six hours, for six attempts in all. If failures keep coming on a subscription past a count the company admin sets, ten by default, Anzma disables it and sends a notification, and pending deliveries are marked failed. You fix the address and re-enable the subscription.

Each subscription has a delivery log with the response code, time, an excerpt of the reply and the error cause, and you can replay any delivery with the same event ID. Old log rows are deleted after thirty days.

Section 07

How does an online store connect to Anzma in practice?

An illustrative example for a store that sells through its own site and keeps its books in Anzma. The store’s developer creates a token with only the scopes to read stock and create invoices and receipts. For every paid order the site creates a draft invoice with the order number as the idempotency key, issues it, then records the receipt and allocates it, so the accountant sees the order in the books without anyone typing it.

In the other direction the site reads per-warehouse stock from the stock-levels endpoint to show what is available, and subscribes to stock.low to hide an item when it reaches its reorder level. It subscribes to invoice.paid to change an order’s status in the store when the customer pays from the invoice link. The sales record stays single, in Anzma, and the store remains a front end for browsing and ordering rather than a second source of truth.

None of this replaces testing on a separate company before go-live. Your team checks signature verification, failure cases and retries, then moves to the live company with a fresh token.

Section 08

Where is the documentation, and is the API on every plan?

The OpenAPI 3.1 specification lives at /api/v1/openapi.json on your company’s own domain, open without a token, and imports into any tool that supports the standard maintained by the OpenAPI Initiative. Inside the app a developer docs page in Arabic and English covers authentication, curl examples, the changelog and how to verify the signature.

The API and webhooks are a feature of the Comprehensive and Enterprise plans. On Basic and Advanced they are added as a paid add-on, with the price on the pricing page. If your plan does not include the API, a request returns a 402 plan_required error. What is not built yet: no OAuth, no sandbox tokens in a separate test environment, and no ETag for conditional updates. For testing, use a separate test company.

Section 09

Who benefits from the API?

Anyone who sells or books outside the Anzma screens. ecommerce management software pulls store orders in as invoices and reads stock, wholesale management software can connect a trade-order portal, and IT services management software builds integrations for its own clients. No industry template turns the API on by itself because it is a plan feature, so you request it when you need it.

For a broader view of choosing business software read the ERP selection guide, and for a walkthrough of your own integration scenario book an online meeting.

Frequently asked questions

Is there an API in Anzma?

Yes, a JSON REST API on version one with 68 operations covering contacts, products and stock, quotations, invoices, receipts, purchases, bookings, employees, accounting and webhooks, documented in OpenAPI 3.1.

What can I connect?

Any system that can call HTTP: an online store, an app, a booking site or a dashboard. You create invoices, quotations, receipts and bookings and read stock and journal entries. There are no ready connectors for store platforms, so the integration is written.

How are access tokens protected?

A token is shown once and only its hash is stored, its scopes never exceed its creator’s permissions, it can be limited by IP address and expiry, you can revoke it at any time, and each token has a per-minute request limit.

How do I verify a webhook signature?

Compute HMAC-SHA256 over the timestamp, a dot, then the raw request body, using the subscription secret, and compare it in constant time with the value after sha256= in the X-Anzma-Signature header. Reject the message if the timestamp is more than five minutes off.

Where is the documentation?

The public OpenAPI 3.1 specification at /api/v1/openapi.json on your company’s domain opens without a token and imports into developer tools. There is also a developer docs page inside the app in Arabic and English with curl examples and a changelog.

Is the API available on every plan?

The API and webhooks are a feature of the Comprehensive and Enterprise plans. On Basic and Advanced they come as a paid add-on you enable for your company, and without one a request returns a 402 plan_required error. See the pricing page for details.

What if I resend a create-invoice request?

Send a unique Idempotency-Key on every POST, such as your store’s order number. Repeating the request with the same key within 24 hours returns the first response with an Idempotent-Replayed header, and no duplicate invoice is created.

What happens when a delivery fails?

Anzma retries after one minute, five minutes, half an hour, two hours and six hours, then marks the delivery failed. Repeated failures disable the subscription after a limit the admin sets and send a notification; you replay from the delivery log by the same event ID.

Does it support OAuth or a sandbox?

No. Authentication today is Anzma’s own bearer token, created in the company settings. There is no OAuth, no sandbox tokens in a separate test environment and no ETag for conditional updates. We suggest a separate test company for development before connecting the live one.

Is there a free integration?

The API is a paid feature: included in the Comprehensive and Enterprise plans or added to Basic and Advanced. The integration itself needs a developer to write code, and exporting reports to Excel is a no-code alternative for simple cases. Book a free online meeting and we will find the right fit.

Rate this page

Did you find this useful? Your rating helps others.

No ratings yet.

Share this pageWhatsAppXLinkedInFacebook
Pricing

Clear plans that grow with you

Nearly every module in every plan; plans differ by limits.

Basic

For small businesses getting started

450EGP / mo

Billed 5,400 EGP yearly

Save 24%

Includes:

  • 3 users and one branch
  • 150 invoices per month
  • Every module your activity needs
  • 5GB storage
Book a meeting
Most popular

Advanced

For growing businesses with several branches and warehouses

790EGP / mo

Billed 9,480 EGP yearly

Save 20%

Everything in Basic, plus:

  • 7 users, 2 branches and 3 warehouses
  • 750 invoices per month
  • 2 POS devices
  • 15GB storage
Book a meeting

Comprehensive

Everything: unlimited invoices, manufacturing, custom domain and API

1,590EGP / mo

Billed 19,080 EGP yearly

Save 20%

Everything in Advanced, plus:

  • 15 users, 3 branches and 5 warehouses
  • Unlimited invoices
  • Manufacturing, custom domain and API
  • 30GB storage
Book a meeting

Enterprise

For enterprises: open limits, dedicated server and SLA

Custom

Everything in Comprehensive, plus:

  • Unlimited users, branches and warehouses
  • Dedicated server and SLA
  • Storage on demand
  • Account manager and tailored onboarding
Contact us