This repository contains a Postman collection for integrating with the Zambia Revenue Authority's Virtual Sales Data Controller (VSDC) API. The collection provides a comprehensive set of endpoints and examples for connecting third-party systems with the ZRA Smart Invoice platform.
The VSDC API enables businesses to seamlessly integrate their Enterprise Resource Planning (ERP) systems or Certified Invoicing Systems (CIS) with ZRA's Smart Invoice system. This integration allows for:
- Electronic invoicing processes
- Stock management and tracking
- Sales and purchase transactions
- Import operations
- Tax compliance
- Postman (latest version recommended)
- VSDC API deployed in your environment
- API access credentials (TPIN, Branch ID, and Device Serial Number provided by ZRA)
- Valid ZRA Smart Invoice registration
- Clone this repository to your local machine.
- Import the Postman collection:
- Open Postman
- Click on the "Import" button
- Select the
ZRA_VSDC_API_Collection.jsonfile from this repository
- Set up your environment variables:
- Create a new environment in Postman
- Add a variable named
base_urlwith the value of your VSDC API endpoint (e.g.,http://localhost:8080/zravsdc)
The first step in using the VSDC API is to initialize your device. This is a one-time process that retrieves security keys and configuration settings:
- Navigate to the "Device Initialization" folder in the collection
- Open the "Device Initialization" request
- Update the request body with your TPIN, Branch ID, and Device Serial Number
- Send the request
- Store the returned information securely for future reference
The collection is organized into several key areas:
- Standard and Classification Codes - Retrieve reference data needed for other API calls
- Branch Information - Manage branch details and users
- Customer Information - Manage customer records
- Item Information - Register and manage products/services
- Import Information - Process imported items
- Sales Information - Record various types of sales transactions
- Purchase Information - Record and retrieve purchase data
- Stock Information - Manage inventory levels
POST /initializer/selectInitInfo- Initialize the device and retrieve API keys
POST /code/selectCodes- Get standard codesPOST /itemClass/selectItemsClass- Get classification codesPOST /notices/selectNotices- Get system notices
POST /branches/selectBranches- Get all branchesPOST /branches/saveBrancheUser- Register branch usersPOST /branches/saveBrancheCustomers- Register branch customers
POST /customers/selectCustomer- Retrieve customer details
POST /items/saveItem- Register new itemsPOST /items/updateItem- Update existing itemsPOST /items/selectItems- Get all itemsPOST /items/selectItem- Get specific item detailsPOST /items/saveItemComposition- Manage composite itemsPOST /items/saveRrpItems- Save recommended retail pricesPOST /items/selectRrpItems- Get recommended retail prices
POST /imports/selectImportItems- Get imported itemsPOST /imports/updateImportItems- Update import status
POST /trnsSales/saveSales- Record sales transactions (supports multiple types)POST /trnsSales/selectPrincipals- Get RVAT principalsPOST /trnsSales/selectInvoice- Retrieve invoice details
POST /trnsPurchase/selectTrnsPurchaseSales- Get purchasesPOST /trnsPurchase/savePurchase- Record purchase transactions
POST /stock/selectStockItems- Get stock itemsPOST /stock/saveStockItems- Record stock movementsPOST /stockMaster/saveStockMaster- Update stock quantities
- Fetch standard and classification codes
- Create/verify item records
- Execute
saveSalesendpoint with appropriate transaction details - Update stock using
saveStockItems - Update total inventory with
saveStockMaster
- Retrieve imports using
selectImportItems - Acknowledge imports with
updateImportItems - Update stock using
saveStockItems - Update total inventory with
saveStockMaster
The collection supports various tax categories:
- VAT Standard Rate (A) - 16%
- Minimum Taxable Value (B) - MTV goods
- Exports (C1) - 0%
- Zero-rating LPO (C2) - 0%
- Zero-rated by nature (C3) - 0%
- Exempt (D) - No tax
- Reverse VAT (RVAT) - For imported services
- Insurance Premium Levy (IPL1, IPL2)
- Tourism Levy (TL)
- Service Charge (F) - 10%
- All API responses should be carefully handled and stored for reference
- The Device Initialization endpoint should only be called once
- Always follow the required sequence for dependent operations
- Ensure accurate tax categories are used for all transactions
- After recording purchases, imports, or sales, always update stock records
Contributions to improve this collection are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This collection was created based on the official ZRA VSDC API Specification Document (v1.0.7-1).