Help / Developers
REST API
The transactions endpoints under /api/2026-11/transactions, with the headers and bodies they take.
All paths start with /api/2026-11/transactions. Send Authorization: Bearer <key> on every call. See Authentication. Bodies are JSON. A body with a field the API does not know is refused, so a misspelt field never goes unnoticed.
Read #
| Call | What it returns |
|---|---|
GET /api/2026-11/transactions | One page of the shop's transactions, newest first. Each has its customer's name and needs_you. |
GET /api/2026-11/transactions/{id} | One transaction. |
GET /api/2026-11/transactions/{id}/events | Every move of the transaction, oldest first: who acted, from and to which state. |
GET /api/2026-11/transactions/buyers | The shop's customers, a page at a time. |
POST /api/2026-11/transactions/buyers/find | One customer by external_ref or phone. Give exactly one. |
The list takes state (one or more of placed, confirmed, packed, fulfilled, cancelled, expired), limit (1 to 100, default 50) and offset. Leave out state to see the open ones. The answer has transactions, next_offset (null on the last page) and elsewhere.
curl "$TEJAS_API/api/2026-11/transactions?state=placed&limit=20" \
-H "Authorization: Bearer $TEJAS_API_KEY"
A transaction #
Every answer that holds a transaction uses one shape. These are its main fields:
| Field | Meaning |
|---|---|
id, reference | The id, and the short reference the shop and customer both see. |
state | placed, confirmed, packed, fulfilled, cancelled or expired. |
version | Goes up with every change. Send it back when you decide. |
buyer | The customer's id, name and masked phone. |
needs_you | True when the seller has to answer. |
open | True until the transaction is finished. |
next_verb | The one move the shop's button makes next: confirm, pack or fulfil. Null when there is none. |
lines | The items. Each has a key, a title, a quantity and a price. |
taxable, tax, total, currency | The money, as decimal strings. |
payment, fee | What was received and refunded, and Tejas's fee. |
created_at, updated_at | ISO 8601 times. |
Decide as the seller #
Each decision is POST /api/2026-11/transactions/{id}/<verb> with a JSON body:
{ "version": 3, "reason": "out_of_stock", "confirmed": false }
The verbs are confirm, reject, pack, fulfil, accept, refuse, mark_paid, not_received and refund.
versionis the version you decided on. You can send it in anIf-Matchheader instead. If the transaction moved since you read it, the call is409with the codestale, and the current transaction.reasonis forreject. Use one of thereject_reasonsids in the shop's settings.confirmed: trueanswers yes to a question the call asked. Confirming a short line, rejecting a confirmed transaction and refunding ask first.amountis forrefundonly: the money to give back. Leave it out to refund everything that is left.
Every change needs an Idempotency-Key header. See Idempotency.
Edit the lines #
POST /api/2026-11/transactions/{id}/edit replaces the whole set of lines:
{
"version": 3,
"lines": [
{ "offering_key": "atta-5kg", "quantity": "2" },
{ "offering_key": "toor-dal-1kg", "quantity": "1" }
]
}
A line can carry at, an ISO 8601 time, for an item the shop books by time. Up to 100 lines.
Act for a customer #
POST /api/2026-11/transactions/buyersonboards a customer:{ "phone": "+91…", "name": "…", "external_ref": "…" }. The same phone again, in any spacing, is the same customer. It sends the customer no message.POST /api/2026-11/transactions/buyers/{id}/browseshows what the shop offers, as the customer sees it. The body takesmax_price,sort,available_only,groups,filters,offsetandlimit(1 to 20, default 5).PUT /api/2026-11/transactions/buyers/{id}/cartsets the customer's cart. The body is the samelinesas an edit.POST /api/2026-11/transactions/buyers/{id}/placeplaces the cart. The answer'skindisplaced_waitingwhen the seller has to decide, orauto_confirmedwhen the shop's rules confirmed it. A shop with several places answersneeds_placeand lists them. Send{ "place": "<id>" }to choose.
Show the customer the lines and the total before you place. If a price moved, the cart answer carries a price_changed problem. Show the new total and ask again.
An answer that holds problems is still a successful call. Read each problem's kind, such as not_enough or price_changed.
Setup #
| Call | Use |
|---|---|
GET and PUT /api/2026-11/transactions/settings | Read and change the approval settings. |
GET and PUT /api/2026-11/transactions/storefront | Read and change which source the shop sells from, and the storefront's filters. |
GET /api/2026-11/transactions/link | The shop's entry link. |
GET /api/2026-11/transactions/fee-invoices/{id} | Tejas's monthly fee invoice, by month. |
GET /api/2026-11/transactions/settings/schema describes every setting, so you can build a form from it.
Did this page help?
Thank you. Your answer helps us fix the page.
Last checked: 2026-11-07