curl, with Node.js and Python versions of the sale call.
All requests go to https://sync2books-compliance-api.apps.kintro.money/v1. The same address serves the sandbox and production: the key you
send decides which one you reach.
Before you start
- A business added in the compliance dashboard with a sandbox eTIMS connection.
- A dashboard administrator to create an API key for it. Only administrators can manage keys.
1
Get a test key
In the compliance dashboard, select the business and open Integrations. Choose Create API key, pick
Test mode and copy the key. It is shown once. See Authentication & API keys.Put the key and the base URL in your shell. The key below is a placeholder:
2
Check the key
environment is SANDBOX for a test key. scope is business when the key is limited to one business, and
then businessId is that business. scopes lists what the key may do, and rateLimitPerMin is your request
budget.3
Create an item
Every sale line refers to a registered item. Create one:The response is
201 with the item. Its registrationStatus is PENDING: it exists, but KRA does not know it
yet. Keep the item id. To find a classificationCode, see Items.4
Register it with KRA
registrationStatus set to REGISTERED. If you get a 422 with the code
item_incomplete, read error.item.needs to see what is missing.5
Add opening stock
Goods are stock-tracked, so a sale deducts stock. Add some first:The response is
201 with quantityOnHand. Services are not stock-tracked and need no stock.6
Issue a sale
Always send an A The VAT is split out of the price for you, line by line, from the item’s tax type.
Idempotency-Key, so a retried request cannot file a second invoice. Prices are tax inclusive.201 means KRA accepted the sale. The response includes the signed receipt, abridged here:7
Download the receipt
?copy=true for a customer copy marked COPY.8
Repeat the sale safely
Send step 6 again with the same The answer is
Idempotency-Key. Use -i to see the headers:200 with the header Idempotent-Replayed: true, and nothing is filed with KRA again. See
Idempotency.9
Issue a credit note
receipt.originalCuInvoiceNo points back
at the sale. A sale can be credited once. See Credit notes.Read next
- Result callbacks: get the KRA outcome pushed to your server
- Errors & Troubleshooting: every error code and which ones are safe to retry
- Going live: switch from the sandbox to real tax documents
- API reference: every endpoint