Developer
API for merchants
Pull your shop's order and analytics data programmatically. Create an API key on the Autopilot page of your dashboard.
Authentication
Send your API key as a bearer token with every request.
Authorization: Bearer tk_xxxxxxxx
Each API key may make 120 requests a minute, and all of a shop's keys together 600 a minute. Past either, the answer is 429 with limit (key or store) and retryAfter, and a Retry-After header: how many seconds until you may try again.
Endpoints
GET https://techiro.app/api/v1/ordersread
All your orders, newest first, a page at a time, each with what was ordered and who it goes to.
GET https://techiro.app/api/v1/analyticsread
A summary of GMV, order count and fees.
GET https://techiro.app/api/v1/productsread
Your shop's product catalogue, each with soldOut: true while sold out.
POST https://techiro.app/api/v1/productswrite
Add or update products in the catalogue. It holds up to 50 products: new ones that do not fit are refused with status 422, named in notAdded, and nothing is saved. Each product's price is 0 to Rp100.000.000: dearer ones are refused with status 400, named in overPriced, and nothing is saved. Send soldOut: true to mark a product sold out, false to sell it again.
POST https://techiro.app/api/v1/orderswrite
Send a new order to the autopilot, paid by its buyer on the order's page (url). One order is worth at most Rp1.000.000.000: a bigger one is refused with status 422, with totalMax and total. An order naming a product sold out is refused with status 409, named in soldOut.
Example
curl https://techiro.app/api/v1/orders \ -H "Authorization: Bearer tk_xxxxxxxx"
The answer:
{
"orders": [
{
"id": "cm2k9x0a10001",
"total": 51000,
"fee": 1020,
"discount": 0,
"status": "PAID",
"kind": "order",
"createdAt": "2026-10-23T05:00:00.000Z",
"items": [
{ "name": "Kopi Susu", "qty": 2, "price": 18000 },
{ "name": "Roti Bakar", "qty": 1, "price": 15000 }
],
"delivery": { "name": "Sari", "phone": "6281234567890", "address": "Jl. Melati 3, Bandung" }
}
],
"hasMore": false
}Reading every order
An answer holds at most 100 orders, newest first, with hasMore: true when older ones follow. For the next page, send before with the id of that page's last order. To sync, send since with your last sync's time (ISO 8601) and read page by page until hasMore is false: since picks the orders made since that time. An order made before it and paid or cancelled after it does not come back there: follow those changes through the order.paid and order.cancelled webhooks, or read the list again without since. Send limit for smaller pages.
curl "https://techiro.app/api/v1/orders?since=2026-10-23T00:00:00Z" \ -H "Authorization: Bearer tk_xxxxxxxx" curl "https://techiro.app/api/v1/orders?since=2026-10-23T00:00:00Z&before=cm2k9x0a10001" \ -H "Authorization: Bearer tk_xxxxxxxx"
Sending an order
Name each product as your catalogue names it; upper or lower case makes no difference. Prices come from the catalogue. If a product is not in your catalogue, the order is refused and nothing is made.
curl -X POST https://techiro.app/api/v1/orders \
-H "Authorization: Bearer tk_xxxxxxxx" \
-H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
-H "Content-Type: application/json" \
-d '{"items":[{"name":"Kopi Susu","qty":2},{"name":"Roti Bakar","qty":1}]}'The answer gives url, the order's page: send it to your buyer, who pays there. An order still unpaid a day after it was made is cancelled, and one whose products are all free is paid as it is made.
{
"order": {
"id": "cm2k9x0a10002",
"total": 51000,
"fee": 1020,
"status": "PENDING",
"url": "https://techiro.app/pesanan/cm2k9x0a10002"
}
}Send an Idempotency-Key header with a new key for each order, a UUID for instance. If its answer never arrives because the connection dropped or timed out, send it again with the same key: you get the order already made, with an Idempotent-Replayed: true header, not a second one. The same key with different lines is refused with status 422.
The answer names every product it does not know:
HTTP 400
{
"error": "Produk tidak ada di katalog: Roti Bakar Coklatt",
"unknown": ["Roti Bakar Coklatt"]
}Refusals
Every refusal holds error, a sentence that says why, and sometimes the data named below:
- 400
- Invalid data or parameters: an order has at most 50 lines, each product name 1 to 80 characters, a qty of 1 to 999 a line; a product not in the catalogue (unknown), a price over Rp100.000.000 (overPriced), or a wrong limit, before or since.
- 401
- No API key, or one unknown or revoked: { "error": "Unauthorized" }.
- 402
- The shop's plan has ended, with upgrade: true. The key works again once the plan is renewed.
- 403
- A key with the read scope calls a write endpoint.
- 409
- The shop is paused in the studio, so no new order is taken; or a product is sold out (soldOut).
- 422
- An order over Rp1.000.000.000 (totalMax, total), a full catalogue (notAdded), or an Idempotency-Key sent again with different lines.
- 429
- Past a limit of requests a minute, with limit (key or store), retryAfter, and a Retry-After header.
Webhooks
Techiro can tell your system what happens in your shop: through the shop's webhook (Autopilot, Notifikasi (webhook)) and through each API key's webhook. Both get the same events, as JSON POSTs.
Events and their data
order.created
A new order is placed. For a booking (kind), total is the deposit paid now and fullValue the booking's whole price.
data: orderId, total, discount, kind, fullValue, customer
order.paid
An order is paid.
data: orderId, total, discount, customer, paidAt
order.cancelled
An order is cancelled, or not paid in time.
data: orderId, total, discount, customer, cancelledAt
payout.sent
A payout is sent to your shop's account.
data: amount, orderCount, status
The POST body
Every POST holds its delivery's id, the event's name, its data, and when it was first sent:
{
"id": "5f0c1e2a-8d3b-4c6e-9a7f-2b1d4e6c8a90",
"event": "order.paid",
"data": { "orderId": "cm2abc123", "total": 18000, "discount": 0, "customer": "6281712345678", "paidAt": "2026-10-23T03:18:00.000Z" },
"timestamp": "2026-10-23T03:18:01.000Z"
}Signature
Each webhook has a signing secret of its own, shown once when its URL is first saved and rotatable in the studio. Every POST carries an x-techiro-signature header holding sha256= and the HMAC SHA-256 of the raw body with that secret, in hex. Compute it again from the body exactly as received, before parsing it, and compare:
x-techiro-signature: sha256=5d41402abc4b2a76b9719d911017c592...
import { createHmac, timingSafeEqual } from "node:crypto";
// rawBody: the request body as received (a Buffer), before JSON.parse.
function verified(rawBody, signature, secret) {
const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
return signature.length === expected.length && timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}Retries
Answer with a 2xx status within 8 seconds. A failed delivery, to the shop's webhook or an API key's, is tried again after 5, 30, 120 and 360 minutes, five attempts in all. Every delivery is listed in the studio's webhook log, which can send it again; one delivery is never sent twice at once. A delivery can arrive more than once, for instance when your system answers after the 8 seconds: a retry carries the same body, with its first id and timestamp, so skip an id you have already handled. A retry can also arrive after a later event of the same order: go by each event's data (paidAt, cancelledAt), not by the order they arrive in. The customer's number is written as the order keeps it, 62 and the number.
Keep your API key secret. If it leaks, revoke it with its Cabut button on the Autopilot page of your dashboard, then create a new one: creating a key does not revoke the old one.