A REST API to read and create your accounting data programmatically — invoices, parties, and items. Authenticate with an API key scoped to a single business.
Create a key in Settings → API keys. Keys look like ogv_… and carry a scope: read, write, or admin. Send it on every request:
curl https://www.ongravy.com/api/v1/ping \ -H "Authorization: Bearer ogv_your_key_here"
Or use the x-api-key header. All responses are JSON.
/api/v1/pingreadValidate your key — returns the resolved business id + scope.
/api/v1/invoicesreadList sales invoices. Filters: ?status=&from=&to=&limit= (max 200).
/api/v1/partiesreadList customers/suppliers. Filters: ?type=customer|supplier&limit=.
/api/v1/partieswriteCreate a party. Body: { name, party_type?, gstin?, phone?, email? }.
/api/v1/itemsreadList stock items. ?limit= (max 200).
curl -X POST https://www.ongravy.com/api/v1/parties \
-H "Authorization: Bearer ogv_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Acme Pvt Ltd","party_type":"customer","gstin":"29AABCA1234A1Z5"}'
# → { "data": { "id": "…", "name": "Acme Pvt Ltd", "gstin": "29AABCA1234A1Z5", "party_type": "customer" } }401 — missing / invalid / expired key. 403 — key scope too low for the endpoint.limit=200; default 50.More endpoints (create invoices, webhooks) are rolling out. Need one sooner? Ask support.