Skip to main content
When a supplier issues an eTIMS invoice to your business, KRA records it against your PIN. These are your purchases. The API fetches them from KRA and lets you read them. It does not change them: confirming or rejecting a supplier invoice is done in the compliance dashboard. All three calls need the purchases:read scope.

Pull from KRA

POST /v1/purchases/pull asks KRA for the business’s supplier invoices and stores them, branch by branch. The body is optional.
Leave the body out to pull every branch, or send { "branchId": "..." } for one. Pulling again never changes an invoice’s review status. The response is a report of how each branch went:
Each branch has a status of ok or failed. A branch that failed does not stop the others, and says why in error. If KRA returns nothing for every branch, so that all of them fail, the call is a 502 with the code upstream_error, and the same per-branch report is in the error body under branches. We do this on purpose: an empty success would read as “you have no purchases”. Try again shortly.

List supplier invoices

GET /v1/purchases lists the stored invoices, newest first, a page at a time. Call the pull first to get the latest.
GET /v1/purchases/{id} returns one invoice. Each invoice has the supplier (name, pin), supplierInvoiceNumber, invoiceDate, branch, totals (subtotal, vat, total), its lines, and a confirmationError if the last attempt to confirm it to KRA failed.