Confirm a Purchase
POST
/api/v1/purchasesConfirm receipt of a purchase invoice from a supplier. This notifies Kenya Revenue Authority that you have accepted the goods or services described in the invoice.
Requires x-api-key
http://localhost:8100/api/v1/purchases
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key |
| Content-Type | string | Required | Must be application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| spplrTin | string | Required | Kenya Revenue Authority PIN of the supplier who issued the invoice. |
| spplrInvcNo | string | Required | Invoice number from the supplier. |
| rcptTyCd | string | Required | Receipt type: P=Purchase receipt. |
| pmtTyCd | string | Required | Payment method code (01=Cash, 02=Credit, etc.). |
| cfmDt | string | Required | Confirmation date in YYYYMMDDHHmmss format. |
| salesSttsCd | string | Required | Status: 02=Confirmed. |
| totAmt | number | Required | Total amount of the purchase inclusive of VAT. |
| remark | string | Optional | Optional remark. |
Request
{
"spplrTin": "A111111111B",
"spplrInvcNo": "SINV-001",
"rcptTyCd": "P",
"pmtTyCd": "02",
"cfmDt": "20240112143000",
"salesSttsCd": "02",
"totAmt": 23200
}Response
{
"resultCd": "000",
"resultMsg": "Purchase confirmed successfully",
"data": {
"cisInvcNo": 7,
"cfmDt": "20240112143000"
}
}curl -X POST http://localhost:8100/api/v1/purchases \\
-H "x-api-key: YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"spplrTin": "A111111111B",
"spplrInvcNo": "SINV-001",
"rcptTyCd": "P",
"pmtTyCd": "02",
"cfmDt": "20240112143000",
"salesSttsCd": "02",
"totAmt": 23200
}'