Introduction

The KRA Agent App enables businesses to submit their sales invoices to the Kenya Revenue Authority easily. It features robust reporting and retry mechanisms to ensure all submitted invoices are successfully delivered, even when downtimes occur at KRA.

How the KRA Agent App Works

Auth

Registration 2.1

How to register a new organization/business with the KRA Agent API.

Endpoint: POST /auth/register

Request Body
								
curl --location 'BASE_URL/kra-agent/api/v1/auth/register' \
--form 'organization_name="Test Organization"' \
--form 'email="[email protected]"' \
--form 'password="Test@123_*25"'
							
Response			
								
{
    "status": true,
    "data": {
        "user_id": 7,
        "user": {
            "id": 7,
            "name": "Test Organization",
            "email": "[email protected]"
        },
        "access_token": "access_token_string",
        "refresh_token": "refresh_token_string"
    }
}
							

Login 2.2

How to login to the KRA Agent API and obtain the access token.

Endpoint: POST /auth/login

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/auth/login' \
--form 'email="[email protected]"' \
--form 'password="Test@123_*25"'		
								
								
Response								
								
{
    "status": true,
    "data": {
        "user": {
            "id": 7,
            "name": "Test Organization",
            "email": "[email protected]"
        },
        "user_id": 7,
        "access_token": "access_token_string",
        "refresh_token": "refresh_token_string"
    }
}		
								
								

Refresh Token 2.3

Refresh the access token using the refresh token.

Endpoint: POST /auth/refresh-token

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/auth/refresh-token' \
--form 'refresh_token="refresh_token_string"'									
								
								

Forgot Password 2.4

Request a password reset link.

Endpoint: POST /auth/forgot-password

Request Body:								
								
curl --location 'BASE_URL/kra-agent/api/v1/auth/forgot-password' \
--header 'Accept: application/json' \
--form 'email="[email protected]"'		
								
								
Response								
								
{
    "status": true,
    "message": "Reset password email sent successfully."
}
								
								

Reset Password 2.4

Reset the password using the reset token.

Endpoint: POST /auth/reset-password

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/auth/reset-password' \
--header 'Accept: application/json' \
--form 'email="[email protected]"' \
--form 'token="OTP_TOKEN"' \
--form 'password="password"' \
--form 'password_confirmation="password"'
								
								
Response								
								
{
    "status": true,
    "message": "Reset password email sent successfully."
}
								
								

POS

With the KRA Agent App, businesses can manage multiple points of sale (POS) efficiently. Each POS represents a location or system where sales and invoices are initiated. An example could be the QuickBooks Online POS system.

Setup POS 3.1

Setup a new POS device.

Endpoint: POST /pos/setup

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/pos/setup' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer access_token_string' \
--form 'company_name="Pump 1"' \
--form 'kra_pin="43653474575688"' \
--form 'integration_token="5654645654"' \
--form 'callback_url="https//example.com/callback"' \
--form 'type="QuickBooks"' \
--form 'branch_id="00"' \
--form 'dvc_srl_no="1"' \
--form 'cmcKey="optional_if_device_has_not_been_initialized"'									
								
								
Response								
								
{
    "status": true,
    "data": {
        "clientId": "client_id",
        "clientSecret": "client_secret"
    }
}									
								
								

Get Devices 3.2

Retrieve a list of POS devices.

Endpoint: GET /pos/index

Request Body									
								
curl --location 'BASE_URL/kra-agent/api/v1/pos/index' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer access_token_string'
									
								
								
Response									
								
{
    "status": true,
    "data": {
        "pos": [
            {
                "id": 4,
                "company_name": "Test Organization",
                "integration_token": "INTEGRATION_TOKEN",
                "callback_url": "https//example.com/callback",
                "kra_pin": "KRA_PIN",
                "branch_id": BRANCH_ID,
                "cmcKey": "",
                "type": "QuickBooks",
                "client_id": "client_id",
                "client_secret": "client_secret",
                "dvc_srl_no": "1121213"
            },
            {
                "id": 5,
                "company_name": "Test Organization Two",
                "integration_token": "INTEGRATION_TOKEN",
                "callback_url": "https//example.com/callback",
                "kra_pin": "KRA_PIN",
                "branch_id": "BRANCH_ID",
                "cmcKey": "",
                "type": "QuickBooks",
                "client_id": "client_id",
                "client_secret": "client_secret",
                "dvc_srl_no": "6786688"
            }
        ]
    }
}

Update POS 3.3

Update POS device.

Endpoint: POST /pos/setup/update

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/pos/setup' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer access_token_string' \
--form 'pos_id="16"' \
--form 'company_name="Pump 1"' \
--form 'kra_pin="P051543892Q"' \
--form 'integration_token="5654645654"' \
--form 'callback_url="https//example.com/callback"' \
--form 'type="QuickBooks"' \
--form 'branch_id="00"' \
--form 'dvc_srl_no="1"' \
--form 'cmcKey="optional_if_device_has_not_been_initialized"									
								
								
Response								
								
{
    "status": true,
    "data": {
        "pos": {
            "id": 16,
            "company_name": "Pump 1",
            "integration_token": "5654645654",
            "callback_url": "https//example.com/callback",
            "kra_pin": "P845854A",
            "branch_id": "00",
            "cmcKey": "35654754754658658585",
            "type": "QuickBooks",
            "client_id": "6e66b2fe-f3b8-47e9-8c81-29529a118291",
            "client_secret": "rooyanll6qudlrfpnqretvthlqekzuwomgvtxfzh",
            "dvc_srl_no": "1"
        }
    }
}									
								
								

Initialize Device 3.4

Device Initialization

Endpoint: POST /selectInitOsdcInfo

                    Request Body								

curl --location --request POST 'BASE_URL/kra-agent/api/v1/selectInitOsdcInfo' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string'

                                                    
                    Response								

{
    "status": true,
    "message": "Device verified successfully",
    "device": {
        "id": 4,
        "user_id": 4,
        "company_name": "Test Company",
        "kra_pin": "43653474575688",
        "integration_token": "5654645654",
        "callback_url": "https//example.com/callback",
        "type": "QuickBooks",
        "api_key": "xrsp84vnwxz1gsllhovwretq2oo1ulsq",
        "status": 1,
        "created_at": "2025-05-29T08:02:00.000000Z",
        "updated_at": "2025-07-09T07:10:35.000000Z",
        "branch_id": 00,
        "dvc_srl_no": 6786688,
        "dvcId": "9999911300000001",
        "sdicId": "KRACU013000001",
        "mrcNo": "WIS01000150",
        "cmcKey": "63H8bGjO09mH67PTlxWPr4dysfo8T8uF",
        "statusFromKRA": "verified",
        "lastUpdatedToKRA": "2025-07-09T07:10:35.925563Z",
        "responseFromKRA": "{\"resultCd\":\"000\",\"resultMsg\":\"It is succeeded\",\"resultDt\":\"20200226143124\",\"data\":{\"info\":{\"tin\":\"A123456789Z\",\"taxprNm\":\"Taxpayer1130\",\"bsnsActv\":\"business\",\"bhfId\":\"00\",\"bhfNm\":\"Headquater\",\"bhfOpenDt\":\"20200226\",\"prvncNm\":\"NAIROBI CITY\",\"dstrtNm\":\"WESTLANDS\",\"sctrNm\":\"WON\",\"locDesc\":\"Westlands Towers\",\"hqYn\":\"Y\",\"mgrNm\":\"manage1130_00\",\"mgrTelNo\":\"0789001130\",\"mgrEmail\":\"[email protected]\",\"dvcId\":\"9999911300000001\",\"sdcId\":\"KRACU013000001\",\"mrcNo\":\"WIS01000150\",\"cmcKey\":\"63H8bGjO09mH67PTlxWPr4dysfo8T8uF\"}}}"
    }
}

                                                    

Products

Businesses and organisations are required by KRA to create and set up their sale items/services.

Add Products 4.1

Add new product(s) a specific POS.

Endpoint: POST /productSave

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/productSave' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--form 'products="{
    \"products\": [
      {
        \"lastReqDt\": \"20250716114931\",
        \"itemCd\": \"KE1NTXU0000013\",
        \"itemClsCd\": \"9901300101\",
        \"itemTyCd\": \"1\",
        \"itemNm\": \"Sinda Engine Oil 20W50\",
        \"itemStdNm\": null,
        \"orgnNatCd\": \"KE\",
        \"pkgUnitCd\": \"NT\",
        \"qtyUnitCd\": \"U\",
        \"taxTyCd\": \"B\",
        \"btchNo\": null,
        \"bcd\": null,
        \"dftPrc\": 2900,
        \"grpPrcL1\": 2900,
        \"grpPrcL2\": 2900,
        \"grpPrcL3\": 2900,
        \"grpPrcL4\": 2900,
        \"grpPrcL5\": null,
        \"addInfo\": null,
        \"sftyQty\": null,
        \"isrcAplcbYn\": \"N\",
        \"useYn\": \"Y\",
        \"regrId\": \"Test\",
        \"regrNm\": \"Test\",
        \"modrId\": \"Test\",
        \"modrNm\": \"Test\"
      },
      {
        \"lastReqDt\": \"20250716114931\",
        \"itemCd\": \"KE1NTXU0000014\",
        \"itemClsCd\": \"9901300101\",
        \"itemTyCd\": \"1\",
        \"itemNm\": \"Sinda Engine Oil 20W50\",
        \"itemStdNm\": null,
        \"orgnNatCd\": \"KE\",
        \"pkgUnitCd\": \"NT\",
        \"qtyUnitCd\": \"U\",
        \"taxTyCd\": \"B\",
        \"btchNo\": null,
        \"bcd\": null,
        \"dftPrc\": 2900,
        \"grpPrcL1\": 2900,
        \"grpPrcL2\": 2900,
        \"grpPrcL3\": 2900,
        \"grpPrcL4\": 2900,
        \"grpPrcL5\": null,
        \"addInfo\": null,
        \"sftyQty\": null,
        \"isrcAplcbYn\": \"N\",
        \"useYn\": \"Y\",
        \"regrId\": \"Test\",
        \"regrNm\": \"Test\",
        \"modrId\": \"Test\",
        \"modrNm\": \"Test\"
      },
      {
        \"lastReqDt\": \"20250716114931\",
        \"itemCd\": \"KE1NTXU0000015\",
        \"itemClsCd\": \"9901300101\",
        \"itemTyCd\": \"1\",
        \"itemNm\": \"Sinda Engine Oil 20W50\",
        \"itemStdNm\": null,
        \"orgnNatCd\": \"KE\",
        \"pkgUnitCd\": \"NT\",
        \"qtyUnitCd\": \"U\",
        \"taxTyCd\": \"B\",
        \"btchNo\": null,
        \"bcd\": null,
        \"dftPrc\": 2900,
        \"grpPrcL1\": 2900,
        \"grpPrcL2\": 2900,
        \"grpPrcL3\": 2900,
        \"grpPrcL4\": 2900,
        \"grpPrcL5\": null,
        \"addInfo\": null,
        \"sftyQty\": null,
        \"isrcAplcbYn\": \"N\",
        \"useYn\": \"Y\",
        \"regrId\": \"Test\",
        \"regrNm\": \"Test\",
        \"modrId\": \"Test\",
        \"modrNm\": \"Test\"
      }
  ]
}"' \
--form 'requestID="UNIQUE_REQUEST_ID"'
								
								
Response								
								
{
    "status": true,
    "data": [
        {
            "status": true,
            "item_cd": "KE1NTXU0000013",
            "kraRes": {
                "statusFromKRA": "completed",
                "itemCode": "KE1NTXU0000013"
            }
        },
        {
            "status": true,
            "item_cd": "KE1NTXU0000014",
            "kraRes": {
                "statusFromKRA": "completed",
                "itemCode": "KE1NTXU0000014"
            }
        },
        {
            "status": true,
            "item_cd": "KE1NTXU0000015",
            "kraRes": {
                "statusFromKRA": "completed",
                "itemCode": "KE1NTXU0000015"
            }
        }
    ]
}
								
								

Get Products 4.2

Retrieve a list of products from a specific POS

Endpoint: GET /productGet

Request Body								
								
curl --location 'BASE_URL/kra-agent/api/v1/productGet' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: Bearer access_token_string'		
								
								
Response
								

{
    "status": true,
    "data": {
        "products": [
        {
            "product_id": 17,
            "created_at": "2025-07-18T06:36:50.000000Z",
            "created_at_str": "2025-18-07 09:36AM",
            "tin": "P600001704A",
            "bhf_id": null,
            "cmc_key": null,
            "lastReqDt": "20250716114931",
            "itemCd": "KE1NTXU0000014",
            "itemClsCd": "9901300101",
            "itemTyCd": "1",
            "itemNm": "Sinda Engine Oil 20W50",
            "itemStdNm": null,
            "orgnNatCd": "KE",
            "pkgUnitCd": "NT",
            "qtyUnitCd": "U",
            "taxTyCd": "B",
            "btchNo": null,
            "bcd": null,
            "dftPrc": 2900,
            "grpPrcL1": 2900,
            "grpPrcL2": 2900,
            "grpPrcL3": 2900,
            "grpPrcL4": 2900,
            "grpPrcL5": null,
            "addInfo": null,
            "sftyQty": null,
            "isrcAplcbYn": "N",
            "useYn": "Y",
            "regrId": "Test",
            "regrNm": "Test",
            "modrId": "Test",
            "modrNm": "Test",
            "kra_response": {
            "resultCd": "000",
            "resultMsg": "Successful",
            "statusFromKRA": "completed",
            "itemCode": null,
            "lastUpdatedToKRA": "2025-07-18 09:36:51",
            "lastUpdatedToKRA_str": "2025-18-07 09:36AM",
            "kraRawData": "{\"resultCd\":\"000\",\"resultMsg\":\"Successful\",\"resultDt\":\"20250718093651\",\"data\":null}"
            }
        },
        {
            "product_id": 18,
            "created_at": "2025-07-18T06:36:51.000000Z",
            "created_at_str": "2025-18-07 09:36AM",
            "tin": "P600001704A",
            "bhf_id": null,
            "cmc_key": null,
            "lastReqDt": "20250716114931",
            "itemCd": "KE1NTXU0000015",
            "itemClsCd": "9901300101",
            "itemTyCd": "1",
            "itemNm": "Sinda Engine Oil 20W50",
            "itemStdNm": null,
            "orgnNatCd": "KE",
            "pkgUnitCd": "NT",
            "qtyUnitCd": "U",
            "taxTyCd": "B",
            "btchNo": null,
            "bcd": null,
            "dftPrc": 2900,
            "grpPrcL1": 2900,
            "grpPrcL2": 2900,
            "grpPrcL3": 2900,
            "grpPrcL4": 2900,
            "grpPrcL5": null,
            "addInfo": null,
            "sftyQty": null,
            "isrcAplcbYn": "N",
            "useYn": "Y",
            "regrId": "Test",
            "regrNm": "Test",
            "modrId": "Test",
            "modrNm": "Test",
            "kra_response": {
            "resultCd": "000",
            "resultMsg": "Successful",
            "statusFromKRA": "completed",
            "itemCode": null,
            "lastUpdatedToKRA": "2025-07-18 09:36:52",
            "lastUpdatedToKRA_str": "2025-18-07 09:36AM",
            "kraRawData": "{\"resultCd\":\"000\",\"resultMsg\":\"Successful\",\"resultDt\":\"20250718093652\",\"data\":null}"
            }
        }
        ]
    }
}	

								

Get Product 4.3

Retrieve a specific product from a specific POS (Filter by product_id or item_code)

Endpoint: GET /productShow

Request Body								

curl --location 'BASE_URL/kra-agent/api/v1/productShow?product_id=2&itemCode=null' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string'	
Response	


{
    "status": true,
    "data": {
        "product": {
            "product_id": 13,
            "created_at": "2025-07-17T12:24:48.000000Z",
            "created_at_str": "2025-17-07 03:24PM",
            "tin": "P600001704A",
            "bhf_id": null,
            "cmc_key": null,
            "lastReqDt": "20250716114931",
            "itemCd": "KE1NTXU0000013",
            "itemClsCd": "9901300101",
            "itemTyCd": "1",
            "itemNm": "Sinda Engine Oil 20W50",
            "itemStdNm": null,
            "orgnNatCd": "KE",
            "pkgUnitCd": "NT",
            "qtyUnitCd": "U",
            "taxTyCd": "B",
            "btchNo": null,
            "bcd": null,
            "dftPrc": 2900,
            "grpPrcL1": 2900,
            "grpPrcL2": 2900,
            "grpPrcL3": 2900,
            "grpPrcL4": 2900,
            "grpPrcL5": null,
            "addInfo": null,
            "sftyQty": null,
            "isrcAplcbYn": "N",
            "useYn": "Y",
            "regrId": "Test",
            "regrNm": "Test",
            "modrId": "Test",
            "modrNm": "Test",
            "kra_response": {
                "resultCd": "000",
                "resultMsg": "Successful",
                "statusFromKRA": "completed",
                "itemCode": null,
                "lastUpdatedToKRA": "2025-07-17 15:24:49",
                "lastUpdatedToKRA_str": "2025-17-07 03:24PM",
                "kraRawData": "{\"resultCd\":\"000\",\"resultMsg\":\"Successful\",\"resultDt\":\"20250717152449\",\"data\":null}"
            }
        }
    }
}

                                                    

Get Product 4.4

Retrieve Item Information of product classification and data types for each item

Endpoint: GET /selectItemClsList

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/selectItemClsList' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string'
Response


{
    "status": true,
    "data": {
        "resultCd": "000",
        "resultMsg": "Successful",
        "resultDt": "20250219132453",
        "data": {
        "itemClsList": [
            {
            "itemClsCd": "5020220050",
            "itemClsNm": "Alcoholic beverages",
            "itemClsLvl": 5,
            "taxTyCd": "B",
            "mjrTgYn": "Y",
            "useYn": "Y"
            },
            {
            "itemClsCd": "80101500",
            "itemClsNm": "Business and corporate management consultation services",
            "itemClsLvl": 3,
            "taxTyCd": null,
            "mjrTgYn": null,
            "useYn": "Y"
            }
        ]
        }
    }
    }

                                                    

Sales

Definition of how sale invoices from a specific POS get sent to KRA

POST Sale 5.1

Post a new sale to the KRA Agent API.

Endpoint: POST /sale

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/sale' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--form 'sales="{
    \"trdInvcNo\": 1414,
    \"invcNo\": 101,
    \"orgInvcNo\": 0,
    \"custTin\": \"A123456789A\",
    \"custNm\": \"Taxpayer1112\",
    \"salesTyCd\": \"N\",
    \"rcptTyCd\": \"S\",
    \"pmtTyCd\": \"01\",
    \"salesSttsCd\": \"02\",
    \"cfmDt\": \"20250716114931\",
    \"salesDt\": \"20250716\",
    \"stockRlsDt\": \"20250716114931\",
    \"cnclReqDt\": null,
    \"cnclDt\": null,
    \"rfdDt\": null,
    \"rfdRsnCd\": null,
    \"totItemCnt\": 2,
    \"taxblAmtA\": 0,
    \"taxblAmtB\": 10500,
    \"taxblAmtC\": 0,
    \"taxblAmtD\": 0,
    \"taxblAmtE\": 0,
    \"taxRtA\": 0,
    \"taxRtB\": 18,
    \"taxRtC\": 0,
    \"taxRtD\": 0,
    \"taxRtE\": 0,
    \"taxAmtA\": 0,
    \"taxAmtB\": 1602,
    \"taxAmtC\": 0,
    \"taxAmtD\": 0,
    \"taxAmtE\": 0,
    \"totTaxblAmt\": 10500,
    \"totTaxAmt\": 1602,
    \"totAmt\": 10500,
    \"prchrAcptcYn\": \"N\",
    \"remark\": null,
    \"regrId\": \"Test\",
    \"regrNm\": \"Test\",
    \"modrId\": \"Test\",
    \"modrNm\": \"Test\",
    \"receipt\": {
        \"custTin\": \"A123456789A\",
        \"custMblNo\": null,
        \"rcptPbctDt\": \"20250716114931\",
        \"trdeNm\": null,
        \"adrs\": null,
        \"topMsg\": null,
        \"btmMsg\": null,
        \"prchrAcptcYn\": \"N\"
    },
    \"itemList\": [
        {
            \"itemSeq\": 1,
            \"itemCd\": \"KE1NTXU0000013\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item 1\",
            \"bcd\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 2,
            \"qtyUnitCd\": \"U\",
            \"qty\": 2,
            \"prc\": 3500,
            \"splyAmt\": 7000,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"isrccCd\": null,
            \"isrccNm\": null,
            \"isrcRt\": null,
            \"isrcAmt\": null,
            \"taxTyCd\": \"B\",
            \"taxblAmt\": 7000,
            \"taxAmt\": 1068,
            \"totAmt\": 7000
        },
        {
            \"itemSeq\": 2,
            \"itemCd\": \"KE1NTXU0000013\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item 2\",
            \"bcd\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 1,
            \"qtyUnitCd\": \"U\",
            \"qty\": 1,
            \"prc\": 3500,
            \"splyAmt\": 3500,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"isrccCd\": null,
            \"isrccNm\": null,
            \"isrcRt\": null,
            \"isrcAmt\": null,
            \"taxTyCd\": \"B\",
            \"taxblAmt\": 3500,
            \"taxAmt\": 534,
            \"totAmt\": 3500
        }
    ]
}"' \
--form 'requestID="346656867967"'
Response


{
    "status": true,
    "sale_id": 1056138,
    "kra_res": {
        "statusFromKRA": "completed",
        "invoiceNo": 101,
        "invoice_checker_url": "BASE_URL/kra-agent/sale/invoice-checker/eyJpdiI6IjBObWdkNkZWU3BTbzJLZE95LzBsNUE9PSIsInZhbHVlIjoiUVRyaHo3SWZwS3hTYXRFZ05mazVjUT09IiwibWFjIjoiYzNjMmFkZjM2MzYyNmIyNGExYTYyMWQ1YTdhMDJmNjZkNTBjZmMyMDkzMmU4ZTg1NTQ4YTFhY2UyODM1ZjUxMiIsInRhZyI6IiJ9"
    }
}

								

GET All Sales 5.2

Retrieve sale invoices from a specific POS.

Endpoint: GET /saleGet?from=2025-05-01&to=2025-05-23

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/saleGet?from={start date i.e 2025-05-01}&to={end date i.e 2025-05-23}' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: Bearer access_token_string'

Response


{
    "status": true,
    "data": {
        "sales": [
            {
                "sale_id": 1056139,
                "tin": "T344343A",
                "bhfId": "00",
                "cmcKey": "3425436757474577765765",
                "trdInvcNo": 50041,
                "invcNo": 4578,
                "orgInvcNo": 0,
                "custTin": "A123456789Z",
                "custNm": "Taxpayer1112",
                "salesTyCd": "N",
                "rcptTyCd": "R",
                "pmtTyCd": "01",
                "salesSttsCd": "05",
                "cfmDt": "20200127210300",
                "salesDt": "20200127",
                "stockRlsDt": "20200127210300",
                "cnclReqDt": "20250711101207",
                "cnclDt": "20250711101207",
                "rfdDt": "20250711101207",
                "rfdRsnCd": "06",
                "totItemCnt": 2,
                "taxblAmtA": "0.00",
                "taxblAmtB": "10500.00",
                "taxblAmtC": "0.00",
                "taxblAmtD": "0.00",
                "taxblAmtE": "0.00",
                "taxRtA": "0.00",
                "taxRtB": "18.00",
                "taxRtC": "0.00",
                "taxRtD": "0.00",
                "taxRtE": "0.00",
                "taxAmtA": "0.00",
                "taxAmtB": "1602.00",
                "taxAmtC": "0.00",
                "taxAmtD": "0.00",
                "taxAmtE": "0.00",
                "totTaxblAmt": "10500.00",
                "totTaxAmt": "1602.00",
                "totAmt": "10500.00",
                "prchrAcptcYn": "N",
                "remark": null,
                "regrId": "Test",
                "regrNm": "Test",
                "modrId": "Test",
                "modrNm": "Test",
                "receipt": {
                    "custTin": "A123456789Z",
                    "custMblNo": null,
                    "rcptPbctDt": "20201118120300",
                    "trdeNm": null,
                    "adrs": null,
                    "topMsg": null,
                    "btmMsg": null,
                    "prchrAcptcYn": "N"
                },
                "salesItems": [
                    {
                        "sale_item_id": 1056139,
                        "sale_id": null,
                        "itemSeq": null,
                        "itemCd": null,
                        "itemClsCd": null,
                        "itemNm": null,
                        "bcd": null,
                        "pkgUnitCd": null,
                        "pkg": null,
                        "qtyUnitCd": null,
                        "qty": null,
                        "prc": null,
                        "splyAmt": null,
                        "dcRt": null,
                        "dcAmt": null,
                        "isrccCd": null,
                        "isrccNm": null,
                        "isrcRt": null,
                        "isrcAmt": null,
                        "taxTyCd": null,
                        "taxblAmt": null,
                        "taxAmt": null,
                        "totAmt": "10500.00"
                    },
                    {
                        "sale_item_id": 1056139,
                        "sale_id": null,
                        "itemSeq": null,
                        "itemCd": null,
                        "itemClsCd": null,
                        "itemNm": null,
                        "bcd": null,
                        "pkgUnitCd": null,
                        "pkg": null,
                        "qtyUnitCd": null,
                        "qty": null,
                        "prc": null,
                        "splyAmt": null,
                        "dcRt": null,
                        "dcAmt": null,
                        "isrccCd": null,
                        "isrccNm": null,
                        "isrcRt": null,
                        "isrcAmt": null,
                        "taxTyCd": null,
                        "taxblAmt": null,
                        "taxAmt": null,
                        "totAmt": "10500.00"
                    }
                ],
                "kra_response": {
                    "statusFromKRA": "not_completed",
                    "resultCd": null,
                    "resultMsg": null,
                    "lastUpdatedToKRA": "2025-07-22T06:50:43.000000Z",
                    "lastUpdatedToKRA_str": "2025-22-07 09:50AM",
                    "kraRawData": "[]",
                    "invoice_checker_url": "BASE_URL/kra-agent/sale/invoice-checker/eyJpdiI6IkcyRHhuTFMybkNxTGlKejRta0U5cXc9PSIsInZhbHVlIjoiZENQMUNoTjFqUUpBQVdMeVVVMzM4QT09IiwibWFjIjoiZGNlNGYxMWIyMjJkMzRlYjExZmE4MzRlY2RlZjkzZTBiYTExZWE1NzdhMDIwNTg3MDQ2ODg5ZmZkYWNjY2E5YyIsInRhZyI6IiJ9"
                }
            }
        ]
    }
}


								

Get Sale 5.3

Get Sale

Endpoint: GET /saleShow?sale_id=

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/saleShow?sale_id=sale_id_int' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: Bearer access_token_string'

                                                    
Response


{
    "status": true,
    "data": {
        "sale": [
            {
                "sale_id": 1056140,
                "tin": "P365465464Q",
                "bhfId": "00",
                "cmcKey": "54745547568567D3433434",
                "trdInvcNo": 1414,
                "invcNo": 101,
                "orgInvcNo": 0,
                "custTin": "A123456789A",
                "custNm": "Taxpayer1112",
                "salesTyCd": "N",
                "rcptTyCd": "S",
                "pmtTyCd": "01",
                "salesSttsCd": "02",
                "cfmDt": "20250716114931",
                "salesDt": "20250716",
                "stockRlsDt": "20250716114931",
                "cnclReqDt": null,
                "cnclDt": null,
                "rfdDt": null,
                "rfdRsnCd": null,
                "totItemCnt": 2,
                "taxblAmtA": "0.00",
                "taxblAmtB": "10500.00",
                "taxblAmtC": "0.00",
                "taxblAmtD": "0.00",
                "taxblAmtE": "0.00",
                "taxRtA": "0.00",
                "taxRtB": "18.00",
                "taxRtC": "0.00",
                "taxRtD": "0.00",
                "taxRtE": "0.00",
                "taxAmtA": "0.00",
                "taxAmtB": "1602.00",
                "taxAmtC": "0.00",
                "taxAmtD": "0.00",
                "taxAmtE": "0.00",
                "totTaxblAmt": "10500.00",
                "totTaxAmt": "1602.00",
                "totAmt": "10500.00",
                "prchrAcptcYn": "N",
                "remark": null,
                "regrId": "Test",
                "regrNm": "Test",
                "modrId": "Test",
                "modrNm": "Test",
                "receipt": {
                    "custTin": "A123456789A",
                    "custMblNo": null,
                    "rcptPbctDt": "20250716114931",
                    "trdeNm": null,
                    "adrs": null,
                    "topMsg": null,
                    "btmMsg": null,
                    "prchrAcptcYn": "N"
                },
                "salesItems": [
                    {
                        "sale_item_id": 1056140,
                        "sale_id": null,
                        "itemSeq": null,
                        "itemCd": null,
                        "itemClsCd": null,
                        "itemNm": null,
                        "bcd": null,
                        "pkgUnitCd": null,
                        "pkg": null,
                        "qtyUnitCd": null,
                        "qty": null,
                        "prc": null,
                        "splyAmt": null,
                        "dcRt": null,
                        "dcAmt": null,
                        "isrccCd": null,
                        "isrccNm": null,
                        "isrcRt": null,
                        "isrcAmt": null,
                        "taxTyCd": null,
                        "taxblAmt": null,
                        "taxAmt": null,
                        "totAmt": "10500.00"
                    },
                    {
                        "sale_item_id": 1056140,
                        "sale_id": null,
                        "itemSeq": null,
                        "itemCd": null,
                        "itemClsCd": null,
                        "itemNm": null,
                        "bcd": null,
                        "pkgUnitCd": null,
                        "pkg": null,
                        "qtyUnitCd": null,
                        "qty": null,
                        "prc": null,
                        "splyAmt": null,
                        "dcRt": null,
                        "dcAmt": null,
                        "isrccCd": null,
                        "isrccNm": null,
                        "isrcRt": null,
                        "isrcAmt": null,
                        "taxTyCd": null,
                        "taxblAmt": null,
                        "taxAmt": null,
                        "totAmt": "10500.00"
                    }
                ],
                "kra_response": {
                    "statusFromKRA": "completed",
                    "resultCd": "000",
                    "resultMsg": "Successful",
                    "lastUpdatedToKRA": "2025-07-22T11:13:34.000000Z",
                    "lastUpdatedToKRA_str": "2025-22-07 02:13PM",
                    "kraRawData": "{\"data\":{\"resultCd\":\"000\",\"resultMsg\":\"Successful\",\"resultDt\":\"20250722141333\",\"data\":{\"curRcptNo\":9,\"totRcptNo\":9,\"intrlData\":\"KBXT6FZOL25BKO5NIU3FNZ5KRM\",\"rcptSign\":\"HRI6JOO6EEXA2YV3\",\"sdcDateTime\":\"20250722141333\"}},\"resultCd\":\"000\",\"resultMsg\":\"Successful\"}",
                    "invoice_checker_url": "BASE_URL/kra-agent/sale/invoice-checker/eyJpdiI6IkFTSndsdEFGOFlLOUdqQjRjYnZaZnc9PSIsInZhbHVlIjoiREVSbHY4QVNjM1lRYVNWbjR0M01BQT09IiwibWFjIjoiMzMzZWJiNTdiMjlmYmNmNGNjNWNjMGRlYzkxNTExNDkyOGFmYmMwNzA1NDRlZDg3YzQzZTlkYjAzOTdiYTM1NiIsInRhZyI6IiJ9"
                }
            }
        ]
    }
}

                                                    

Summaries 5.4

Retrieve sales summaries from a specific POS.

Endpoint: GET /sale/summaryGet

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/sale/summaryGet' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: Bearer access_token_string'								
Response


{
    "status": true,
    "data": {
        "submitted_invoices": 9,
        "total_invoices": "45000.00",
        "pending_invoices": 8,
        "cancelled_invoices": 0,
        "total_invoices_str": "Kshs 45,000.00"
    }
}							

Credit Note

A credit note is a formal document issued to acknowledge the return of funds, typically in situations involving refunds or billing adjustments. For instance, when goods are returned and a refund is issued, a credit note serves as official proof of the transaction.

Send Credit Note 6.1

Send a credit note request a specific POS.

Endpoint: POST /saveTrnsSalesOsdc

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/saveTrnsSalesOsdc' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: Bearer access_token_string' \
--form 'otp_code="OTP_TOKEN"' \
--form 'requestID="request_id_string"' \
--form 'sales="{
    \"trdInvcNo\": \"50041\",
    \"invcNo\": 4578,
    \"orgInvcNo\": 0,
    \"custTin\": \"A123456789Z\",
    \"custNm\": \"Taxpayer1112\",
    \"salesTyCd\": \"N\",
    \"rcptTyCd\": \"R\",
    \"pmtTyCd\": \"01\",
    \"salesSttsCd\": \"05\",
    \"cfmDt\": \"20200127210300\",
    \"salesDt\": \"20200127\",
    \"stockRlsDt\": \"20200127210300\",
    \"cnclReqDt\": \"20250711101207\",
    \"cnclDt\": \"20250711101207\",
    \"rfdDt\": \"20250711101207\",
    \"rfdRsnCd\": \"06\",
    \"totItemCnt\": 2,
    \"taxblAmtA\": 0,
    \"taxblAmtB\": 10500,
    \"taxblAmtC\": 0,
    \"taxblAmtD\": 0,
    \"taxblAmtE\": 0,
    \"taxRtA\": 0,
    \"taxRtB\": 18,
    \"taxRtC\": 0,
    \"taxRtD\": 0,
    \"taxRtE\": 0,
    \"taxAmtA\": 0,
    \"taxAmtB\": 1602,
    \"taxAmtC\": 0,
    \"taxAmtD\": 0,
    \"taxAmtE\": 0,
    \"totTaxblAmt\": 10500,
    \"totTaxAmt\": 1602,
    \"totAmt\": 10500,
    \"prchrAcptcYn\": \"N\",
    \"remark\": null,
    \"regrId\": \"Test\",
    \"regrNm\": \"Test\",
    \"modrId\": \"Test\",
    \"modrNm\": \"Test\",
    \"receipt\": {
        \"custTin\": \"A123456789Z\",
        \"custMblNo\": null,
        \"rcptPbctDt\": \"20201118120300\",
        \"trdeNm\": null,
        \"adrs\": null,
        \"topMsg\": null,
        \"btmMsg\": null,
        \"prchrAcptcYn\": \"N\"
    },
    \"itemList\": [
        {
            \"itemSeq\": 1,
            \"itemCd\": \"KE1NTXU0000013\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item 1\",
            \"bcd\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 2,
            \"qtyUnitCd\": \"U\",
            \"qty\": 2,
            \"prc\": 3500,
            \"splyAmt\": 7000,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"isrccCd\": null,
            \"isrccNm\": null,
            \"isrcRt\": null,
            \"isrcAmt\": null,
            \"taxTyCd\": \"B\",
            \"taxblAmt\": 7000,
            \"taxAmt\": 1068,
            \"totAmt\": 7000
        },
        {
            \"itemSeq\": 2,
            \"itemCd\": \"KE1NTXU0000014\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item 2\",
            \"bcd\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 1,
            \"qtyUnitCd\": \"U\",
            \"qty\": 1,
            \"prc\": 3500,
            \"splyAmt\": 3500,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"isrccCd\": null,
            \"isrccNm\": null,
            \"isrcRt\": null,
            \"isrcAmt\": null,
            \"taxTyCd\": \"B\",
            \"taxblAmt\": 3500,
            \"taxAmt\": 534,
            \"totAmt\": 3500
        }
    ]
}"' \
Response


{
    "status": true,
    "sale_id": 1056141,
    "kra_res": {
        "statusFromKRA": "completed",
        "invoiceNo": 4578,
        "invoice_checker_url": "BASE_URL/kra-agent/sale/invoice-checker/eyJpdiI6InU4dk53ZS9DbEw4Sm41b2p5SU84ZVE9PSIsInZhbHVlIjoiQ1ZhcE9XY2NNeW11VFZFSUtUL3hkQT09IiwibWFjIjoiZmMxZTcwNmI0ZGQwNTU5YjFiNmE0OTFlOTgyMGQzOTlhZjRhMTVlNDIwOWY5NTFhOTVhNGI1M2MxN2U3ODkyMyIsInRhZyI6IiJ9"
    }
}


Branch

Handles branch details such as branch ID, name, address, location, manager information, and headquarters status.

Get Branches 7.1

Get a List of all branches.

Endpoint: POST /selectBhfList

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/selectBhfList' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string' \

Response


{
    "status": true,
    "message": "Branches synchronized from KRA.",
    "data": {
        "branchList": [
            {
                "tin": "P03463665Q",
                "bhfNm": "Headquarter",
                "bhfSttsCd": "01",
                "prvncNm": "Kilifi",
                "dstrtNm": "Kilifi District",
                "sctrNm": "Kilifi",
                "locDesc": null,
                "mgrNm": "Symatech Labs Limited",
                "mgrTelNo": "0713946234",
                "mgrEmail": "[email protected]",
                "hqYn": "Y",
                "statusFromKRA": "complete",
                "responseFromKRA": null,
                "lastUpdatedToKRA": "2025-07-22 16:00:34",
                "bhfId": "00"
            }
        ]
    }
}
                        
                        

Customers

The Customer section manages taxpayer customer records for each registered branch. It allows creating, updating, storing, and synchronizing customer details (like PIN, name, address, contacts) with KRA.

/saveBhfCustomer is an API endpoint used to register or update customer information for a specific taxpayer branch (bhf).

Save Customer Information.

Endpoint: POST /saveBhfCustomer

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/saveBhfCustomer' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string' \
--form 'data="{
    \"custNo\": \"999991113\",
    \"custTin\": \"A123456789Z\",
    \"custNm\": \"Taxpayer1113\",
    \"adrs\": null,
    \"telNo\": null,
    \"email\": null,
    \"faxNo\": null,
    \"useYn\": \"Y\",
    \"remark\": null,
    \"regrId\": \"Test\",
    \"regrNm\": \"Test\",
    \"modrId\": \"Test\",
    \"modrNm\": \"Test\"
    }"'

Response


{
    "status": true,
    "message": "Customer saved",
    "kra_res": {
        "statusFromKRA": "completed"
    }
}
                        
                        

Purchases

The Purchase section records and manages purchase transactions made by a taxpayer.

Purchase-Sales Transaction 9.1

Retrieve a list of saved purchase and sales transactions.

Endpoint: POST /selectTrnsPurchaseSalesList

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/selectTrnsPurchaseSalesList' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: access_token_string' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--form 'lastReqDt="Ymdhis"'

Response


{
    "status": true,
    "message": "Data synchronized from KRA.",
    "data": [
        {
            "spplrTin": "P052317759Q",
            "spplrNm": "NAIROBI BARBEQUE PIT MASTERS LIMITED",
            "spplrBhfId": "00",
            "spplrInvcNo": 81,
            "spplrSdcId": "KRACU0100053186",
            "spplrMrcNo": "KRA00163907",
            "rcptTyCd": "S",
            "pmtTyCd": "06",
            "cfmDt": "2024-07-07 19:32:25",
            "salesDt": "20240707",
            "stockRlsDt": null,
            "totItemCnt": 2,
            "taxblAmtA": 0,
            "taxblAmtB": 0,
            "taxblAmtC": 0,
            "taxblAmtD": 3150,
            "taxblAmtE": 0,
            "taxRtA": 0,
            "taxRtB": 0,
            "taxRtC": 0,
            "taxRtD": 0,
            "taxRtE": 0,
            "taxAmtA": 0,
            "taxAmtB": 0,
            "taxAmtC": 0,
            "taxAmtD": 0,
            "taxAmtE": 0,
            "totTaxblAmt": 3150,
            "totTaxAmt": 0,
            "totAmt": 3150,
            "remark": null,
            "itemList": [
                {
                    "itemSeq": 1,
                    "itemCd": "KE2BGXKGX0000001",
                    "itemClsCd": "50111513",
                    "itemNm": "Texas brisket",
                    "bcd": null,
                    "pkgUnitCd": "BG",
                    "pkg": 0,
                    "qtyUnitCd": "KG",
                    "qty": 1,
                    "prc": 3000,
                    "splyAmt": 3000,
                    "dcRt": 0,
                    "dcAmt": 0,
                    "taxTyCd": "D",
                    "taxblAmt": 3000,
                    "taxAmt": 0,
                    "totAmt": 3000
                },
                {
                    "itemSeq": 2,
                    "itemCd": "KE2BGXGRM0000009",
                    "itemClsCd": "50111513",
                    "itemNm": "Normal fries",
                    "bcd": null,
                    "pkgUnitCd": "BG",
                    "pkg": 0,
                    "qtyUnitCd": "GRM",
                    "qty": 1,
                    "prc": 150,
                    "splyAmt": 150,
                    "dcRt": 0,
                    "dcAmt": 0,
                    "taxTyCd": "D",
                    "taxblAmt": 150,
                    "taxAmt": 0,
                    "totAmt": 150
                }
            ]
        }
    ]
}
                                
                                

POST Save Purchase-Sales Transaction 9.2

Used to record a new purchase transaction.

Endpoint: POST /insertTrnsPurchase

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/insertTrnsPurchase' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Accept: application/json' \
--form 'requestID="request_id_string"' \
--form 'data="{
    \"invcNo\": 1,
    \"orgInvcNo\": 0,
    \"spplrTin\": \"A123456789Z\",
    \"spplrBhfId\": null,
    \"spplrNm\": null,
    \"spplrInvcNo\": null,
    \"regTyCd\": \"M\",
    \"pchsTyCd\": \"N\",
    \"rcptTyCd\": \"P\",
    \"pmtTyCd\": \"01\",
    \"pchsSttsCd\": \"02\",
    \"cfmDt\": \"20200127210300\",
    \"pchsDt\": \"20200127\",
    \"wrhsDt\": \"\",
    \"cnclReqDt\": \"\",
    \"cnclDt\": \"\",
    \"rfdDt\": \"\",
    \"totItemCnt\": 2,
    \"taxblAmtA\": 0,
    \"taxblAmtB\": 10500,
    \"taxblAmtC\": 0,
    \"taxblAmtD\": 0,
    \"taxblAmtE\": 0,
    \"taxRtA\": 0,
    \"taxRtB\": 18,
    \"taxRtC\": 0,
    \"taxRtD\": 0,
    \"taxRtE\": 0,
    \"taxAmtA\": 0,
    \"taxAmtB\": 1890,
    \"taxAmtC\": 0,
    \"taxAmtD\": 0,
    \"taxAmtE\": 0,
    \"totTaxblAmt\": 10500,
    \"totTaxAmt\": 1890,
    \"totAmt\": 10500,
    \"remark\": null,
    \"regrId\": \"Test\",
    \"regrNm\": \"Test\",
    \"modrId\": \"Test\",
    \"modrNm\": \"Test\",
    \"itemList\": [
        {
            \"itemSeq\": 1,
            \"itemCd\": \"KE1NTXU0000001\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item1\",
            \"bcd\": \"\",
            \"spplrItemClsCd\": null,
            \"spplrItemCd\": null,
            \"spplrItemNm\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 2,
            \"qtyUnitCd\": \"U\",
            \"qty\": 2,
            \"prc\": 3500,
            \"splyAmt\": 7000,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"taxblAmt\": 7000,
            \"taxTyCd\": \"B\",
            \"taxAmt\": 1260,
            \"totAmt\": 7000,
            \"itemExprDt\": null
        },
        {
            \"itemSeq\": 2,
            \"itemCd\": \"KE1NTXU0000002\",
            \"itemClsCd\": \"5022110801\",
            \"itemNm\": \"test item2\",
            \"bcd\": \"\",
            \"spplrItemClsCd\": null,
            \"spplrItemCd\": null,
            \"spplrItemNm\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 1,
            \"qtyUnitCd\": \"U\",
            \"qty\": 1,
            \"prc\": 3500,
            \"splyAmt\": 3500,
            \"dcRt\": 0,
            \"dcAmt\": 0,
            \"taxblAmt\": 3500,
            \"taxTyCd\": \"B\",
            \"taxAmt\": 630,
            \"totAmt\": 3500,
            \"itemExprDt\": null
        }
    ]
}"'
Response


{
    "status": true,
    "purchase_id": 20006,
    "kra_res": {
        "statusFromKRA": "completed"
    }
}
                                
                                

Stock Information

The Stock Information section manages the registration, update, and synchronization of stock master data. It records details such as goods received notes (GRNs), item codes, quantities, prices, and tax details for all stock movements.

Stock In & Out operations 10.1

Recording stock adjustments such as goods received, transfers, or consumption.

Endpoint: POST /insertStockIO

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/insertStockIO' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--form 'requestID="request_id_string' \
--form 'data="{
    \"tin\": \"A123456789Z\",
    \"cmcKey\": \"32523535225\",
    \"bhfId\": \"00\",
    \"sarNo\": 2,
    \"orgSarNo\": 2,
    \"regTyCd\": \"M\",
    \"custTin\": \"A123456789Z\",
    \"custNm\": null,
    \"custBhfId\": null,
    \"sarTyCd\": \"11\",
    \"ocrnDt\": \"20200126\",
    \"totItemCnt\": 2,
    \"totTaxblAmt\": 70000,
    \"totTaxAmt\": 10677.96,
    \"totAmt\": 70000,
    \"remark\": null,
    \"regrId\": \"Test\",
    \"regrNm\": \"Test\",
    \"modrId\": \"Test\",
    \"modrNm\": \"Test\",
    \"itemList\": [
        {
            \"itemSeq\": 1,
            \"itemCd\": \"KE1NTXU0000001\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item1\",
            \"bcd\": null,
            \"pkgUnitCd\": \"NT\",
            \"pkg\": 10,
            \"qtyUnitCd\": \"U\",
            \"qty\": 10,
            \"itemExprDt\": null,
            \"prc\": 3500,
            \"splyAmt\": 35000,
            \"totDcAmt\": 0,
            \"taxblAmt\": 35000,
            \"taxTyCd\": \"B\",
            \"taxAmt\": 5338.98,
            \"totAmt\": 35000
        },
        {
            \"itemSeq\": 2,
            \"itemCd\": \"KE1NTXU0000002\",
            \"itemClsCd\": \"5059690800\",
            \"itemNm\": \"test item2\",
            \"bcd\": null,
            \"pkgUnitCd\": \"BL\",
            \"pkg\": 10,
            \"qtyUnitCd\": \"U\",
            \"qty\": 10,
            \"itemExprDt\": null,
            \"prc\": 3500,
            \"splyAmt\": 35000,
            \"totDcAmt\": 0,
            \"taxblAmt\": 35000,
            \"taxTyCd\": \"B\",
            \"taxAmt\": 5338.98,
            \"totAmt\": 35000
        }
    ]
}"'

Response


{
    "status": true,
    "stock_id": 5,
    "kra_res": {
        "statusFromKRA": "not_completed"
    }
}

POST Save StockMasterSaveReq/Res 9.2

The saveStockMaster endpoint is used to save or update stock master records for goods received, purchases, or opening stock.

Endpoint: POST /saveStockMaster

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/saveStockMaster' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--form 'data="{
\"itemCd\": \"KE1NTXU0000002\",
\"rsdQty\": 10,
\"regrId\": \"Test\",
\"regrNm\": \"Test\",
\"modrId\": \"Test\",
\"modrNm\": \"Test\"
}"' \
--form 'requestID="request_id_string"'
Response


{
    "status": true,
    "id": 4,
    "kra_res": {
        "statusFromKRA": "not_completed"
    }
}

GET /stockGet 10.3

/stockGet returns a list of stock I/O (in/out) transactions that were previously submitted using insertStockIO.

Endpoint: GET /stockGet

Request Body


curl --location 'BASE_URL/kra-agent/api/v1/stockGet' \
--header 'Accept: application/json' \
--header 'Client-ID: client_id' \
--header 'Client-Secret: client_secret' \
--header 'Authorization: access_token_string'

Response


{
    "status": true,
    "data": {
        "list": [
            {
                "id": 4,
                "tin": "A123456789Z",
                "bhfId": "00",
                "sarNo": 2,
                "orgSarNo": 2,
                "regTyCd": "M",
                "custTin": "A123456789Z",
                "custNm": null,
                "custBhfId": null,
                "sarTyCd": "11",
                "ocrnDt": "2020-01-26",
                "totItemCnt": 2,
                "totTaxblAmt": "70000.00",
                "totTaxAmt": "10677.96",
                "totAmt": "70000.00",
                "remark": null,
                "regrId": "Test",
                "regrNm": "Test",
                "modrId": "Test",
                "modrNm": "Test",
                "itemList": [],
                "statusFromKRA": null,
                "lastUpdatedToKRA": null,
                "lastUpdatedToKRA_str": null
            },
            {
                "id": 5,
                "tin": "A123456789Z",
                "bhfId": "00",
                "sarNo": 2,
                "orgSarNo": 2,
                "regTyCd": "M",
                "custTin": "A123456789Z",
                "custNm": null,
                "custBhfId": null,
                "sarTyCd": "11",
                "ocrnDt": "2020-01-26",
                "totItemCnt": 2,
                "totTaxblAmt": "70000.00",
                "totTaxAmt": "10677.96",
                "totAmt": "70000.00",
                "remark": null,
                "regrId": "Test",
                "regrNm": "Test",
                "modrId": "Test",
                "modrNm": "Test",
                "itemList": [
                    {
                        "id": 1,
                        "itemSeq": 1,
                        "itemCd": "KE1NTXU0000001",
                        "itemClsCd": "5059690800",
                        "itemNm": "test item1",
                        "bcd": null,
                        "pkgUnitCd": "NT",
                        "pkg": 10,
                        "qtyUnitCd": "U",
                        "qty": "10.00",
                        "itemExprDt": null,
                        "prc": "3500.00",
                        "splyAmt": "35000.00",
                        "totDcAmt": "0.00",
                        "taxblAmt": "35000.00",
                        "taxTyCd": "B",
                        "taxAmt": "5338.98",
                        "totAmt": "35000.00"
                    },
                    {
                        "id": 2,
                        "itemSeq": 2,
                        "itemCd": "KE1NTXU0000002",
                        "itemClsCd": "5059690800",
                        "itemNm": "test item2",
                        "bcd": null,
                        "pkgUnitCd": "BL",
                        "pkg": 10,
                        "qtyUnitCd": "U",
                        "qty": "10.00",
                        "itemExprDt": null,
                        "prc": "3500.00",
                        "splyAmt": "35000.00",
                        "totDcAmt": "0.00",
                        "taxblAmt": "35000.00",
                        "taxTyCd": "B",
                        "taxAmt": "5338.98",
                        "totAmt": "35000.00"
                    }
                ],
                "statusFromKRA": "not_completed",
                "lastUpdatedToKRA": "2025-07-09 12:08:57",
                "lastUpdatedToKRA_str": "2025-09-07 12:08PM"
            }
        ]
    }
}