Cashflow connector API
Server-to-server API for posting cashflow to a single Oflync outlet. Authenticate with a partner API key — not a user login.
Typical use: Whatzneu (or another system) calls Oflync once a month to record that outlet’s inflow and/or outflow.
Partner setup (creating and rotating keys) is in API connectors.
API spec (Swagger-style): Cashflow connector — API spec · Download OpenAPI YAML
Base URL
| Environment | Host |
|---|---|
| Production | https://service.oflync.com |
| Local | http://localhost:1997 |
All paths below are under /ordering-service/v1.
Authentication
Send the key on every request:
X-Api-Key: oflk_…
Alternatively:
Authorization: Bearer oflk_…
Keys start with oflk_. They are bound to one account and one outlet. Using a partner JWT on this endpoint is rejected.
HTTPS is required in production.
Capture cashflow
POST /ordering-service/v1/external/cashflow
Creates a cashflow row for the outlet bound to the key. If externalReference already exists for that outlet, the row is updated (idempotent monthly retry).
The outletId in the body must match the outlet the key was created for.
Request
POST /ordering-service/v1/external/cashflow
Content-Type: application/json
X-Api-Key: oflk_YOUR_SECRET
{
"outletId": "f9128203-e2f1-4f20-8b0a-dae3cb13c27d",
"type": "INCOME",
"amount": 185000.00,
"currency": "INR",
"category": "WhatsApp sales",
"description": "Whatzneu collections for August 2026",
"period": "2026-08",
"externalReference": "whatzneu-2026-08-income"
}
| Field | Required | Notes |
|---|---|---|
outletId | Yes | Must equal the key’s bound outlet |
type | Yes | INCOME or EXPENSE |
amount | Yes | Positive number, two decimal places |
currency | No | Defaults to INR |
category | No | e.g. WhatsApp sales |
description | No | Free text |
transactionDate | No | yyyy-MM-dd. If omitted, last day of period, else today |
period | No | yyyy-MM (useful for monthly jobs) |
externalReference | Yes | Unique per outlet. Reuse the same value to update instead of duplicating |