Get HSN Hierarchy

This section explains how to retrieve the hierarchical structure of HSN codes.

What is HSN Hierarchy?

HSN hierarchy shows the classification structure of goods, organized in levels: - Chapter (2 digits): Broad category of goods - Heading (4 digits): Specific group within chapter - Sub-heading (6 digits): Detailed classification - Tariff item (8 digits): Most specific classification

Hierarchy Levels

Chapter Level (XX000000) - 01: Live animals - 02: Meat and edible meat offal - 03: Fish and crustaceans

Heading Level (XXXX0000) - 0101: Live horses, asses, mules and hinnies - 0102: Live bovine animals - 0103: Live swine

Sub-heading Level (XXXXXX00) - 010110: Pure-bred breeding horses - 010120: Other horses - 010130: Asses

API Endpoint

GET /api/v1/hsn/{hsn_code}/hierarchy

Parameters

  • hsn_code (path): The HSN code to get hierarchy for

  • level (query, optional): Hierarchy level to return (chapter, heading, sub-heading, all)

Example Request

GET /api/v1/hsn/010110/hierarchy?level=all

Response Format

{
  "status": "success",
  "hsn_code": "010110",
  "hierarchy": {
    "chapter": {
      "code": "01",
      "description": "Live animals"
    },
    "heading": {
      "code": "0101",
      "description": "Live horses, asses, mules and hinnies"
    },
    "sub_heading": {
      "code": "010110",
      "description": "Pure-bred breeding horses"
    }
  }
}