# Get hierarchy Retrieves a hierarchy by its ID. # OpenAPI definition ```json { "openapi": "3.0.0", "info": { "title": "Banking - Transaction banking", "version": "0.9.0", "description": "Transaction banking API", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Hierarchies", "description": "Hierarchy-related endpoints" } ], "components": { "parameters": { "HierarchyIdPath": { "name": "hierarchyId", "in": "path", "description": "Hierarchy ID", "schema": { "type": "string" }, "required": true, "example": "1234" } }, "schemas": { "CreateHierarchiesResponse": { "description": "Create hierarchy response object", "type": "object", "properties": { "id": { "$ref": "#/components/schemas/HierarchyIdGeneratedInternally" }, "levels": { "type": "array", "items": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/LevelIdGeneratedInternally" }, "index": { "$ref": "#/components/schemas/HierarchyLevelIndex" }, "name": { "$ref": "#/components/schemas/HierarchyLevelName" }, "description": { "$ref": "#/components/schemas/HierarchyLevelDescription" } }, "required": [ "id", "index", "name" ] } }, "name": { "type": "string", "description": "Hierarchy One" } }, "required": [ "id", "levels" ] }, "ErrorCode": { "description": "Error code\n`minLength: 1`\n`maxLength: 12`\n", "type": "string", "minLength": 1, "maxLength": 12, "example": "WPMT0017" }, "ErrorMessage": { "description": "Error message\n`minLength: 1`\n`maxLength: 1000`\n", "type": "string", "minLength": 1, "maxLength": 1000, "example": "Invalid JSON payload received: Error unmarshalling request" }, "ErrorResponse": { "type": "object", "properties": { "code": { "$ref": "#/components/schemas/ErrorCode" }, "message": { "$ref": "#/components/schemas/ErrorMessage" } } }, "HierarchyIdGeneratedInternally": { "type": "string", "description": "Hierarchy ID generated internally", "format": "uuid" }, "HierarchyLevelDescription": { "type": "string", "description": "Hierarchy level description", "maxLength": 80 }, "HierarchyLevelIndex": { "type": "integer", "format": "int32", "description": "Hierarchy level index", "minimum": 0, "maximum": 9, "example": 2 }, "HierarchyLevelName": { "type": "string", "description": "Hierarchy level name", "maxLength": 40 }, "LevelIdGeneratedInternally": { "type": "string", "description": "Level ID generated internally" } }, "responses": { "500InternalServer": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Generic internal error": { "value": { "code": "ECMN9999", "message": "Internal error" } } } } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "paths": { "/corporate/v1/hierarchies/{hierarchyId}": { "get": { "summary": "Get hierarchy", "operationId": "getHierarchy", "description": "Retrieves a hierarchy by its ID.", "parameters": [ { "$ref": "#/components/parameters/HierarchyIdPath" } ], "tags": [ "Hierarchies" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateHierarchiesResponse" } } } }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```