naftiko: 1.0.0-alpha2 info: label: Endpoints — subpackage_organizationStructure description: 'Endpoints — subpackage_organizationStructure. 11 operations. Lead operation: Retrieve custom fields for organization. Self-contained Naftiko capability covering one Deel business surface.' tags: - Deel - subpackage_organizationStructure created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DEEL_API_KEY: DEEL_API_KEY capability: consumes: - type: http namespace: custom-fields-endpoints-subpackage-organizationstructure baseUri: https://api.letsdeel.com/rest/v2 description: Endpoints — subpackage_organizationStructure business capability. Self-contained, no shared references. resources: - name: hris-organization-structures-teams-team_id-custom-fields path: /hris/organization-structures/teams/{team_id}/custom-fields operations: - name: getteamcustomfields method: GET description: Retrieve custom fields for organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: team_id in: path type: string description: Public ID (UUID) of the HRIS team/organization structure required: true - name: limit in: query type: integer description: Max items per page (default 20, max 100) - name: cursor in: query type: string description: Opaque cursor for pagination - name: Authorization in: header type: string description: '## Authentication' required: true - name: updateteamcustomfields method: PATCH description: Update organization structure team custom fields outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: team_id in: path type: string description: Public ID (UUID) of the HRIS team/organization structure required: true - name: Authorization in: header type: string description: '## Authentication' required: true - name: body in: body type: object description: Request body (JSON). required: false - name: hris-organization_structures path: /hris/organization_structures operations: - name: createorganizationstructure method: POST description: Create a new HRIS Organization Structure. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Authorization in: header type: string description: '## Authentication' required: true - name: body in: body type: object description: Request body (JSON). required: false - name: getorganizationstructures method: GET description: Get Organization Structure outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: offset in: query type: integer description: Return a page of results with given number of records. - name: limit in: query type: number description: Return a page of results with given number of records. - name: Authorization in: header type: string description: '## Authentication' required: true - name: hris-organization_structures-external-external_id path: /hris/organization_structures/external/{external_id} operations: - name: deleteorganizationstructurebyexternalid method: DELETE description: Delete an Org Structure from the Organization by external ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: external_id in: path type: string description: External ID required: true - name: Authorization in: header type: string description: '## Authentication' required: true - name: getorganizationstructurebyexternalid method: GET description: Fetch an Org Structure from the Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: external_id in: path type: string description: External ID required: true - name: Authorization in: header type: string description: '## Authentication' required: true - name: updateorganizationstructurebyexternalid method: PATCH description: Update an existing HRIS Org Structure by external ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: external_id in: path type: string description: External ID required: true - name: Authorization in: header type: string description: '## Authentication' required: true - name: body in: body type: object description: Request body (JSON). required: false - name: hris-organization_structures-hrisOrgStr_id path: /hris/organization_structures/{hrisOrgStr_id} operations: - name: deleteorganizationstructure method: DELETE description: Delete Organization Structure outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hrisOrgStr_id in: path type: string required: true - name: getorganizationstructure method: GET description: Get Organization Structure outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hrisOrgStr_id in: path type: string required: true - name: updateorganizationstructure method: PATCH description: Update Organization Structure outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hrisOrgStr_id in: path type: string required: true - name: people-id-department path: /people/{id}/department operations: - name: updatepersondepartment method: PUT description: Update organization structure outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: Hris profile ID required: true - name: replace_other_positions in: query type: boolean description: Indicates if this department position should replace all other positions or only append to the existing ones. - name: Authorization in: header type: string description: '## Authentication' required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.DEEL_API_KEY}}' exposes: - type: rest namespace: custom-fields-endpoints-subpackage-organizationstructure-rest port: 8080 description: REST adapter for Endpoints — subpackage_organizationStructure. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/hris/organization-structures/teams/{team-id}/custom-fields name: hris-organization-structures-teams-team-id-custom-fields description: REST surface for hris-organization-structures-teams-team_id-custom-fields. operations: - method: GET name: getteamcustomfields description: Retrieve custom fields for organization call: custom-fields-endpoints-subpackage-organizationstructure.getteamcustomfields with: team_id: rest.team_id limit: rest.limit cursor: rest.cursor Authorization: rest.Authorization outputParameters: - type: object mapping: $. - method: PATCH name: updateteamcustomfields description: Update organization structure team custom fields call: custom-fields-endpoints-subpackage-organizationstructure.updateteamcustomfields with: team_id: rest.team_id Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - path: /v1/hris/organization-structures name: hris-organization-structures description: REST surface for hris-organization_structures. operations: - method: POST name: createorganizationstructure description: Create a new HRIS Organization Structure. call: custom-fields-endpoints-subpackage-organizationstructure.createorganizationstructure with: Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - method: GET name: getorganizationstructures description: Get Organization Structure call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructures with: offset: rest.offset limit: rest.limit Authorization: rest.Authorization outputParameters: - type: object mapping: $. - path: /v1/hris/organization-structures/external/{external-id} name: hris-organization-structures-external-external-id description: REST surface for hris-organization_structures-external-external_id. operations: - method: DELETE name: deleteorganizationstructurebyexternalid description: Delete an Org Structure from the Organization by external ID call: custom-fields-endpoints-subpackage-organizationstructure.deleteorganizationstructurebyexternalid with: external_id: rest.external_id Authorization: rest.Authorization outputParameters: - type: object mapping: $. - method: GET name: getorganizationstructurebyexternalid description: Fetch an Org Structure from the Organization call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructurebyexternalid with: external_id: rest.external_id Authorization: rest.Authorization outputParameters: - type: object mapping: $. - method: PATCH name: updateorganizationstructurebyexternalid description: Update an existing HRIS Org Structure by external ID call: custom-fields-endpoints-subpackage-organizationstructure.updateorganizationstructurebyexternalid with: external_id: rest.external_id Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - path: /v1/hris/organization-structures/{hrisorgstr-id} name: hris-organization-structures-hrisorgstr-id description: REST surface for hris-organization_structures-hrisOrgStr_id. operations: - method: DELETE name: deleteorganizationstructure description: Delete Organization Structure call: custom-fields-endpoints-subpackage-organizationstructure.deleteorganizationstructure with: hrisOrgStr_id: rest.hrisOrgStr_id outputParameters: - type: object mapping: $. - method: GET name: getorganizationstructure description: Get Organization Structure call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructure with: hrisOrgStr_id: rest.hrisOrgStr_id outputParameters: - type: object mapping: $. - method: PATCH name: updateorganizationstructure description: Update Organization Structure call: custom-fields-endpoints-subpackage-organizationstructure.updateorganizationstructure with: hrisOrgStr_id: rest.hrisOrgStr_id outputParameters: - type: object mapping: $. - path: /v1/people/{id}/department name: people-id-department description: REST surface for people-id-department. operations: - method: PUT name: updatepersondepartment description: Update organization structure call: custom-fields-endpoints-subpackage-organizationstructure.updatepersondepartment with: id: rest.id replace_other_positions: rest.replace_other_positions Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: custom-fields-endpoints-subpackage-organizationstructure-mcp port: 9090 transport: http description: MCP adapter for Endpoints — subpackage_organizationStructure. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: retrieve-custom-fields-organization description: Retrieve custom fields for organization hints: readOnly: true destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.getteamcustomfields with: team_id: tools.team_id limit: tools.limit cursor: tools.cursor Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: update-organization-structure-team-custom description: Update organization structure team custom fields hints: readOnly: false destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.updateteamcustomfields with: team_id: tools.team_id Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: create-new-hris-organization-structure description: Create a new HRIS Organization Structure. hints: readOnly: false destructive: false idempotent: false call: custom-fields-endpoints-subpackage-organizationstructure.createorganizationstructure with: Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: get-organization-structure description: Get Organization Structure hints: readOnly: true destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructures with: offset: tools.offset limit: tools.limit Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: delete-org-structure-organization-external description: Delete an Org Structure from the Organization by external ID hints: readOnly: false destructive: true idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.deleteorganizationstructurebyexternalid with: external_id: tools.external_id Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: fetch-org-structure-organization description: Fetch an Org Structure from the Organization hints: readOnly: true destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructurebyexternalid with: external_id: tools.external_id Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: update-existing-hris-org-structure description: Update an existing HRIS Org Structure by external ID hints: readOnly: false destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.updateorganizationstructurebyexternalid with: external_id: tools.external_id Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: delete-organization-structure description: Delete Organization Structure hints: readOnly: false destructive: true idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.deleteorganizationstructure with: hrisOrgStr_id: tools.hrisOrgStr_id outputParameters: - type: object mapping: $. - name: get-organization-structure-2 description: Get Organization Structure hints: readOnly: true destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.getorganizationstructure with: hrisOrgStr_id: tools.hrisOrgStr_id outputParameters: - type: object mapping: $. - name: update-organization-structure description: Update Organization Structure hints: readOnly: false destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.updateorganizationstructure with: hrisOrgStr_id: tools.hrisOrgStr_id outputParameters: - type: object mapping: $. - name: update-organization-structure-2 description: Update organization structure hints: readOnly: false destructive: false idempotent: true call: custom-fields-endpoints-subpackage-organizationstructure.updatepersondepartment with: id: tools.id replace_other_positions: tools.replace_other_positions Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $.