Submit purchase transactions to KRA eTIMS, track supplier invoices, and maintain purchase records for tax compliance.
| Scope | Description |
|---|---|
etims:read |
View purchases, get details, list, reports |
etims:write |
Submit purchases |
| Method | Endpoint | Description | Scope |
|---|---|---|---|
POST |
/api/etims/purchases/submit |
Submit a purchase to KRA | etims:write |
GET |
/api/etims/purchases/{invoice_number} |
Get purchase details | etims:read |
GET |
/api/etims/purchases |
List all purchases | etims:read |
GET |
/api/etims/reports/purchases |
Purchases summary report | etims:read |
Submit a purchase transaction to KRA eTIMS. Records supplier invoice data for input VAT claims and compliance.
Endpoint: POST /api/etims/purchases/submit
Required Scope: etims:write
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
invoice_number |
string | Yes | Supplier's invoice number |
invoice_date |
string | No | Invoice date (YYYY-MM-DD), defaults to today |
supplier_tin |
string | Yes | Supplier's KRA PIN/TIN |
supplier_name |
string | Yes | Supplier's business name |
supplier_bhf_id |
string | No | Supplier's branch ID (default: 00) |
purchase_type |
string | Yes | Purchase type code |
payment_type |
string | Yes | Payment method code |
items |
array | Yes | Array of purchased items |
| Code | Description |
|---|---|
N |
Normal purchase |
I |
Import purchase |
| Field | Type | Required | Description |
|---|---|---|---|
item_seq |
integer | Yes | Line item sequence |
item_code |
string | Yes | Item code |
item_name |
string | Yes | Item description |
item_class_code |
string | No | HS code / classification |
quantity |
number | Yes | Quantity purchased |
unit_price |
number | Yes | Unit price |
discount |
number | No | Discount amount |
tax_type |
string | Yes | Tax type code (A-E) |
tax_rate |
number | No | Tax rate percentage |
Request:
curl -X POST \
https://yourtenant.salami.dgl.co.ke/api/etims/purchases/submit \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"invoice_number": "SUP-INV-2026-001",
"invoice_date": "2026-03-25",
"supplier_tin": "P051234567B",
"supplier_name": "Supplier Ltd",
"purchase_type": "N",
"payment_type": "02",
"items": [
{
"item_seq": 1,
"item_code": "RAW001",
"item_name": "Raw Material A",
"item_class_code": "72081000",
"quantity": 100,
"unit_price": 800.00,
"tax_type": "B",
"tax_rate": 16
},
{
"item_seq": 2,
"item_code": "RAW002",
"item_name": "Raw Material B",
"quantity": 50,
"unit_price": 1200.00,
"tax_type": "B",
"tax_rate": 16
}
]
}'
Response:
{
"success": true,
"data": {
"purchase_id": 456,
"invoice_number": "SUP-INV-2026-001",
"supplier_tin": "P051234567B",
"supplier_name": "Supplier Ltd",
"total_amount": 140000.00,
"total_taxable_amount": 120689.66,
"total_tax_amount": 19310.34,
"tax_breakdown": {
"B": {"taxable": 120689.66, "tax": 19310.34, "rate": 16}
},
"status": "submitted",
"submitted_at": "2026-03-29T16:30:00Z"
},
"message": "Purchase submitted successfully"
}
Retrieve details of a specific purchase.
Endpoint: GET /api/etims/purchases/{invoice_number}
Required Scope: etims:read
Request:
curl -X GET \
https://yourtenant.salami.dgl.co.ke/api/etims/purchases/SUP-INV-2026-001 \
-H 'Authorization: Bearer YOUR_API_TOKEN'
Response:
{
"success": true,
"data": {
"id": 456,
"invoice_number": "SUP-INV-2026-001",
"invoice_date": "2026-03-25",
"supplier_tin": "P051234567B",
"supplier_name": "Supplier Ltd",
"supplier_id": 12,
"total_amount": 140000.00,
"total_taxable_amount": 120689.66,
"total_tax_amount": 19310.34,
"purchase_type": "N",
"payment_type": "02",
"status": "approved",
"items": [
{
"item_seq": 1,
"item_code": "RAW001",
"item_name": "Raw Material A",
"quantity": 100,
"unit_price": 800.00,
"total": 80000.00,
"tax_type": "B",
"tax_amount": 11034.48
},
{
"item_seq": 2,
"item_code": "RAW002",
"item_name": "Raw Material B",
"quantity": 50,
"unit_price": 1200.00,
"total": 60000.00,
"tax_type": "B",
"tax_amount": 8275.86
}
],
"submitted_at": "2026-03-29T16:30:00Z"
}
}
Retrieve all purchase transactions.
Endpoint: GET /api/etims/purchases
Required Scope: etims:read
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date |
string | No | Filter from date |
end_date |
string | No | Filter to date |
supplier_tin |
string | No | Filter by supplier TIN |
status |
string | No | Filter by status |
page |
integer | No | Page number |
per_page |
integer | No | Results per page |
Request:
curl -X GET \
'https://yourtenant.salami.dgl.co.ke/api/etims/purchases?start_date=2026-03-01&supplier_tin=P051234567B' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
Response:
{
"success": true,
"data": [
{
"id": 456,
"invoice_number": "SUP-INV-2026-001",
"supplier_tin": "P051234567B",
"supplier_name": "Supplier Ltd",
"total_amount": 140000.00,
"total_tax_amount": 19310.34,
"status": "approved",
"submitted_at": "2026-03-29T16:30:00Z"
}
],
"pagination": {
"total": 15,
"per_page": 50,
"current_page": 1,
"last_page": 1
}
}
Get aggregated purchases summary for a date range.
Endpoint: GET /api/etims/reports/purchases
Required Scope: etims:read
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date |
string | Yes | Start date (YYYY-MM-DD) |
end_date |
string | Yes | End date (YYYY-MM-DD) |
Request:
curl -X GET \
'https://yourtenant.salami.dgl.co.ke/api/etims/reports/purchases?start_date=2026-03-01&end_date=2026-03-31' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
Response:
{
"success": true,
"data": {
"period": {
"start_date": "2026-03-01",
"end_date": "2026-03-31"
},
"summary": {
"total_purchases": 15,
"total_amount": 850000.00,
"total_taxable_amount": 732758.62,
"total_tax_amount": 117241.38,
"unique_suppliers": 8
}
}
}
| Code | Description |
|---|---|
200 |
Success |
401 |
Invalid Salami token |
403 |
Token lacks required scope |
404 |
Purchase not found |
422 |
Validation error |
502 |
KRA eTIMS server error |
Back to: eTIMS Sales | eTIMS Items