swagger: '2.0'
info:
  title: common api
  description: common api for automation tools
  version: 1.0.0
host: ipaas-api.yesod.io
basePath: /
schemes:
  - https
consumes: []
produces:
  - application/json
paths:
  /api/yesod/v22.10/query:
    post:
      responses:
        '200':
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: query_schema
              parameters:
                base:
                  parameter: base
                from:
                  parameter: from
                to:
                  parameter: to
                body:
                  parameter: body
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
        default:
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: query_schema
              parameters:
                base:
                  parameter: base
                from:
                  parameter: from
                to:
                  parameter: to
                body:
                  parameter: body
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
      summary: query
      description: YESOD Query execution endpoint
      operationId: query
      parameters:
        - $ref: '#/parameters/baseParam'
        - $ref: '#/parameters/fromParam'
        - $ref: '#/parameters/toParam'
        - $ref: '#/parameters/bodyParam'
        - $ref: '#/parameters/is_split_with_company_Param'
        - $ref: '#/parameters/is_split_with_organization_Param'
        - $ref: '#/parameters/is_split_with_office_Param'
        - $ref: '#/parameters/is_split_with_project_Param'
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
  /api/yesod/v20.06/groupTree:
    get:
      responses:
        '200':
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: groups_schema
              parameters:
                date:
                  parameter: date
                groupType:
                  parameter: groupType
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
        default:
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: groups_schema
              parameters:
                date:
                  parameter: date
                groupType:
                  parameter: groupType
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
      summary: groups
      description: groups
      operationId: groups
      parameters:
        - name: date
          in: query
          required: false
          type: string
          x-ms-summary: date
        - name: groupType
          in: query
          required: true
          type: string
          x-ms-summary: groupType
          description: Group type (company, organization, office, or project)
          enum:
            - company
            - organization
            - office
            - project
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
  /api/yesod/v22.10/authorityTasks:
    get:
      summary: authorityTasks
      description: Get authority tasks from YESOD
      operationId: authorityTasks
      parameters:
        - $ref: '#/parameters/fromParam'
        - $ref: '#/parameters/daysParam'
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
      responses:
        '200':
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: authority_tasks_schema
              parameters:
                from:
                  parameter: from
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
        default:
          description: default
          schema:
            x-ms-dynamic-schema:
              operationId: authority_tasks_schema
              parameters:
                from:
                  parameter: from
                X-YESOD-BASE-URI:
                  parameter: X-YESOD-BASE-URI
              value-path: schema
  /openapi/yesod/v22.10/query/schema:
    post:
      summary: query_schema
      operationId: query_schema
      parameters:
        - $ref: '#/parameters/baseParam'
        - $ref: '#/parameters/fromParam'
        - $ref: '#/parameters/toParam'
        - $ref: '#/parameters/bodyParam'
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              schema:
                type: object
      x-ms-visibility: internal
  /openapi/yesod/v22.10/authority-tasks/schema:
    post:
      summary: authority_tasks_schema
      operationId: authority_tasks_schema
      parameters:
        - $ref: '#/parameters/fromParam'
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              schema:
                type: object
      x-ms-visibility: internal
  /openapi/yesod/v20.06/groups/schema:
    post:
      summary: groups_schema
      operationId: groups_schema
      parameters:
        - name: date
          in: query
          required: false
          type: string
        - name: groupType
          in: query
          required: true
          type: string
          description: Group type (company, organization, office, or project)
          enum:
            - company
            - organization
            - office
            - project
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
      responses:
        default:
          description: default
          schema:
            type: object
            properties:
              schema:
                type: object
      x-ms-visibility: internal
  /api/yesod/v21.07/groups/import:
    post:
      responses:
        '200':
          description: Success response
          schema:
            $ref: '#/definitions/ImportSuccessResponse'
        '409':
          description: Error response - Failed to process import
          schema:
            $ref: '#/definitions/ImportErrorResponse'
      summary: import_yesod_groups
      description: >-
        Import group data to YESOD. Supports matching by organization, company,
        office, and project group codes. Set importAndApply=true to apply changes immediately.
      operationId: import_yesod_groups
      parameters:
        - name: body
          in: body
          required: true
          schema:
            type: object
            required:
              - csv
              - options
            properties:
              csv:
                type: string
                description: CSV data to import
                x-ms-summary: インポートするCSV文字列
              options:
                type: object
                required:
                  - mapping
                x-ms-summary: オプション設定
                properties:
                  mapping:
                    type: string
                    description: Field mapping configuration
                    x-ms-summary: YESOD属性とのマッピング
                  changeDate:
                    type: string
                    description: Date when changes take effect
                    x-ms-summary: 変更日付　※初期登録時は会社の創業年月日を入れてください
                  retireUnlisted:
                    type: boolean
                    description: Retire/remove unlisted records
                    x-ms-summary: インポートデータに存在しないレコードを退職/削除する場合にYESを指定
                  applicationName:
                    type: string
                    description: Management name for changes
                    x-ms-summary: 変更予定一覧に表示される名称
                  tierSeparator:
                    type: string
                    description: Separator for representing hierarchies
                    x-ms-summary: 一つのセルの中で階層を表現する際に使用するセパレータ文字
                  separateByDate:
                    type: boolean
                    description: Separate changes by date
                    x-ms-summary: 日付ごとに変更を保存する際にYESを指定
                  defaultCompanyEntityId:
                    type: string
                    description: Company entity ID to assign members to
                    x-ms-summary: 所属するデフォルト会社ID
                  modifyGroup:
                    type: string
                    description: Modify group settings
                    x-ms-summary: グループ変更設定
                  referenceSeparator:
                    type: string
                    description: Separator for multiple references
                    x-ms-summary: 一つのセルの中で複数のリファレンスを表現する際に使用するセパレータ文字
                description: Import options
              importAndApply:
                type: boolean
                default: false
                description: Set to true to apply changes immediately after import
                x-ms-summary: インポート後に変更を即時適用する場合はtrueを指定
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
  /api/yesod/v21.07/transactions/import:
    post:
      responses:
        '200':
          description: Success response
          schema:
            $ref: '#/definitions/ImportSuccessResponse'
        '409':
          description: Error response - Failed to process import
          schema:
            $ref: '#/definitions/ImportErrorResponse'
      summary: import_yesod_transactions
      description: >-
        Import transactions with specified operations (add/modify/delete).
        Supports importing for members and groups with CSV mapping to YESOD
        attributes. Set importAndApply=true to apply changes immediately.
      operationId: import_yesod_transactions
      parameters:
        - name: body
          in: body
          required: true
          schema:
            type: object
            required:
              - csv
              - options
            properties:
              csv:
                type: string
                description: CSV data to import
                x-ms-summary: インポートするCSV文字列
              options:
                type: object
                required:
                  - mapping
                x-ms-summary: オプション設定
                properties:
                  mapping:
                    type: string
                    description: Field mapping configuration
                    x-ms-summary: YESOD属性とのマッピング
                  optionMapping:
                    type: string
                    description: Value transformation mapping
                    x-ms-summary: >-
                      YESODのSELECT型の項目の値と、CSVファイルの値の変換が必要な場合にマッピングを指定します。マッピングは
                      CSVファイルの値: YESODのSELECT型の項目の値の形式で表現します。
                       を区切り文字として使用可能。
                  changeDate:
                    type: string
                    description: Date when changes take effect
                    x-ms-summary: 変更日付　※初期登録時は会社の創業年月日を入れてください
                  valueForDelete:
                    type: boolean
                    description: Delete unlisted records
                    x-ms-summary: インポートデータに存在しないレコードを削除する場合にYESを指定
                  tierSeparator:
                    type: string
                    description: Separator for representing hierarchies
                    x-ms-summary: 一つのセルの中で階層を表現する際に使用するセパレータ文字
                  referenceSeparator:
                    type: string
                    description: Separates multiple affiliations
                    x-ms-summary: 一つのセルの中で複数のリファレンスを表現する際に使用するセパレータ文字
                description: Import options
              importAndApply:
                type: boolean
                default: false
                description: Set to true to apply changes immediately after import
                x-ms-summary: インポート後に変更を即時適用する場合はtrueを指定
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
  /api/yesod/v21.07/members/import:
    post:
      responses:
        '200':
          description: Success response
          schema:
            $ref: '#/definitions/ImportSuccessResponse'
        '409':
          description: Error response - Failed to process import
          schema:
            $ref: '#/definitions/ImportErrorResponse'
      summary: import_yesod_members
      description: >-
        Import member (user) data to YESOD. Supports matching by ID, employee
        number, or email address. Set importAndApply=true to apply changes immediately.
      operationId: import_yesod_members
      parameters:
        - name: body
          in: body
          required: true
          schema:
            type: object
            required:
              - csv
              - options
            properties:
              csv:
                type: string
                description: CSV data to import
                x-ms-summary: インポートするCSV文字列
              options:
                type: object
                required:
                  - mapping
                x-ms-summary: オプション設定
                properties:
                  mapping:
                    type: string
                    description: Field mapping configuration (e.g. "name:氏名,email:メールアドレス")
                    x-ms-summary: YESOD属性とのマッピング
                  optionMapping:
                    type: string
                    description: Value transformation mapping (e.g. "Male:男性,Female:女性")
                    x-ms-summary: >-
                      YESODのSELECT型の項目の値と、CSVファイルの値の変換が必要な場合にマッピングを指定します。マッピングは
                      CSVファイルの値: YESODのSELECT型の項目の値の形式で表現します。
                       を区切り文字として使用可能。
                  changeDate:
                    type: string
                    description: >-
                      Date when changes take effect (format YYYY-MM-DD or
                      YYYY/MM/DD)
                    x-ms-summary: 変更日付　※初期登録時は会社の創業年月日を入れてください
                  retireUnlisted:
                    type: boolean
                    description: Retire/remove unlisted records
                    x-ms-summary: インポートデータに存在しないレコードを退職/削除する場合にYESを指定
                  separateByDate:
                    type: boolean
                    description: Separate changes by date
                    x-ms-summary: 日付ごとに変更を保存する際にYESを指定
                  applicationName:
                    type: string
                    description: Management name for changes
                    x-ms-summary: 変更予定一覧に表示される名称
                  tierSeparator:
                    type: string
                    description: Separator for representing hierarchies (default "/")
                    x-ms-summary: 一つのセルの中で階層を表現する際に使用するセパレータ文字
                  referenceSeparator:
                    type: string
                    description: Separator for multiple references (default ",")
                    x-ms-summary: 一つのセルの中で複数のリファレンスを表現する際に使用するセパレータ文字
                  modifyGroup:
                    type: string
                    description: Modify group settings
                    x-ms-summary: グループ変更設定
                  defaultCompanyEntityId:
                    type: string
                    description: Company entity ID to assign members to
                    x-ms-summary: 所属するデフォルト会社ID
                  memberAttributeForName:
                    type: string
                    description: Member attribute mapping for name field
                    x-ms-summary: メンバー属性名用のマッピング
                  memberAttributeForEmail:
                    type: string
                    description: Member attribute mapping for email field
                    x-ms-summary: メンバーメールアドレス用のマッピング
                  restrictCompanyScope:
                    type: string
                    description: Restrict update scope for company-related attributes
                    x-ms-summary: 会社属性の更新範囲制限
                  restrictOrganizationScope:
                    type: string
                    description: Restrict update scope for organization-related attributes
                    x-ms-summary: 組織属性の更新範囲制限
                  restrictOfficeScope:
                    type: string
                    description: Restrict update scope for office-related attributes
                    x-ms-summary: オフィス属性の更新範囲制限
                  restrictProjectScope:
                    type: string
                    description: Restrict update scope for project-related attributes
                    x-ms-summary: プロジェクト属性の更新範囲制限
                  avoidUnlistedEmails:
                    type: string
                    description: Email exclusion list (comma-separated)
                    x-ms-summary: 除外メールアドレスリスト
                  rootOrganizationEntityId:
                    type: string
                    description: Root organization entity reference
                    x-ms-summary: ルート組織エンティティID
                description: Import options
              importAndApply:
                type: boolean
                default: false
                description: Set to true to apply changes immediately after import
                x-ms-summary: インポート後に変更を即時適用する場合はtrueを指定
        - $ref: '#/parameters/X_YESOD_BASE_URI_Param'
definitions:
  QueryResponseItem:
    type: object
    properties:
      id:
        type: string
        description: id
      会社:
        type: string
        description: 会社
      社員番号:
        type: string
        description: 社員番号
      在籍状況:
        type: string
        description: 在籍状況
      雇用形態:
        type: string
        description: 雇用形態
      メールアドレス:
        type: string
        description: メールアドレス
      姓:
        type: string
        description: 姓
      名:
        type: string
        description: 名
      姓(ローマ字):
        type: string
        description: 姓(ローマ字)
      名(ローマ字):
        type: string
        description: 名(ローマ字)
      性別:
        type: string
        description: 性別
      組織:
        type: string
        description: 組織
      役職:
        type: string
        description: 役職
      事業所:
        type: string
        description: 事業所
      肩書き:
        type: string
        description: 肩書き
      生年月日:
        type: string
        description: 生年月日
  ImportSuccessResponse:
    type: object
    description: YESOD Import API success response
    properties:
      diffIds:
        type: array
        items:
          type: string
        description: Array of diff IDs created by the import
      changing:
        type: array
        items:
          $ref: '#/definitions/ChangingItem'
        description: Array of changes that will be applied
      changingCSVPositions:
        type: array
        items:
          $ref: '#/definitions/ChangingCSVPosition'
        description: CSV positions of the changes
  ImportErrorResponse:
    type: object
    description: YESOD Import API error response (status 409)
    properties:
      messages:
        type: string
        description: Error message
      errors:
        type: array
        items:
          $ref: '#/definitions/ErrorItem'
        description: Array of error details
  ChangingItem:
    type: object
    description: Change information with date and affected entities
    properties:
      changeDate:
        type: number
        description: Unix timestamp in milliseconds
      changingEntities:
        type: array
        items:
          $ref: '#/definitions/ChangingEntity'
        description: Entities affected by this change
  ChangingEntity:
    type: object
    description: Entity change details
    properties:
      entityId:
        type: string
        description: Entity ID
      count:
        type: number
        description: Number of changes for this entity
  ChangingCSVPosition:
    type: object
    description: CSV position information for changes
    properties:
      lineNumber:
        type: number
        description: Line number in CSV (0-indexed)
      columnNumbers:
        type: array
        items:
          type: number
        description: Column numbers that changed
  ErrorItem:
    type: object
    description: Error details
    properties:
      message:
        type: string
        description: Error message
parameters:
  baseParam:
    name: base
    in: query
    required: false
    type: string
    x-ms-summary: basedate
  fromParam:
    name: from
    in: query
    required: false
    type: string
    format: date
    x-ms-summary: from
    description: Start date for retrieving changes (YYYY-MM-DD format)
  daysParam:
    name: days
    in: query
    required: false
    type: integer
    default: 7
    x-ms-summary: days
    description: Number of days to retrieve from the start date (default is 7)
  toParam:
    name: to
    in: query
    required: false
    type: string
    x-ms-summary: to
  bodyParam:
    name: body
    in: body
    required: true
    x-ms-summary: Query Body
    schema:
      type: object
      example:
        query:
          type: AttributeQuery
          condition:
            attributeId: "4J9wMPgDQJmki9ycfx-Z7g"
            comparisonOperator: "ISNOTNULL"
          onlyLatestData: false
        attributeSelector:
          - "4J9wMPgDQJmki9ycfx-Z7g"
          - "2vnEtwhiRcGv5IxcP-QuYA"
        groupAttributeSelector: []
  is_split_with_company_Param:
    name: is_split_with_company
    in: query
    required: false
    type: boolean
    description: 会社分割オプション（GetConfigValue("is_split_with_company") == "true"）
    x-ms-summary: 複数の会社を行単位で出力する
  is_split_with_organization_Param:
    name: is_split_with_organization
    in: query
    required: false
    type: boolean
    description: 組織分割オプション（GetConfigValue("is_split_with_organization") == "true"）
    x-ms-summary: 複数の組織を行単位で出力する
  is_split_with_office_Param:
    name: is_split_with_office
    in: query
    required: false
    type: boolean
    description: 事業所分割オプション（GetConfigValue("is_split_with_office") == "true"）
    x-ms-summary: 複数の事業所を行単位で出力する
  is_split_with_project_Param:
    name: is_split_with_project
    in: query
    required: false
    type: boolean
    description: プロジェクト分割オプション（GetConfigValue("is_split_with_project") == "true"）
    x-ms-summary: 複数のプロジェクトを行単位で出力する
  X_YESOD_BASE_URI_Param:
    name: X-YESOD-BASE-URI
    in: header
    required: false
    type: string
    description: YESOD Base URI
    x-ms-summary: YESOD Base URI
    default: https://yesod.io/api
responses: {}
securityDefinitions:
  api_key:
    type: apiKey
    in: header
    name: Authorization
security:
  - api_key: []
tags: []