Validate HSN ============ This section explains how to validate HSN (Harmonized System of Nomenclature) codes. What is HSN Validation? ----------------------- HSN validation ensures that the provided HSN code: - Exists in the official GST database - Is properly formatted (6-8 digits) - Is currently active and applicable Validation Process ----------------- 1. **Input Validation** - Check if HSN code is numeric - Verify length (6, 7, or 8 digits) - Validate format pattern 2. **Database Lookup** - Search in official GST HSN database - Check if code is active - Verify description matches 3. **Response Generation** - Return validation status - Provide error details if invalid - Include HSN information if valid API Endpoint ----------- .. code-block:: bash POST /api/v1/validate/hsn { "hsn_code": "123456" } Response Format -------------- .. code-block:: json { "status": "success", "valid": true, "hsn_code": "123456", "description": "Valid HSN code", "gst_rate": "18%" } Error Response ------------- .. code-block:: json { "status": "error", "valid": false, "error": "Invalid HSN code format", "message": "HSN code must be 6-8 digits" }