Every endpoint, field and status code of the POS integration API. New here? Start with the guide; this page is for looking things up.
Connect a point-of-sale system to Nunua Pro: keep a shop's products, prices and stock online, and receive the
orders customers place. One generic contract for every POS, cloud or locally installed.
How it fits together
- Link a shop. Call
POST /link-codes (partner key), show the code on the till, and the shop owner types it
into the Business app. Poll GET /link-codes/{code} to collect the shop's API key (once).
- Send the catalogue.
POST /sync/snapshots → batches → commit, then keep it fresh with PATCH /inventory
on every sale, stock receipt or price change.
- Receive orders. Read
GET /events (works for a locally installed POS that cannot receive webhooks) or
register a webhook. Record the sale, then POST /orders/{id}/ack.
Rules worth knowing
- Nothing is deleted. A product that leaves the POS is archived; imports start unlisted until the shop approves them.
- Stale writes are ignored. Send
updated_at; an older update than what we hold is acknowledged as stale.
- Stock. A product is in stock while
stock_qty − shop buffer − units reserved for unacknowledged orders > 0.
Send the new stock quantity before acknowledging an order: acknowledging releases the reserved units.
- Orders reach you only after the customer has accepted the shop's quote, never earlier.
- Idempotency. Send
Idempotency-Key on writes; a repeat within 24 h replays the first answer.
- Money is TZS only. Prices up to 100 000 000, stock within ±100 000 000; rows outside are rejected individually.
- Barcodes are matched to the shared catalogue only when they are a valid GTIN (check digit). Junk is stored, never matched on.
- Photos are
https addresses on public hosts, fetched in the background; a photo the shop uploaded itself is never replaced.
Webhook signature
X-Nunua-Signature: sha256= + HMAC-SHA256 of "{X-Nunua-Timestamp}.{raw body}" with the shop's webhook secret.
Reject timestamps older than a few minutes. Failed deliveries retry for 24 h; GET /events always has the truth.
Sandbox
POST /pos-partner/v1/sandbox gives a hidden test shop with an npk_test_… key. Use it exactly like a real shop, and
POST /sandbox/orders to simulate a customer order, then cancel or complete it.