W3builders
AOP API
API Reference

AOP API

Every endpoint below is already live in W3builders AOP. Authentication is platform-wide — get an access token once, then use it against any module. This reference documents what exists today so external systems — accounting tools, marketplaces, your own back office — can record invoices, expenses, payments, and ledger entries directly, without touching the AOP dashboard.

Base URL

https://api.w3builders.com/v1

Every path shown in this reference is relative to the base URL above. All requests and responses are JSON unless noted (e.g. PDF endpoints).

Authentication

Every endpoint marked JWT bearer requires a valid access token in the request header:

Authorization: Bearer <access_token>

The token is tied to a specific tenant — every authenticated call is automatically scoped to that tenant's data. You never pass a tenant ID yourself.

Endpoints marked no auth are public by design (client-portal links and payment-provider webhooks) and are instead protected by an unguessable token in the URL or a provider signature check.

External integrations: generate a client_id + client_secret pair from AOP → Settings → API Access, then exchange it for an access token via Get Access Token. No user login required — the token is scoped to your tenant just like a session token.

Plan limits apply

Write endpoints (e.g. creating documents) are subject to the same monthly quotas as your AOP subscription plan (see Free / Starter / Growth / Scale limits). Exceeding a quota returns an error before the record is created.

Finance

Finance Settings

Company profile, GST registration, bank details, document numbering prefixes, and tax rate presets. Most other endpoints depend on this being configured first.

GETPOSTPOSTPOSTGET+2
Item Catalog

Reusable products/services for invoice line items.

GETPOSTPATCHDELETE
Documents & Invoices

The primary surface for recording billing activity. type enum: invoice | quotation | proforma | credit_note | debit_note | purchase_order | challan | receipt (receipt is system-generated only). status enum: draft | sent | viewed | approved | rejected | paid | partially_paid | overdue | cancelled | void.

GETPOSTPOSTGETPATCH+7
Accounting & Ledger

Read-side of the double-entry books. All figures here are derived automatically from documents, payments, expenses, and manual journals — this is reporting, not a place you write to directly (aside from managing the chart of accounts).

GETGETGETPOSTPATCH+4
Manual Journals

The canonical endpoint for recording arbitrary double-entry bookkeeping that isn't a document, expense, or payment.

GETPOSTDELETE
Expenses

Recording outgoing costs. Along with invoices and manual journals, this is one of the primary write endpoints for external bookkeeping integrations.

GETPOSTPATCHDELETEGET
Recurring Templates

Templates that auto-generate draft invoices or expenses on a schedule.

GETPOSTPATCHPOSTDELETE+1
Payments

Recording money received against a document.

POSTDELETE
Payment Links

Hosted checkout links via Razorpay or Stripe, generated from an existing document. Requires the provider integration to already be connected in AOP.

POSTGETPOSTPOST
Client Portal

Token-based endpoints used by the hosted client-facing document view — no JWT required, access is scoped by an unguessable portal_token issued when a document is created.

GETPOSTPOSTGET
GST Verification

Stateless GSTIN validator — useful to pre-check a client's GSTIN before creating a document.

POST

Coming Soon

CRM & Leads Soon

Sync leads and clients with external CRMs, marketing tools, or lead-gen forms — read/write pipeline stages, contact records, and deal values.

Projects & Tasks Soon

Create and update projects, Kanban cards, and task statuses from external project-management or ticketing tools.

Communications Soon

Send and receive WhatsApp messages and read unified-inbox conversations from an external system.

Notes for integrators

  • Tenant scoping is automatic — every authenticated call is derived from your token, never send a tenant ID.
  • Journals post automatically from invoices, credit notes, payments, expenses, and recurring runs — always balanced double-entry. Use the manual journals endpoint for anything else.
  • Corrections are reversals, not rewrites: deleting a manual journal or an expense with a posted journal creates a reversing entry rather than mutating history.
  • Finance documents can only be edited or deleted while in draft. Once sent, use status transitions, credit/debit notes, or duplicate.
  • GST accuracy depends on company_state_code (in settings) and place_of_supply / client_state (on the document) being set correctly.
  • Manual payment recording auto-generates a receipt and sends a payment-received email + WhatsApp message; Razorpay/Stripe webhook payments only send a WhatsApp confirmation.