> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/api/back-office-api/system-bo-api/undefined-14.md).

# 사용자 조직 관리

## 부서 목록 저장

> \## 기능설명\
> \* 부서 목록 정보를 등록, 수정, 삭제합니다.\
> \---\
> \## 상세설명\
> \* 화면에 그리드에서 등록, 수정, 삭제 정보를 한번에 넘겨받아 처리합니다.\
> \* 부서 삭제시 해당 부서다가 특정 사용자에게 세팅되어 있을 경우 삭제가 불가능합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RealGridCUDRequestUserDeptRequest":{"type":"object","properties":{"all":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptRequest"}},"create":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptRequest"}},"update":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptRequest"}},"delete":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptRequest"}}}},"UserDeptRequest":{"type":"object","description":"사용자조직관리 Request DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/system/userDeptMgmt/saveUserDeptList":{"post":{"tags":["사용자 조직 관리"],"summary":"부서 목록 저장","description":"## 기능설명\n* 부서 목록 정보를 등록, 수정, 삭제합니다.\n---\n## 상세설명\n* 화면에 그리드에서 등록, 수정, 삭제 정보를 한번에 넘겨받아 처리합니다.\n* 부서 삭제시 해당 부서다가 특정 사용자에게 세팅되어 있을 경우 삭제가 불가능합니다.\n","operationId":"saveUserDeptList","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealGridCUDRequestUserDeptRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"string"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## 하위 부서 목록 조회

> \## 기능설명\
> &#x20; \* 화면에서 선택한 부서의 하위 부서 목록을 조회합니다.\
> &#x20; \---\
> &#x20; \## 상세설명\
> &#x20; \* 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UserDeptRequest":{"type":"object","description":"사용자조직관리 Request DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]}}},"RealGridListResponseUserDeptResponse":{"type":"object","properties":{"totalCount":{"type":"integer","format":"int32"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptResponse"}}}},"UserDeptResponse":{"type":"object","description":"사용자조직관리 Response DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]},"userId":{"type":"string","description":"부서에 매핑된 유저 아이디"},"level":{"type":"string","description":"부서 레벨"},"hierarchy":{"type":"string","description":"계층구조"},"hierarchyText":{"type":"string","description":"ex) 색조화장품>베이스 메이크업"},"leafYn":{"type":"string","description":"최하위여부"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v2/system/userDeptMgmt/getUserDeptMgmtList":{"get":{"tags":["사용자 조직 관리"],"summary":"하위 부서 목록 조회","description":"## 기능설명\n  * 화면에서 선택한 부서의 하위 부서 목록을 조회합니다.\n  ---\n  ## 상세설명\n  * 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.\n","operationId":"getUserDeptList","parameters":[{"name":"userDeptRequest","in":"query","required":true,"schema":{"$ref":"#/components/schemas/UserDeptRequest"}},{"name":"deptCd","in":"query","description":"부서코드","schema":{"type":"string"}},{"name":"pageIdx","in":"query","description":"페이지 번호","schema":{"type":"string"}},{"name":"rowsPerPage","in":"query","description":"페이지당 개수","schema":{"type":"string"}}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RealGridListResponseUserDeptResponse"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## 하위 부서 목록 조회

> \## 기능설명\
> &#x20; \* 화면에서 선택한 부서의 하위 부서 목록을 조회합니다.\
> &#x20; \---\
> &#x20; \## 상세설명\
> &#x20; \* 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UserDeptRequest":{"type":"object","description":"사용자조직관리 Request DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]}}},"UserDeptResponse":{"type":"object","description":"사용자조직관리 Response DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]},"userId":{"type":"string","description":"부서에 매핑된 유저 아이디"},"level":{"type":"string","description":"부서 레벨"},"hierarchy":{"type":"string","description":"계층구조"},"hierarchyText":{"type":"string","description":"ex) 색조화장품>베이스 메이크업"},"leafYn":{"type":"string","description":"최하위여부"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/system/userDeptMgmt/getUserDeptList":{"get":{"tags":["사용자 조직 관리"],"summary":"하위 부서 목록 조회","description":"## 기능설명\n  * 화면에서 선택한 부서의 하위 부서 목록을 조회합니다.\n  ---\n  ## 상세설명\n  * 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.\n","operationId":"getUserDeptList_1","parameters":[{"name":"userDeptRequest","in":"query","required":true,"schema":{"$ref":"#/components/schemas/UserDeptRequest"}},{"name":"deptCd","in":"query","description":"부서코드","schema":{"type":"string"}},{"name":"pageIdx","in":"query","description":"페이지 번호","schema":{"type":"string"}},{"name":"rowsPerPage","in":"query","description":"페이지당 개수","schema":{"type":"string"}}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptResponse"}}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## 부서 계층구조 목록 조회

> \## 기능설명\
> \* 현재 저장되어 있는 부서 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UserDeptResponse":{"type":"object","description":"사용자조직관리 Response DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]},"userId":{"type":"string","description":"부서에 매핑된 유저 아이디"},"level":{"type":"string","description":"부서 레벨"},"hierarchy":{"type":"string","description":"계층구조"},"hierarchyText":{"type":"string","description":"ex) 색조화장품>베이스 메이크업"},"leafYn":{"type":"string","description":"최하위여부"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/system/userDeptMgmt/getUserDeptListWithHierarchy":{"get":{"tags":["사용자 조직 관리"],"summary":"부서 계층구조 목록 조회","description":"## 기능설명\n* 현재 저장되어 있는 부서 목록을 조회합니다.\n---\n## 상세설명\n* 현재 저장되어 있는 부서를 계층 구조로 최상위 부서부터 하위부서들을 조회합니다.\n","operationId":"getUserDeptListWithHierarchy","responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserDeptResponse"}}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

## 하위 부서 목록 건수 조회

> &#x20;\## 기능설명\
> &#x20; \* 화면에서 선택한 부서의 하위 부서 건수를 조회합니다.\
> &#x20; \---\
> &#x20; \## 상세설명\
> &#x20; \* 화면에서 선택한 부서의 하위 부서 건수를 조회합니다.<br>

```json
{"openapi":"3.1.0","info":{"title":"X2BEE BO API","version":"v1"},"servers":[{"url":"https://api-bo.x2bee.com/api/bo/","description":"prd"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"http","name":"accessToken","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UserDeptRequest":{"type":"object","description":"사용자조직관리 Request DTO","properties":{"deptCd":{"type":"string","description":"부서코드"},"deptNm":{"type":"string","description":"부서명"},"sortSeq":{"type":"string","description":"정렬순서"},"useYn":{"type":"string","description":"사용여부"},"uprDeptCd":{"type":"string","description":"상위부서코드"},"jobGrpCd":{"type":"string","description":"업무그룹코드","enum":["SYSTEM_MANAGER","MD","MARKETING","LGST_CNTR","CUST_CNTR","COOP_CORP","AFCR"]}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"result time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}}}}},"paths":{"/v1/system/userDeptMgmt/getUserDeptListCount":{"get":{"tags":["사용자 조직 관리"],"summary":"하위 부서 목록 건수 조회","description":" ## 기능설명\n  * 화면에서 선택한 부서의 하위 부서 건수를 조회합니다.\n  ---\n  ## 상세설명\n  * 화면에서 선택한 부서의 하위 부서 건수를 조회합니다.\n","operationId":"getUserDeptListCount","parameters":[{"name":"userDeptRequest","in":"query","required":true,"schema":{"$ref":"#/components/schemas/UserDeptRequest"}},{"name":"deptCd","in":"query","description":"부서코드","schema":{"type":"String"}}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"integer","format":"int32"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```
