Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự
Hai endpoint chỉ đọc, là bước chuẩn bị bắt buộc trước khi đồng bộ người dùng: hệ thống của bạn cần biết eContract gọi phòng ban và chức danh bằng mã nào.
#
Endpoint
Mục đích
1
GET /api/integration/directory/organizations
Cây đơn vị của tenant
2
GET /api/integration/directory/roles
Vai trò của tenant
Toàn bộ nhóm directory nói bằng mã, không bằng id số: code của đơn vị và vai trò chính là giá trị bạn gửi lại ở organizationCode / roleCode khi tạo hoặc cập nhật người dùng.
Nhóm directorychỉ nhận X-API-Key — không có đường đi bằng access token.
Loại key
tenantCode
Tenant được xác định là
Toàn cục (không gắn tổ chức)
Bắt buộc
Tổ chức có code trùng tenantCode
Theo tổ chức
Tuỳ chọn
Tổ chức của key. Gửi tenantCode thì phải trùng, lệch là 403
GET /api/integration/directory/organizations?tenantCode=ACMEX-API-Key: econtract_a1b2c3d4e5f6...
Với key toàn cục, tenantCode đi ở query string (request GET) hoặc trong body (request POST/PUT). Cả hai đều được đọc.
tenantCode phải chỉ tới đúng một tổ chức. organizations.code không có ràng buộc duy nhất trên toàn hệ thống, nên khi một mã trùng ở hai tổ chức, key toàn cục nhận 400TENANT_CODE_AMBIGUOUS thay vì bị gán bừa vào một tenant.
Đừng gắn API Key theo tổ chức vào tài khoản super admin. Endpoint /auth/login-server đổi một API Key hợp lệ thành access token của tài khoản gắn key mà không cần mật khẩu — key gắn super admin vì thế là thông tin xác thực cấp toàn hệ thống, không còn giới hạn trong một tenant. Hãy gắn vào tài khoản quản trị của chính tenant đó.
code của vai trò thường không phân biệt được gì. Trên dữ liệu thực tế, phần lớn vai trò dùng chung một mã mặc định (role) — kể cả nhiều vai trò trong cùng một đơn vị. Thứ duy nhất trong phạm vi một đơn vị là name.Vì vậy khi gán người dùng, hãy gửi organizationCode + roleName. Dùng roleCode chỉ an toàn khi tổ chức của bạn thật sự đặt mã riêng cho từng vai trò.
organizationCode trả về null khi đơn vị sở hữu vai trò đã bị xoá mềm. Vai trò vẫn được liệt kê để bạn thấy dữ liệu tồn đọng, nhưng đừng gán người dùng vào nó.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"econtractid","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/vtsdc/FB1AT8NrNJSxjOMU/logo/light.png?fit=max\u0026auto=format\u0026n=FB1AT8NrNJSxjOMU\u0026q=85\u0026s=bdc0b9079ef11c4f0d4729d58ec0e154","dark":"https://mintcdn.com/vtsdc/FB1AT8NrNJSxjOMU/logo/dark.png?fit=max\u0026auto=format\u0026n=FB1AT8NrNJSxjOMU\u0026q=85\u0026s=5257a003a6c14a33ed8753f51149461d"},"favicon":"https://mintcdn.com/vtsdc/y3pA_Im0OdMDRM8g/favicon.svg?fit=max\u0026auto=format\u0026n=y3pA_Im0OdMDRM8g\u0026q=85\u0026s=22f0e7f94806314a5917d32fe0ac7be9","navbar":{"links":[{"href":"/tai-tai-lieu","label":"Tải PDF"},{"href":"mailto:support@econtractid.vn","label":"Hỗ trợ"}],"primary":{"type":"button","label":"Đăng nhập","href":"https://app.econtractid.com/login-form"}},"footer":{"socials":{"x":"https://x.com/econtractid","github":"https://github.com/econtractid"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vtsdc","hasAudioNarration":false,"actualSubdomain":"vtsdc","customDomains":["docs.econtractid.com"],"gitSource":{"type":"gitlab","owner":"econtractid","repo":"econtract-docs","projectId":79740903,"deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ac615dffd4d8e7f7096c6e8","collectionId":"c0286d1d-1e21-4cf4-bc19-8a3a013657fc","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac615dffd4d8e7f7096c6e8"},"entitlements":{},"buildId":"6ac615dffd4d8e7f7096c6e8","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Hướng dẫn","count":17},{"language":"default","tag":"Hướng dẫn người dùng","count":12},{"language":"default","tag":"API Reference","count":10},{"language":"default","tag":"Quản trị","count":6},{"language":"default","tag":"Endpoints","count":4},{"language":"default","tag":"Webhook","count":3},{"language":"default","tag":"Bắt đầu","count":3},{"language":"default","tag":"Cài đặt","count":3},{"language":"default","tag":"Kỹ thuật \u0026 Tích hợp","count":2},{"language":"default","tag":"Tổng quan","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".evt{display:inline-block;padding:1px 8px;border-radius:999px;font-size:.72rem;font-weight:600;letter-spacing:.02em;white-space:nowrap;border:1px solid transparent}.evt-document{color:#1d4ed8;background:#dbeafe;border-color:#bfdbfe}.evt-notification{color:#047857;background:#d1fae5;border-color:#a7f3d0}.evt-test{color:#6d28d9;background:#ede9fe;border-color:#ddd6fe}.dark .evt-document{color:#93c5fd;background:rgba(59,130,246,.15);border-color:rgba(59,130,246,.35)}.dark .evt-notification{color:#6ee7b7;background:rgba(16,185,129,.15);border-color:rgba(16,185,129,.35)}.dark .evt-test{color:#c4b5fd;background:rgba(139,92,246,.15);border-color:rgba(139,92,246,.35)}.event-table table td:first-child,.event-table table th:first-child{white-space:nowrap}.event-table table td{vertical-align:top}.event-table table tbody tr:nth-child(even){background:rgba(100,116,139,.06)}"}],"page":{"pagePath":"api-reference/endpoint/danh-muc-to-chuc-vai-tro","slug":"/api-reference/endpoint/danh-muc-to-chuc-vai-tro","pageMetadata":{"title":"API Danh mục tổ chức \u0026 vai trò","description":"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự","icon":"sitemap","href":"/api-reference/endpoint/danh-muc-to-chuc-vai-tro"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Hai endpoint `,_jsx(_components.strong,{children:`chỉ đọc`}),`, là bước chuẩn bị bắt buộc trước khi đồng bộ người dùng: hệ thống của bạn cần biết eContract gọi phòng ban và chức danh bằng mã nào.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`#`}),_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Mục đích`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/integration/directory/organizations`})}),_jsx(_components.td,{children:`Cây đơn vị của tenant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/integration/directory/roles`})}),_jsx(_components.td,{children:`Vai trò của tenant`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Toàn bộ nhóm `,_jsx(_components.code,{children:`directory`}),` nói bằng `,_jsx(_components.strong,{children:`mã`}),`, không bằng id số: `,_jsx(_components.code,{children:`code`}),` của đơn vị và vai trò chính là giá trị bạn gửi lại ở `,_jsx(_components.code,{children:`organizationCode`}),` / `,_jsx(_components.code,{children:`roleCode`}),` khi `,_jsx(_components.a,{href:`/api-reference/endpoint/dong-bo-nguoi-dung`,children:`tạo hoặc cập nhật người dùng`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`base-url`,children:`Base URL`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Môi trường`}),_jsx(_components.th,{children:`Base URL`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Production`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://api.econtractid.com/api`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Development`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://api-dev.epaperless.vn/api`})})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`xác-thực`,children:`Xác thực`}),`\n`,_jsxs(_components.p,{children:[`Nhóm `,_jsx(_components.code,{children:`directory`}),` `,_jsxs(_components.strong,{children:[`chỉ nhận `,_jsx(_components.code,{children:`X-API-Key`})]}),` — không có đường đi bằng access token.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Loại key`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`tenantCode`})}),_jsx(_components.th,{children:`Tenant được xác định là`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Toàn cục`}),` (không gắn tổ chức)`]}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Bắt buộc`})}),_jsxs(_components.td,{children:[`Tổ chức có `,_jsx(_components.code,{children:`code`}),` trùng `,_jsx(_components.code,{children:`tenantCode`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Theo tổ chức`})}),_jsx(_components.td,{children:`Tuỳ chọn`}),_jsxs(_components.td,{children:[`Tổ chức của key. Gửi `,_jsx(_components.code,{children:`tenantCode`}),` thì phải trùng, lệch là `,_jsx(_components.code,{children:`403`})]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/integration/directory/organizations?tenantCode=ACME`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`X-API-Key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` econtract_a1b2c3d4e5f6...`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Với key toàn cục, `,_jsx(_components.code,{children:`tenantCode`}),` đi ở query string (request `,_jsx(_components.code,{children:`GET`}),`) hoặc trong body (request `,_jsx(_components.code,{children:`POST`}),`/`,_jsx(_components.code,{children:`PUT`}),`). Cả hai đều được đọc.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`tenantCode`}),` phải chỉ tới `,_jsx(_components.strong,{children:`đúng một`}),` tổ chức. `,_jsx(_components.code,{children:`organizations.code`}),` không có ràng buộc duy nhất trên toàn hệ thống, nên khi một mã trùng ở hai tổ chức, key toàn cục nhận `,_jsx(_components.code,{children:`400`}),` `,_jsx(_components.code,{children:`TENANT_CODE_AMBIGUOUS`}),` thay vì bị gán bừa vào một tenant.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Đừng gắn API Key theo tổ chức vào tài khoản super admin.`}),` Endpoint `,_jsx(_components.code,{children:`/auth/login-server`}),` đổi một API Key hợp lệ thành access token của tài khoản gắn key mà không cần mật khẩu — key gắn super admin vì thế là thông tin xác thực cấp toàn hệ thống, không còn giới hạn trong một tenant. Hãy gắn vào tài khoản quản trị của chính tenant đó.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`1-danh-sách-đơn-vị`,children:`1. Danh sách đơn vị`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/integration/directory/organizations`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`query`,children:`Query`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tham số`}),_jsx(_components.th,{children:`Kiểu`}),_jsx(_components.th,{children:`Mặc định`}),_jsx(_components.th,{children:`Mô tả`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tenantCode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Bắt buộc với key toàn cục`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Lọc đúng một đơn vị theo mã (khớp tuyệt đối)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`parentCode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Chỉ lấy đơn vị con trực tiếp của đơn vị này`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1`}),` hoạt động, `,_jsx(_components.code,{children:`2`}),` ngừng, `,_jsx(_components.code,{children:`3`}),` tạm khoá`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Loại đơn vị`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`q`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Tìm theo tên hoặc mã, không phân biệt hoa thường`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updatedFrom`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`ISO 8601 — chỉ lấy bản ghi sửa từ mốc này trở đi`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`updatedTo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`ISO 8601`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:`Trang, tính từ 1`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pageSize`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`50`})}),_jsxs(_components.td,{children:[`Tối đa `,_jsx(_components.code,{children:`200`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Công ty ACME\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parentCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"12 Nguyễn Huệ, Q1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"02838221234\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME-IT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Phòng Công nghệ thông tin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parentCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"address\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pageSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Trường`}),_jsx(_components.th,{children:`Mô tả`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code`})}),_jsxs(_components.td,{children:[`Mã đơn vị — giá trị dùng làm `,_jsx(_components.code,{children:`organizationCode`}),` khi gán người dùng`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`parentCode`})}),_jsxs(_components.td,{children:[`Mã đơn vị cha. `,_jsx(_components.code,{children:`null`}),` khi đây là gốc tenant, `,_jsx(_components.strong,{children:`hoặc`}),` khi cha nằm ngoài tenant của bạn`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1`}),` hoạt động, `,_jsx(_components.code,{children:`2`}),` ngừng, `,_jsx(_components.code,{children:`3`}),` tạm khoá. Dữ liệu cũ có thể mang giá trị khác`]})]})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Kết quả luôn giới hạn trong cây tenant đã phân giải. Đơn vị của tenant khác không bao giờ xuất hiện, kể cả khi trùng mã.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`2-danh-sách-vai-trò`,children:`2. Danh sách vai trò`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/integration/directory/roles`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`query-2`,children:`Query`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tham số`}),_jsx(_components.th,{children:`Kiểu`}),_jsx(_components.th,{children:`Mặc định`}),_jsx(_components.th,{children:`Mô tả`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tenantCode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Bắt buộc với key toàn cục`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Lọc đúng một vai trò theo mã`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`organizationCode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Chỉ lấy vai trò thuộc đơn vị này`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Trạng thái vai trò`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isDepartmentHead`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`boolean`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` chỉ lấy vai trò trưởng đơn vị`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`q`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Tìm theo tên hoặc mã`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`updatedFrom`}),` / `,_jsx(_components.code,{children:`updatedTo`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`ISO 8601`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pageSize`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`integer`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`50`})}),_jsxs(_components.td,{children:[`Tối đa `,_jsx(_components.code,{children:`200`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response-2`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NHANVIEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Nhân viên\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"organizationCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME-IT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isDepartmentHead\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUONGPHONG\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trưởng phòng\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"organizationCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACME-IT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isDepartmentHead\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pageSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`code`}),` của vai trò thường không phân biệt được gì.`]}),` Trên dữ liệu thực tế, phần lớn vai trò dùng chung một mã mặc định (`,_jsx(_components.code,{children:`role`}),`) — kể cả nhiều vai trò trong cùng một đơn vị. Thứ duy nhất trong phạm vi một đơn vị là `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`name`})}),`.`]}),_jsxs(_components.p,{children:[`Vì vậy khi `,_jsx(_components.a,{href:`/api-reference/endpoint/dong-bo-nguoi-dung`,children:`gán người dùng`}),`, hãy gửi `,_jsx(_components.code,{children:`organizationCode`}),` + `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`roleName`})}),`. Dùng `,_jsx(_components.code,{children:`roleCode`}),` chỉ an toàn khi tổ chức của bạn thật sự đặt mã riêng cho từng vai trò.`]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`organizationCode`}),` trả về `,_jsx(_components.code,{children:`null`}),` khi đơn vị sở hữu vai trò đã bị xoá mềm. Vai trò vẫn được liệt kê để bạn thấy dữ liệu tồn đọng, nhưng đừng gán người dùng vào nó.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`mã-lỗi`,children:`Mã lỗi`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`Nguyên nhân`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TENANT_CODE_REQUIRED`})}),_jsxs(_components.td,{children:[`Dùng key toàn cục nhưng không gửi `,_jsx(_components.code,{children:`tenantCode`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TENANT_CODE_AMBIGUOUS`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`tenantCode`}),` trùng ở nhiều tổ chức`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TENANT_CODE_MISMATCH`})}),_jsxs(_components.td,{children:[`Key gắn tổ chức A nhưng `,_jsx(_components.code,{children:`tenantCode`}),` chỉ tới tổ chức B`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TENANT_CODE_NOT_FOUND`})}),_jsx(_components.td,{children:`Không có tổ chức nào mang mã đó`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ORGANIZATION_CODE_NOT_FOUND`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`organizationCode`}),` / `,_jsx(_components.code,{children:`parentCode`}),` không có trong tenant`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ORGANIZATION_CODE_AMBIGUOUS`})}),_jsx(_components.td,{children:`Mã đơn vị trùng ở nhiều bản ghi trong tenant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`API_KEY_LEGACY_NOT_SUPPORTED`})}),_jsx(_components.td,{children:`Dùng API Key kiểu cũ (lưu dạng plaintext, không thu hồi được)`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Danh sách đầy đủ: `,_jsx(_components.a,{href:`/api-reference/ma-loi`,children:`Mã lỗi`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"API Danh mục tổ chức \u0026 vai trò","description":"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự","icon":"sitemap","href":"/api-reference/endpoint/danh-muc-to-chuc-vai-tro"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Base URL","slug":"base-url","depth":2,"children":[]},{"title":"Xác thực","slug":"xác-thực","depth":2,"children":[]},{"title":"1. Danh sách đơn vị","slug":"1-danh-sách-đơn-vị","depth":2,"children":[{"title":"Query","slug":"query","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}]},{"title":"2. Danh sách vai trò","slug":"2-danh-sách-vai-trò","depth":2,"children":[{"title":"Query","slug":"query-2","depth":3,"children":[]},{"title":"Response","slug":"response-2","depth":3,"children":[]}]},{"title":"Mã lỗi","slug":"mã-lỗi","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"vtsdc","siteName":"econtractid","title":"API Danh mục tổ chức \u0026 vai trò - econtractid","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T10:48:18.407Z","originalFileLocation":"api-reference/endpoint/danh-muc-to-chuc-vai-tro.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\">\u003cmeta data-mint-head name=\"application-name\" content=\"econtractid\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"API Danh mục tổ chức \u0026amp; vai trò - econtractid\">\u003cmeta data-mint-head property=\"og:description\" content=\"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"econtractid\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vtsdc.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=API+Danh+m%E1%BB%A5c+t%E1%BB%95+ch%E1%BB%A9c+%26+vai+tr%C3%B2\u0026amp;description=%C4%90%E1%BB%8Dc+c%C3%A2y+%C4%91%C6%A1n+v%E1%BB%8B+v%C3%A0+danh+s%C3%A1ch+vai+tr%C3%B2+c%E1%BB%A7a+m%E1%BB%99t+tenant+%C4%91%E1%BB%83+map+sang+ph%C3%B2ng+ban%2C+ch%E1%BB%A9c+danh+b%C3%AAn+h%E1%BB%87+th%E1%BB%91ng+nh%C3%A2n+s%E1%BB%B1\u0026amp;theme=1b2f33b2c4bb282da1ea47b7\u0026amp;signature=1461ecb0ad86f4fad3807f04293ca3f693337c52ffbc4ed1365c228bf252814a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"API Danh mục tổ chức \u0026amp; vai trò - econtractid\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vtsdc.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=API+Danh+m%E1%BB%A5c+t%E1%BB%95+ch%E1%BB%A9c+%26+vai+tr%C3%B2\u0026amp;description=%C4%90%E1%BB%8Dc+c%C3%A2y+%C4%91%C6%A1n+v%E1%BB%8B+v%C3%A0+danh+s%C3%A1ch+vai+tr%C3%B2+c%E1%BB%A7a+m%E1%BB%99t+tenant+%C4%91%E1%BB%83+map+sang+ph%C3%B2ng+ban%2C+ch%E1%BB%A9c+danh+b%C3%AAn+h%E1%BB%87+th%E1%BB%91ng+nh%C3%A2n+s%E1%BB%B1\u0026amp;theme=1b2f33b2c4bb282da1ea47b7\u0026amp;signature=1461ecb0ad86f4fad3807f04293ca3f693337c52ffbc4ed1365c228bf252814a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/vtsdc/6cAblnJaQVzqfIn1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"econtractid\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/danh-muc-to-chuc-vai-tro.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.econtractid.com/#organization\",\"name\":\"econtractid\",\"url\":\"https://docs.econtractid.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vtsdc/FB1AT8NrNJSxjOMU/logo/light.png?fit=max\u0026auto=format\u0026n=FB1AT8NrNJSxjOMU\u0026q=85\u0026s=bdc0b9079ef11c4f0d4729d58ec0e154\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.econtractid.com#website\",\"name\":\"econtractid\",\"url\":\"https://docs.econtractid.com\",\"publisher\":{\"@id\":\"https://docs.econtractid.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro#webpage\",\"url\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro\",\"name\":\"API Danh mục tổ chức \u0026 vai trò\",\"description\":\"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\",\"dateModified\":\"2026-09-15T10:48:18.407Z\",\"isPartOf\":{\"@id\":\"https://docs.econtractid.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.econtractid.com/api-reference/endpoint/ho-so\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Danh mục tổ chức \u0026 vai trò\",\"item\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro#article\",\"headline\":\"API Danh mục tổ chức \u0026 vai trò\",\"name\":\"API Danh mục tổ chức \u0026 vai trò\",\"description\":\"Đọc cây đơn vị và danh sách vai trò của một tenant để map sang phòng ban, chức danh bên hệ thống nhân sự\",\"url\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro\",\"mainEntityOfPage\":{\"@id\":\"https://docs.econtractid.com/api-reference/endpoint/danh-muc-to-chuc-vai-tro#webpage\"},\"dateModified\":\"2026-09-15T10:48:18.407Z\",\"publisher\":{\"@id\":\"https://docs.econtractid.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.econtractid.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"econtractid\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"econtractid","nav":{"global":null,"tabs":[{"tab":"Hướng dẫn","icon":"book-open","pages":[{"title":"Hướng dẫn","href":""}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Tổng quan","icon":"circle-info","pages":[{"title":"Giới thiệu API","icon":"book","href":"/api-reference/introduction"}]},{"group":"Xác thực","icon":"key","pages":[{"title":"Xác thực","icon":"key","href":"/api-reference/xac-thuc"}]},{"group":"Endpoints","icon":"plug","pages":[{"title":"API Hồ sơ","icon":"file-signature","href":"/api-reference/endpoint/ho-so"},{"title":"API Công việc ký","description":"Danh sách hồ sơ cần ký / đã ký, chi tiết một công việc, và lịch sử phê duyệt của hồ sơ","icon":"list-check","href":"/api-reference/endpoint/cong-viec-ky"},{"title":"API Danh mục tổ chức \u0026 vai trò","icon":"sitemap","href":"/api-reference/endpoint/danh-muc-to-chuc-vai-tro"},{"title":"API Đồng bộ người dùng","description":"Tạo, cập nhật, khoá và tra cứu người dùng từ hệ thống nhân sự, đồng bộ theo mã nhân sự","icon":"users","href":"/api-reference/endpoint/dong-bo-nguoi-dung"}]},{"group":"Webhook","icon":"bell","pages":[{"title":"Webhook","sidebarTitle":"Tổng quan \u0026 bảo mật","icon":"bell","href":"/api-reference/webhook"},{"title":"Danh mục event","icon":"list-check","href":"/api-reference/webhook-su-kien"},{"title":"Payload tham chiếu","icon":"brackets-curly","href":"/api-reference/webhook-payload"}]},{"group":"Mã lỗi","icon":"triangle-exclamation","pages":[{"title":"Mã lỗi","icon":"triangle-exclamation","href":"/api-reference/ma-loi"}]}]}]},"basePath":"","title":"API Danh mục tổ chức \u0026 vai trò - econtractid","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}