openapi: 3.0.0
info:
  title: millvi CRM API
  x-logo:
    url: https://cms.millvi.com/logo.svg
    altText: Millvi logo
    href: https://help.millvi.jp/hc/ja/articles/18887828836505
  description: >
    millvi CRM API は millvi CRM
    プラットフォームを外部アプリケーションから利用できるプログラミングインターフェースです。VODを使用するためのユーザーの管理や、転送量、ストレージ利用量などを確認することができます。


    # ご利用方法について

    millvi API は、CRM API と VOD API に分かれており、それぞれ担う機能が異なります。CRM API
    では、契約情報や利用量に関わる部分を提供しております。


    # API利用における注意事項

    -
    短時間でのループ処理で負荷をかけるようなタスクはご遠慮ください。弊社側で高負荷の検知があった場合、利用方法についてご相談させていただく場合があります。

    - 本APIドキュメントに記載されている仕様以外の設定では正しく動作しないことがあります。


    # 共通仕様

    ### 異常系

    API がエラーになった場合、以下のようにエラーコードとエラーメッセージが返ってきます。<br>

    ```

    {
      "errorCode": "MVOD_CMN_0005",
      "reason": "必須パラメーターが存在しません。[param_name]"
    }

    ```


    # 認証情報について

    リクエストヘッダー情報に、トークンをご利用ください。

    当APIでは、Bearer Token (OAuth2.0) を採用しています。


    リクエストヘッダー情報に、トークンをご利用ください。

    ```

    curl -H GET "https://${end_point}/crm/end_point" \

    -H "Authorization: Bearer {access_token}"

    ```


    <SecurityDefinitions />
  contact:
    name: カスタマーサクセス部
    email: support@millvi.jp
    url: https://millvi-cs.com/support/
servers:
  - url: https://api.millvi.com/crm
tags:
  - name: common_master_functions
    x-displayName: 機能マスター
    description: |
      機能マスターを取得するAPIについて記述します。<br>
      2023年9月時点において、機能マスターには以下が準備されています。契約プラン毎にご利用いただける機能が異なります。
      | function_id | function_name |
      | - | - |
      | onetime | ワンタイム |
      | custom_recipe | カスタムレシピ |
      | subtitle_transcription | 自動字幕生成 |
      | live | ライブ |
      | dvr | DVR |
      | playback_rate | 倍速 |
      | player_engine | デバイスプレイヤー |
  - name: contractors
    x-displayName: 自身の契約者情報管理
    description: 契約者自身の情報を管理するAPIについて記述します。
  - name: cont_token
    x-displayName: 契約者用トークン取得
    description: 契約者用トークンを取得するAPIについて記述します。
  - name: cont_contracts
    x-displayName: 契約取得
    description: 契約情報を取得するAPIについて記述します。
  - name: cont_usages
    x-displayName: 利用量取得
    description: ストレージ利用量と転送量を取得するAPIについて記述します。
  - name: cont_distributors
    x-displayName: 配信者管理
    description: |
      配信者管理で利用するAPIについて記述します。
      ### 注意事項
      配信者が有効になるには、利用可能機能設定APIを利用して適用開始日を設定する必要があります。
  - name: cont_function_settings
    x-displayName: 利用可能機能設定
    description: 管理している配信者に対して、利用できる機能を設定するAPIについて記述します。
  - name: cont_analytics
    x-displayName: 分析
    description: コンテンツの視聴分析に利用するAPIについて記述します。
  - name: dist_usages
    x-displayName: 利用量取得
    description: ストレージ利用量と転送量を取得するAPIについて記述します。
  - name: dist_token
    x-displayName: 配信者用トークン取得
    description: 配信者用トークンを取得するAPIについて記述します。
  - name: distributors_me
    x-displayName: 配信者自身の情報
    description: 配信者自身の情報を管理するAPIについて記述します。
paths:
  /masters/functions:
    get:
      tags:
        - common_master_functions
      operationId: get-masters-functions
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: データの合計数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        function_id:
                          type: string
                          description: 機能ID(機能名の英数字)
                          deprecated: false
                        function_name:
                          type: string
                          description: 機能名(機能名の日本語)
                          deprecated: false
                        has_quota:
                          type: boolean
                          description: クォータ(上限数)有無
                          deprecated: false
                        quota_name:
                          type: string
                          description: クォータ(上限数)の名称
                          deprecated: false
                          nullable: true
                      required:
                        - function_id
                        - function_name
                        - has_quota
                      example:
                        function_id: onetime
                        function_name: ワンタイム
                        has_quota: false
                        quota_name: number
                      contentType: application/json
                    description: 機能マスター情報の一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 1
                  items:
                    - function_id: onetime
                      function_name: ワンタイム
                      has_quota: false
                      quota_name: number
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0017
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0017
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 実行ユーザーが存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      x-codeSamples:
        - lang: shell
          source: curl -v -X GET 'https://${end_point}/masters/functions'
      summary: 機能設定マスター取得
      description: |-
        #### クエリパラメーターについて

        1. 未指定
            * 全てのコンテンツ情報を取得します。

        2. レスポンスの項目を指定(funcion_id, function_name)
            * 指定した項目の全ての機能マスター情報を取得します。
  /contractors/auth/token:
    post:
      tags:
        - cont_token
      operationId: post-contractors-auth-token
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - password
                    - refresh_token
                  description: 権限付与タイプ
                  deprecated: false
                refresh_token:
                  type: string
                  description: リフレッシュトークン
                  deprecated: false
                  nullable: true
                password:
                  type: string
                  description: 契約者用パスワード
                  deprecated: false
                  nullable: true
                contractor_id:
                  type: string
                  description: 契約者ID
                  deprecated: false
                  nullable: true
              required:
                - grant_type
              example:
                grant_type: password
                refresh_token: exampleToken
                password: password
                contractor_id: contractorid
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  access_token:
                    type: string
                    description: アクセストークン
                    deprecated: false
                  access_token_expires_at:
                    type: string
                    description: アクセストークンの有効期限。
                    deprecated: false
                  refresh_token:
                    type: string
                    description: リフレッシュトークン
                    deprecated: false
                  refresh_token_expires_at:
                    type: string
                    description: リフレッシュトークンの有効期限。
                    deprecated: false
                    nullable: true
                  contractor_id_alias:
                    type: string
                    description: 契約者IDエイリアス
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - access_token
                  - access_token_expires_at
                  - refresh_token
                example:
                  contractor_id: contractorid
                  access_token: exampleAccessToken
                  access_token_expires_at: 2020-01-01T00:00:00.000000+0900
                  refresh_token: exampleRefreshToken
                  refresh_token_expires_at: 2020-01-01T00:00:00.000000+0900
                  contractor_id_alias: contractorAliasId
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[refresh_token]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X POST 'https://${end_point}/contractors/auth/token'
            -H 'Content-Type: application/json'
            -d '{
              "grant_type": "password",
              "refresh_token": "exampleToken",
              "password": "password",
              "contractor_id": "contractorid"
            }'
      summary: 契約者トークン取得
      description: |-
        アクセストークン、リフレッシュトークンを取得します。

        `grant_type`に応じて、リクエストするパラメーターが違います。（後述）
        ただし、どちらの場合もレスポンスは同じです。

        各APIへのリクエスト時には、当該APIで取得したトークンをヘッダーに設定してください。

        ```
        Authorization: Bearer access_token
        ```

        #### アクセストークンの場合

        + grant_type: "password" 固定

        + contractor_id/password:必須

        #### リフレッシュトークンの場合

        + grant_type: "refresh_token" 固定

        + refresh_token:必須
  /contractors/me:
    get:
      tags:
        - contractors
      operationId: get-contractors-me
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  disabled:
                    type: boolean
                    description: 無効フラグ<br>trueでアカウントが無効、falseでアカウントが有効になる
                    deprecated: false
                  created_at:
                    type: string
                    description: 契約者作成日付
                    deprecated: false
                  updated_at:
                    type: string
                    description: 契約者更新日付
                    deprecated: false
                  pause_start_date:
                    type: string
                    description: 休止開始日
                    deprecated: false
                    nullable: true
                  use_resume_date:
                    type: string
                    description: 利用再開日
                    deprecated: false
                    nullable: true
                  pause_history:
                    type: array
                    items:
                      type: object
                      properties:
                        pause_start_date:
                          type: string
                          description: 休止開始日
                          deprecated: false
                        use_resume_date:
                          type: string
                          description: 利用再開日
                          deprecated: false
                      required:
                        - pause_start_date
                        - use_resume_date
                      example:
                        pause_start_date: '2022-04-01'
                        use_resume_date: '2022-05-01'
                      contentType: application/json
                    description: pause_start_dateとuse_resume_dateの履歴が格納される。
                    deprecated: false
                    nullable: true
                  cancel_date:
                    type: string
                    description: 解約日
                    deprecated: false
                    nullable: true
                  contractor_id_alias:
                    type: string
                    description: 契約者IDエイリアス
                    deprecated: false
                    nullable: true
                  expires_at:
                    type: string
                    description: 失効日
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - disabled
                  - created_at
                  - updated_at
                example:
                  contractor_id: exampleContractorId
                  disabled: false
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                  pause_start_date: '2022-03-01'
                  use_resume_date: '2022-04-01'
                  pause_history:
                    - pause_start_date: '2022-04-01'
                      use_resume_date: '2022-05-01'
                  cancel_date: '2022-05-01'
                  contractor_id_alias: exampleContractorIdAlias
                  expires_at: null
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0017
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0017
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 実行ユーザーが存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X GET 'https://${end_point}/contractors/me'
            -H 'Authorization: Bearer {contractor_token}'
      summary: 契約者自身取得
      description: 契約者自身の情報を取得します。
    patch:
      tags:
        - contractors
      operationId: patch-contractors-me
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: |

                    契約者用パスワード。半角英数字と以下の記号のみ登録できます。<br>
                    英大文字・英小文字・数字・記号をそれぞれ1文字以上含む10文字以上、100文字以下で指定してください。<br>
                    ```
                    ."#?!$%&()]@[,=~|`{}+*<>_/\;:^'-
                    ```
                  deprecated: false
                  maxLength: 100
                  minLength: 10
                  nullable: true
              example:
                password: Contractor_123
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  disabled:
                    type: boolean
                    description: 無効フラグ<br>trueでアカウントが無効、falseでアカウントが有効になる
                    deprecated: false
                  created_at:
                    type: string
                    description: 契約者作成日付
                    deprecated: false
                  updated_at:
                    type: string
                    description: 契約者更新日付
                    deprecated: false
                  pause_start_date:
                    type: string
                    description: 休止開始日
                    deprecated: false
                    nullable: true
                  use_resume_date:
                    type: string
                    description: 利用再開日
                    deprecated: false
                    nullable: true
                  pause_history:
                    type: array
                    items:
                      type: object
                      properties:
                        pause_start_date:
                          type: string
                          description: 休止開始日
                          deprecated: false
                        use_resume_date:
                          type: string
                          description: 利用再開日
                          deprecated: false
                      required:
                        - pause_start_date
                        - use_resume_date
                      example:
                        pause_start_date: '2022-04-01'
                        use_resume_date: '2022-05-01'
                      contentType: application/json
                    description: pause_start_dateとuse_resume_dateの履歴が格納される。
                    deprecated: false
                    nullable: true
                  cancel_date:
                    type: string
                    description: 解約日
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - disabled
                  - created_at
                  - updated_at
                example:
                  contractor_id: exampleContractorId
                  disabled: false
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                  pause_start_date: '2022-03-01'
                  use_resume_date: '2022-04-01'
                  pause_history:
                    - pause_start_date: '2022-04-01'
                      use_resume_date: '2022-05-01'
                  cancel_date: '2022-05-01'
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0015
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0015
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値は許容された形式にしてください。[password]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CNR_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CNR_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 契約者情報の取得に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X PATCH 'https://${end_point}/contractors/me'
            -H 'Authorization: Bearer {contractor_token}'
            -H 'Content-Type: application/json'
            -d '{
              "password": "Contractor_123"
            }'
      summary: 契約者自身更新
      description: 契約者自身の情報を更新します。
  /contractors/me/contracts:
    get:
      tags:
        - cont_contracts
      operationId: get-contractors-me-contracts
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 対象の契約者ID
                    deprecated: false
                  latest_contract:
                    type: object
                    properties:
                      start_date:
                        type: string
                        description: 適用開始日
                        deprecated: false
                      contract_type:
                        type: string
                        enum:
                          - plan
                          - option
                        description: 契約タイプ
                        deprecated: false
                      available_function_settings:
                        type: object
                        properties:
                          onetime:
                            type: boolean
                            description: ワンタイム機能
                            deprecated: false
                            default: false
                          custom_recipe:
                            type: boolean
                            description: カスタムレシピ機能
                            deprecated: false
                            default: false
                          playback_rate:
                            type: boolean
                            description: 再生速度設定機能
                            deprecated: false
                            default: false
                          subtitle_transcription:
                            type: boolean
                            description: 自動字幕生成
                            deprecated: false
                            default: false
                          live:
                            type: boolean
                            description: ライブ機能
                            deprecated: false
                            default: false
                          dvr:
                            type: boolean
                            description: DVR機能
                            deprecated: false
                            default: false
                          accelerated_video_encoding:
                            type: boolean
                            description: 高速変換機能
                            deprecated: false
                            default: false
                          player_engine:
                            type: boolean
                            description: デバイスプレイヤー機能
                            deprecated: false
                            default: false
                        example:
                          onetime: false
                          custom_recipe: true
                          playback_rate: true
                          subtitle_transcription: false
                          live: false
                          dvr: false
                          accelerated_video_encoding: false
                          player_engine: false
                        contentType: application/json
                        description: 利用可能機能
                        deprecated: false
                        nullable: true
                      period:
                        type: integer
                        description: 契約期間(月数)。契約タイプがoptionのときは、plan_start_dateが適用開始日となります。
                        deprecated: false
                        nullable: true
                      plan_name:
                        type: string
                        description: プラン名
                        deprecated: false
                        nullable: true
                      transfer:
                        type: integer
                        description: 転送量(バイト)
                        deprecated: false
                        nullable: true
                      storage:
                        type: integer
                        description: ストレージ(バイト)
                        deprecated: false
                        nullable: true
                      max_distributor_count:
                        type: integer
                        description: 契約者が持てる配信者の最大数
                        deprecated: false
                        nullable: true
                      available_function_settings_quota:
                        type: object
                        properties:
                          subtitle_transcription:
                            type: integer
                            description: 自動字幕生成利用可能時間(秒)
                            deprecated: false
                            nullable: true
                          live:
                            type: integer
                            description: 同時ライブ配信数
                            deprecated: false
                            maximum: 50
                            nullable: true
                        example:
                          subtitle_transcription: 500
                          live: 1
                        contentType: application/json
                        description: 利用可能機能上限数
                        deprecated: false
                        nullable: true
                      plan_start_date:
                        type: string
                        description: プラン適用開始日(periodの適用開始日)
                        deprecated: false
                        nullable: true
                    required:
                      - start_date
                      - contract_type
                    example:
                      start_date: '2022-09-01'
                      contract_type: plan
                      available_function_settings:
                        onetime: false
                        custom_recipe: true
                        playback_rate: true
                        subtitle_transcription: false
                        live: false
                        dvr: false
                        accelerated_video_encoding: false
                        player_engine: false
                      period: 1
                      plan_name: examplePlanName
                      transfer: 1024
                      storage: 1024
                      max_distributor_count: 10
                      available_function_settings_quota:
                        subtitle_transcription: 500
                        live: 1
                      plan_start_date: '2022-09-01'
                    contentType: application/json
                    description: 最新の契約情報
                    deprecated: false
                    nullable: true
                  contract_history:
                    type: array
                    items:
                      type: object
                      properties:
                        start_date:
                          type: string
                          description: 適用開始日
                          deprecated: false
                        contract_type:
                          type: string
                          enum:
                            - plan
                            - option
                          description: 契約タイプ
                          deprecated: false
                        available_function_settings:
                          type: object
                          properties:
                            onetime:
                              type: boolean
                              description: ワンタイム機能
                              deprecated: false
                              default: false
                            custom_recipe:
                              type: boolean
                              description: カスタムレシピ機能
                              deprecated: false
                              default: false
                            playback_rate:
                              type: boolean
                              description: 再生速度設定機能
                              deprecated: false
                              default: false
                            subtitle_transcription:
                              type: boolean
                              description: 自動字幕生成
                              deprecated: false
                              default: false
                            live:
                              type: boolean
                              description: ライブ機能
                              deprecated: false
                              default: false
                            dvr:
                              type: boolean
                              description: DVR機能
                              deprecated: false
                              default: false
                            accelerated_video_encoding:
                              type: boolean
                              description: 高速変換機能
                              deprecated: false
                              default: false
                            player_engine:
                              type: boolean
                              description: デバイスプレイヤー機能
                              deprecated: false
                              default: false
                          example:
                            onetime: false
                            custom_recipe: true
                            playback_rate: true
                            subtitle_transcription: false
                            live: false
                            dvr: false
                            accelerated_video_encoding: false
                            player_engine: false
                          contentType: application/json
                          description: 利用可能機能
                          deprecated: false
                          nullable: true
                        period:
                          type: integer
                          description: 契約期間(月数)。 契約タイプがoptionのときは必ずNoneを返します。
                          deprecated: false
                          nullable: true
                        plan_name:
                          type: string
                          description: プラン名
                          deprecated: false
                          nullable: true
                        transfer:
                          type: integer
                          description: 転送量(バイト)
                          deprecated: false
                          nullable: true
                        storage:
                          type: integer
                          description: ストレージ(バイト)
                          deprecated: false
                          nullable: true
                        max_distributor_count:
                          type: integer
                          description: 契約者が持てる配信者の最大数
                          deprecated: false
                          nullable: true
                        available_function_settings_quota:
                          type: object
                          properties:
                            subtitle_transcription:
                              type: integer
                              description: 自動字幕生成利用可能時間(秒)
                              deprecated: false
                              nullable: true
                            live:
                              type: integer
                              description: 同時ライブ配信数
                              deprecated: false
                              maximum: 50
                              nullable: true
                          example:
                            subtitle_transcription: 500
                            live: 1
                          contentType: application/json
                          description: 利用可能機能上限数
                          deprecated: false
                          nullable: true
                      required:
                        - start_date
                        - contract_type
                      example:
                        start_date: '2022-09-01'
                        contract_type: plan
                        available_function_settings:
                          onetime: false
                          custom_recipe: true
                          playback_rate: true
                          subtitle_transcription: false
                          live: false
                          dvr: false
                          accelerated_video_encoding: false
                          player_engine: false
                        period: 1
                        plan_name: examplePlanName
                        transfer: 1024
                        storage: 1024
                        max_distributor_count: 10
                        available_function_settings_quota:
                          subtitle_transcription: 500
                          live: 1
                      contentType: application/json
                    description: 契約情報履歴
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                example:
                  contractor_id: exampleContractorId
                  latest_contract:
                    start_date: '2022-09-01'
                    contract_type: plan
                    available_function_settings:
                      onetime: false
                      custom_recipe: true
                      playback_rate: true
                      subtitle_transcription: false
                      live: false
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    period: 1
                    plan_name: examplePlanName
                    transfer: 1024
                    storage: 1024
                    max_distributor_count: 10
                    available_function_settings_quota:
                      subtitle_transcription: 500
                      live: 1
                    plan_start_date: '2022-09-01'
                  contract_history:
                    start_date: '2022-09-01'
                    contract_type: plan
                    available_function_settings:
                      onetime: false
                      custom_recipe: true
                      playback_rate: true
                      subtitle_transcription: false
                      live: false
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    period: 1
                    plan_name: examplePlanName
                    transfer: 1024
                    storage: 1024
                    max_distributor_count: 10
                    available_function_settings_quota:
                      subtitle_transcription: 500
                      live: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0017
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0017
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 実行ユーザーが存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X GET 'https://${end_point}/contractors/me/contracts'
            -H 'Authorization: Bearer {contractor_token}'
      summary: 契約情報取得
      description: 契約情報を取得します。 最新の契約情報と契約の履歴が参照できます。
  /contractors/usages/vod/storages:
    get:
      tags:
        - cont_usages
      operationId: get-contractors-usages-vod-storages
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: distributor_id
          in: query
          description: 配信者ID
          example: distributor001
          schema:
            type: string
            description: 配信者ID
            deprecated: false
            nullable: true
        - name: includes_deleted_distributors
          in: query
          description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
          example: true
          schema:
            type: boolean
            description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
            deprecated: false
            default: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
              - year
            description: 集計単位
            deprecated: false
            default: day
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        aggregate_date:
                          type: string
                          description: >-
                            集計日<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: true
                        aggregate_period:
                          type: string
                          description: >-
                            集計期間<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: false
                        storage_amount:
                          type: integer
                          description: ストレージ利用量(バイト)
                          deprecated: false
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                          nullable: true
                        distributor_id:
                          type: string
                          description: 配信者ID<br>利用量が累計値の場合はnullになります。
                          deprecated: false
                          nullable: true
                      required:
                        - aggregate_date
                        - aggregate_period
                        - storage_amount
                      example:
                        aggregate_date: '2022-04-01'
                        aggregate_period: '2022-04-01'
                        storage_amount: 100
                        contractor_id: exampleContractorId
                        distributor_id: exampleDistributorId
                      contentType: application/json
                    description: ストレージ利用量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    aggregate_date: '2022-04-01'
                    aggregate_period: '2022-04-01'
                    storage_amount: 100
                    contractor_id: exampleContractorId
                    distributor_id: exampleDistributorId
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/contractors/usages/vod/storages?from=2022-01-01&to=2022-01-02&distributor_id=distributor001&includes_deleted_distributors=True&kind=day'

            -H 'Authorization: Bearer {contractor_token}'
      summary: ストレージ利用量取得
      description: |-
        配信者のVODでのストレージ利用量を取得します。

        ## ユーザーの指定
        * 配信者IDを指定しない場合、全ての配信者の利用量を取得することができます。
        この場合、`distributor_id`は`null`を取り、結果は全配信者の利用量の合計となります。

        * 配信者IDを指定すると、対象の配信者のみの利用量を取得することができます。
  /contractors/usages/vod/transfers:
    get:
      tags:
        - cont_usages
      operationId: get-contractors-usages-vod-transfers
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: distributor_id
          in: query
          description: 配信者ID
          example: distributor001
          schema:
            type: string
            description: 配信者ID
            deprecated: false
            nullable: true
        - name: includes_deleted_distributors
          in: query
          description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
          example: true
          schema:
            type: boolean
            description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
            deprecated: false
            default: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
              - year
            description: 集計単位
            deprecated: false
            default: day
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        aggregate_date:
                          type: string
                          description: >-
                            集計日<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: true
                        aggregate_period:
                          type: string
                          description: >-
                            集計期間<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: false
                        transfer_amount:
                          type: integer
                          description: 転送量(バイト)
                          deprecated: false
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                          nullable: true
                        distributor_id:
                          type: string
                          description: 配信者ID<br>利用量が累計値の場合はnullになります。
                          deprecated: false
                          nullable: true
                      required:
                        - aggregate_date
                        - aggregate_period
                        - transfer_amount
                      example:
                        aggregate_date: '2022-04-01'
                        aggregate_period: '2022-04-01'
                        transfer_amount: 100
                        contractor_id: exampleContractorId
                        distributor_id: exampleDistributorId
                      contentType: application/json
                    description: 転送量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    aggregate_date: '2022-04-01'
                    aggregate_period: '2022-04-01'
                    transfer_amount: 100
                    contractor_id: exampleContractorId
                    distributor_id: exampleDistributorId
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/contractors/usages/vod/transfers?from=2022-01-01&to=2022-01-02&distributor_id=distributor001&includes_deleted_distributors=True&kind=day'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 転送量取得
      description: |-
        配信者のVODでの転送量を取得します。

        * 全ての配信者の転送量を取得することができます。

        * 配信者IDを指定すると、対象の配信者のみの転送量を取得することができます。
  /contractors/excesses/vod/storages:
    get:
      tags:
        - cont_usages
      operationId: get-contractors-excesses-vod-storages
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
            description: 集計単位
            deprecated: false
            default: day
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        aggregate_period:
                          type: string
                          description: >-
                            集計期間<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: false
                        storage_amount:
                          type: integer
                          description: ストレージ利用量(バイト)
                          deprecated: false
                        contract_storage_amount:
                          type: integer
                          description: ストレージ契約量(バイト)
                          deprecated: false
                        excess_storage_amount:
                          type: integer
                          description: ストレージ超過量(バイト)
                          deprecated: false
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                      required:
                        - aggregate_period
                        - storage_amount
                        - contract_storage_amount
                        - excess_storage_amount
                        - contractor_id
                      example:
                        aggregate_period: '2022-04-01'
                        storage_amount: 100
                        contract_storage_amount: 20
                        excess_storage_amount: 80
                        contractor_id: exampleContractorId
                      contentType: application/json
                    description: ストレージ利用量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    aggregate_period: '2022-04-01'
                    storage_amount: 100
                    contract_storage_amount: 20
                    excess_storage_amount: 80
                    contractor_id: exampleContractorId
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/contractors/excesses/vod/storages?from=2022-01-01&kind=day&to=2022-01-02'

            -H 'Authorization: Bearer {contractor_token}'
      summary: ストレージ利用量超過量取得
      description: |-
        配信者のVODでのストレージ利用量と超過量を取得します。

        ## ユーザーの指定
        * 配信者IDを指定しない場合、全ての配信者の利用量と超過量を取得することができます。
        この場合、`distributor_id`は`null`を取り、結果は全配信者の利用量と超過量の合計となります。

        * 配信者IDを指定すると、対象の配信者のみの利用量と超過量を取得することができます。
  /contractors/excesses/vod/transfers:
    get:
      tags:
        - cont_usages
      operationId: get-contractors-excesses-vod-transfers
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
            description: 集計単位
            deprecated: false
            default: day
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        aggregate_period:
                          type: string
                          description: >-
                            集計期間<br>パラメーターの`kind`に応じて`YYYY-MM-DD` `YYYY-MM`
                            `YYYY`のフォーマットになります。
                          deprecated: false
                        transfer_amount:
                          type: integer
                          description: 転送量利用量(バイト)
                          deprecated: false
                        contract_transfer_amount:
                          type: integer
                          description: 転送量契約量(バイト)
                          deprecated: false
                        excess_transfer_amount:
                          type: integer
                          description: 転送量超過量(バイト)
                          deprecated: false
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                        is_invoice:
                          type: boolean
                          description: 当該月が請求月のときTrueを返す
                          deprecated: false
                        contract_period:
                          type: integer
                          description: 契約更新期間
                          deprecated: false
                      required:
                        - aggregate_period
                        - transfer_amount
                        - contract_transfer_amount
                        - excess_transfer_amount
                        - contractor_id
                        - is_invoice
                        - contract_period
                      example:
                        aggregate_period: '2022-04-01'
                        transfer_amount: 100
                        contract_transfer_amount: 20
                        excess_transfer_amount: 80
                        contractor_id: exampleContractorId
                        is_invoice: false
                        contract_period: 1
                      contentType: application/json
                    description: 転送量利用量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    aggregate_period: '2022-04-01'
                    transfer_amount: 100
                    contract_transfer_amount: 20
                    excess_transfer_amount: 80
                    contractor_id: exampleContractorId
                    is_invoice: false
                    contract_period: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/contractors/excesses/vod/transfers?from=2022-01-01&kind=day&to=2022-01-02'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 転送量超過量取得
      description: |-
        配信者のVODでの転送量と超過量を取得します。

        ## ユーザーの指定
        * 配信者IDを指定しない場合、全ての配信者の利用量と超過量を取得することができます。
        この場合、`distributor_id`は`null`を取り、結果は全配信者の利用量と超過量の合計となります。

        * 配信者IDを指定すると、対象の配信者のみの利用量と超過量を取得することができます。
        ## 集計単位の指定
        * 集計単位を`day`にすると、転送量は月間の利用量の累計値になります。
  /contractors/usages/vod/csv:
    get:
      tags:
        - cont_usages
      operationId: get-contractors-usages-vod-csv
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: distributor_id
          in: query
          description: 配信者ID<br>指定しない場合は全配信者の合計値が計算され、返り値の`distributor_id`は空になります。
          example: distributor001
          schema:
            type: string
            description: 配信者ID<br>指定しない場合は全配信者の合計値が計算され、返り値の`distributor_id`は空になります。
            deprecated: false
            nullable: true
        - name: includes_deleted_distributors
          in: query
          description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
          example: true
          schema:
            type: boolean
            description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
            deprecated: false
            default: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
            description: 集計単位
            deprecated: false
            default: day
        - name: simplified
          in: query
          description: true のとき、カラム名を日本語・ストレージ/転送量をバイトから GB（小数第3位）に変換した簡略版 CSV を返します。
          schema:
            type: boolean
            description: true のとき、カラム名を日本語・ストレージ/転送量をバイトから GB（小数第3位）に変換した簡略版 CSV を返します。
            deprecated: false
            default: false
        - name: encoding
          in: query
          description: 文字コード（utf-8 / shift-jis）
          example: utf-8
          schema:
            type: string
            enum:
              - utf-8
              - shift-jis
            description: 文字コード（utf-8 / shift-jis）
            deprecated: false
            default: utf-8
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                contentType: application/octet-stream
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/contractors/usages/vod/csv?from=2022-01-01&to=2022-01-02&distributor_id=distributor001&includes_deleted_distributors=True&kind=day&simplified=False&encoding=utf-8'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 利用量CSVダウンロード
      description: 配信者ごとのVODでの利用量(ストレージ利用量、転送量)のCSVファイルを取得します。
  /distributors:
    post:
      tags:
        - cont_distributors
      operationId: post-distributors
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                distributor_id:
                  type: string
                  description: 配信者ID<br>英数字のみ利用可能
                  deprecated: false
                  maxLength: 100
                  minLength: 1
                password:
                  type: string
                  description: |+
                    配信者用パスワード。半角英数字と以下の記号のみ登録できます。<br>
                    英大文字・英小文字・数字・記号をそれぞれ1文字以上含む10文字以上、100文字以下で指定してください。<br>
                    ```
                    ."#?!$%&()]@[,=~|`{}+*<>_/\;:^'-
                    ```

                  deprecated: false
                  maxLength: 100
                  minLength: 10
              required:
                - distributor_id
                - password
              example:
                distributor_id: distributor001
                password: Distributor_123
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  created_at:
                    type: string
                    description: 配信者作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 配信者更新日時
                    deprecated: false
                required:
                  - contractor_id
                  - distributor_id
                  - created_at
                  - updated_at
                example:
                  contractor_id: contractor001
                  distributor_id: distributor001
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0015
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0015
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値は許容された形式にしてください。[password]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DAL_0007
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DAL_0007
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 一時配信者エイリアスで重複したIDが存在します。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DAL_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DAL_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 削除済み一時配信者エイリアスで重複したIDが存在します。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0006
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0006
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - IDは英数字のみ利用できます。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0010
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0010
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 配信者数の上限を超えています。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '409':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Conflict
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_DAL_0003
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DAL_0003
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 配信者エイリアスで重複したIDが存在します。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DAL_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DAL_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 削除済み配信者エイリアスで重複したIDが存在します。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0001
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0001
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 重複したIDが存在します。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 削除済のユーザーIDは指定できません。
                        description: エラーメッセージ
                    contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X POST 'https://${end_point}/distributors'
            -H 'Authorization: Bearer {contractor_token}'
            -H 'Content-Type: application/json'
            -d '{
              "distributor_id": "distributor001",
              "password": "Distributor_123"
            }'
      summary: 配信者情報登録
      description: 配信者を登録します。
    get:
      tags:
        - cont_distributors
      operationId: get-distributors
      parameters:
        - name: includes_deleted_distributors
          in: query
          description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
          example: true
          schema:
            type: boolean
            description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
            deprecated: false
            default: false
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsに含まれる配信者の数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                        distributor_id:
                          type: string
                          description: 配信者ID
                          deprecated: false
                        created_at:
                          type: string
                          description: 配信者作成日時
                          deprecated: false
                        updated_at:
                          type: string
                          description: 配信者更新日時
                          deprecated: false
                        alias_count:
                          type: integer
                          description: エイリアスの数。配信者に紐づいた作成済みのエイリアスの数を返す。
                          deprecated: false
                          default: 0
                        deleted:
                          type: boolean
                          description: >-
                            削除ユーザフラグ trueで削除ユーザ、falseでは削除されていないユーザとなる
                            includes_deleted_distributors:trueを指定した場合のみ付加される
                          deprecated: false
                          nullable: true
                      required:
                        - contractor_id
                        - distributor_id
                        - created_at
                        - updated_at
                      example:
                        contractor_id: contractor001
                        distributor_id: distributor001
                        created_at: 2022-03-01T00:00:00.000000+0900
                        updated_at: 2022-04-01T00:00:00.000000+0900
                        alias_count: 0
                        deleted: true
                      contentType: application/json
                    description: 配信者情報の一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 1
                  items:
                    contractor_id: contractor001
                    distributor_id: distributor001
                    created_at: 2022-03-01T00:00:00.000000+0900
                    updated_at: 2022-04-01T00:00:00.000000+0900
                    alias_count: 0
                    deleted: true
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors?includes_deleted_distributors=True'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 配信者情報取得(複数)
      description: 契約者に紐づいた配信者の情報を取得します
  /distributors/{distributor_id}:
    delete:
      tags:
        - cont_distributors
      operationId: delete-distributors-{distributor_id}
      parameters:
        - name: distributor_id
          in: path
          description: 削除対象の配信者ID
          required: true
          example: distributor001
          schema:
            type: string
            description: 削除対象の配信者ID
            deprecated: false
      requestBody:
        content: {}
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                required:
                  - distributor_id
                example:
                  distributor_id: distributor001
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0012
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0012
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - ライブ配信中は配信者を削除できません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_DSR_0014
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_DSR_0014
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 配信者エイリアスが存在するため配信者を削除できません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                title: MCRM_DSR_0002
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_DSR_0002
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 存在しないユーザーです。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X DELETE
            'https://${end_point}/distributors/{distributor_id}'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'
      summary: 配信者情報削除
      description: 配信者を削除します。
    get:
      tags:
        - cont_distributors
      operationId: get-distributors-{distributor_id}
      parameters:
        - name: distributor_id
          in: path
          description: 検索対象の配信者ID
          required: true
          example: distributor001
          schema:
            type: string
            description: 検索対象の配信者ID
            deprecated: false
        - name: includes_deleted_distributors
          in: query
          description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
          schema:
            type: boolean
            description: 削除された配信者を含めるか。trueで含める、false/未指定で含めない
            deprecated: false
            default: false
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  created_at:
                    type: string
                    description: 配信者作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 配信者更新日時
                    deprecated: false
                  alias_count:
                    type: integer
                    description: エイリアスの数。配信者に紐づいた作成済みのエイリアスの数を返す。
                    deprecated: false
                    default: 0
                  deleted:
                    type: boolean
                    description: >-
                      削除ユーザフラグ trueで削除ユーザ、falseでは削除されていないユーザとなる
                      includes_deleted_distributors:trueを指定した場合のみ付加される
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - created_at
                  - updated_at
                example:
                  contractor_id: contractor001
                  distributor_id: distributor001
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                  alias_count: 0
                  deleted: true
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/{distributor_id}?includes_deleted_distributors=False'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 配信者情報取得(単数)
      description: 配信者の情報を取得します。
    patch:
      tags:
        - cont_distributors
      operationId: patch-distributors-{distributor_id}
      parameters:
        - name: distributor_id
          in: path
          description: 配信者ID
          required: true
          example: distributor001
          schema:
            type: string
            description: 配信者ID
            deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: |+
                    配信者用パスワード。半角英数字と以下の記号のみ登録できます。<br>
                    英大文字・英小文字・数字・記号をそれぞれ1文字以上含む10文字以上、100文字以下で指定してください。<br>
                    ```
                    ."#?!$%&()]@[,=~|`{}+*<>_/\;:^'-
                    ```

                  deprecated: false
                  maxLength: 100
                  minLength: 10
              required:
                - password
              example:
                password: Distributor_123
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  created_at:
                    type: string
                    description: 配信者作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 配信者更新日時
                    deprecated: false
                required:
                  - contractor_id
                  - distributor_id
                  - created_at
                  - updated_at
                example:
                  contractor_id: contractor001
                  distributor_id: distributor001
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0015
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0015
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値は許容された形式にしてください。[password]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                title: MCRM_DSR_0002
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_DSR_0002
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 存在しないユーザーです。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X PATCH
            'https://${end_point}/distributors/{distributor_id}'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "password": "Distributor_123"
            }'
      summary: 配信者情報更新
      description: 配信者を更新します。
  /distributors/{distributor_id}/function_settings:
    post:
      tags:
        - cont_function_settings
      operationId: post-distributors-{distributor_id}-function_settings
      parameters:
        - name: distributor_id
          in: path
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 適用開始日 `yyyy-mm-dd`
                  deprecated: false
                function_settings:
                  type: object
                  properties:
                    onetime:
                      type: boolean
                      description: ワンタイム機能
                      deprecated: false
                      default: false
                    custom_recipe:
                      type: boolean
                      description: カスタムレシピ機能
                      deprecated: false
                      default: false
                    playback_rate:
                      type: boolean
                      description: 再生速度設定機能
                      deprecated: false
                      default: false
                    subtitle_transcription:
                      type: boolean
                      description: 自動字幕生成
                      deprecated: false
                      default: false
                    live:
                      type: boolean
                      description: ライブ機能
                      deprecated: false
                      default: false
                    dvr:
                      type: boolean
                      description: DVR機能
                      deprecated: false
                      default: false
                    accelerated_video_encoding:
                      type: boolean
                      description: 高速変換機能
                      deprecated: false
                      default: false
                    player_engine:
                      type: boolean
                      description: デバイスプレイヤー機能
                      deprecated: false
                      default: false
                  example:
                    onetime: true
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: true
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  contentType: application/json
                  description: 機能設定
                  deprecated: false
                  nullable: true
                function_settings_quota:
                  type: object
                  properties:
                    subtitle_transcription:
                      type: integer
                      description: 自動字幕生成利用可能時間(秒)
                      deprecated: false
                      nullable: true
                    live:
                      type: integer
                      description: 同時ライブ配信数
                      deprecated: false
                      nullable: true
                  example:
                    subtitle_transcription: 500
                    live: 1
                  contentType: application/json
                  description: 機能設定上限数
                  deprecated: false
                  nullable: true
              required:
                - start_date
              example:
                start_date: '2022-09-01'
                function_settings:
                  onetime: true
                  custom_recipe: false
                  playback_rate: false
                  subtitle_transcription: false
                  live: true
                  dvr: false
                  accelerated_video_encoding: false
                  player_engine: false
                function_settings_quota:
                  subtitle_transcription: 500
                  live: 1
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  start_date:
                    type: string
                    description: 適用開始日 `yyyy-mm-dd`
                    deprecated: false
                  created_at:
                    type: string
                    description: 機能設定作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 機能設定更新日時
                    deprecated: false
                  function_settings:
                    type: object
                    properties:
                      onetime:
                        type: boolean
                        description: ワンタイム機能
                        deprecated: false
                        default: false
                      custom_recipe:
                        type: boolean
                        description: カスタムレシピ機能
                        deprecated: false
                        default: false
                      playback_rate:
                        type: boolean
                        description: 再生速度設定機能
                        deprecated: false
                        default: false
                      subtitle_transcription:
                        type: boolean
                        description: 自動字幕生成
                        deprecated: false
                        default: false
                      live:
                        type: boolean
                        description: ライブ機能
                        deprecated: false
                        default: false
                      dvr:
                        type: boolean
                        description: DVR機能
                        deprecated: false
                        default: false
                      accelerated_video_encoding:
                        type: boolean
                        description: 高速変換機能
                        deprecated: false
                        default: false
                      player_engine:
                        type: boolean
                        description: デバイスプレイヤー機能
                        deprecated: false
                        default: false
                    example:
                      onetime: true
                      custom_recipe: false
                      playback_rate: false
                      subtitle_transcription: false
                      live: true
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    contentType: application/json
                    description: 機能設定
                    deprecated: false
                    nullable: true
                  function_settings_quota:
                    type: object
                    properties:
                      subtitle_transcription:
                        type: integer
                        description: 自動字幕生成利用可能時間(秒)
                        deprecated: false
                        nullable: true
                      live:
                        type: integer
                        description: 同時ライブ配信数
                        deprecated: false
                        nullable: true
                    example:
                      subtitle_transcription: 500
                      live: 1
                    contentType: application/json
                    description: 機能設定上限数
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - start_date
                  - created_at
                  - updated_at
                example:
                  contractor_id: exampleContractor
                  distributor_id: exampleDistributor
                  start_date: '2022-09-01'
                  created_at: 2022-08-01 12:00:00.000000+0900
                  updated_at: 2022-08-01 12:00:00.000000+0900
                  function_settings:
                    onetime: true
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: true
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  function_settings_quota:
                    subtitle_transcription: 500
                    live: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値が不適切です。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0016
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0016
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 正しい日付形式にしてください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0007
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0007
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 契約で利用できない機能を有効にできません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 対象の配信者が存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0010
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0010
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 本日よりも前の適用開始日の機能設定は登録できません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0014
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0014
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 契約者の適用開始日以前での適用開始日の機能設定は登録できません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 機能設定の割り当て上限数を超えています。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '409':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CNT_0009
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CNT_0009
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 指定された配信者IDと適用開始日の機能設定は既に登録されています。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X POST
            'https://${end_point}/distributors/{distributor_id}/function_settings'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "start_date": "2022-09-01",
              "function_settings": {
                "onetime": true,
                "custom_recipe": false,
                "playback_rate": false,
                "subtitle_transcription": false,
                "live": true,
                "dvr": false,
                "accelerated_video_encoding": false,
                "player_engine": false
              },
              "function_settings_quota": {
                "subtitle_transcription": 500,
                "live": 1
              }
            }'
      summary: 機能設定情報登録
      description: |-
        機能設定情報を登録します。

        パラメーターが以下の場合、登録できません。

        - 適用開始日に本日よりも前の日付が指定されている

        - 契約者が結んでいる契約で利用できないとされている機能を有効にしようとしている
    get:
      tags:
        - cont_function_settings
      operationId: get-distributors-{distributor_id}-function_settings
      parameters:
        - name: distributor_id
          in: path
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  function_setting_history:
                    type: array
                    items:
                      type: object
                      properties:
                        start_date:
                          type: string
                          description: 適用開始日
                          deprecated: false
                        function_settings:
                          type: object
                          properties:
                            onetime:
                              type: boolean
                              description: ワンタイム機能
                              deprecated: false
                              default: false
                            custom_recipe:
                              type: boolean
                              description: カスタムレシピ機能
                              deprecated: false
                              default: false
                            playback_rate:
                              type: boolean
                              description: 再生速度設定機能
                              deprecated: false
                              default: false
                            subtitle_transcription:
                              type: boolean
                              description: 自動字幕生成
                              deprecated: false
                              default: false
                            live:
                              type: boolean
                              description: ライブ機能
                              deprecated: false
                              default: false
                            dvr:
                              type: boolean
                              description: DVR機能
                              deprecated: false
                              default: false
                            accelerated_video_encoding:
                              type: boolean
                              description: 高速変換機能
                              deprecated: false
                              default: false
                            player_engine:
                              type: boolean
                              description: デバイスプレイヤー機能
                              deprecated: false
                              default: false
                          example:
                            onetime: true
                            custom_recipe: false
                            playback_rate: false
                            subtitle_transcription: false
                            live: true
                            dvr: false
                            accelerated_video_encoding: false
                            player_engine: false
                          contentType: application/json
                          description: 機能設定
                          deprecated: false
                        created_at:
                          type: string
                          description: 機能設定作成日時
                          deprecated: false
                        updated_at:
                          type: string
                          description: 機能設定更新日時
                          deprecated: false
                        function_settings_quota:
                          type: object
                          properties:
                            subtitle_transcription:
                              type: integer
                              description: 自動字幕生成利用可能時間(秒)
                              deprecated: false
                              nullable: true
                            live:
                              type: integer
                              description: 同時ライブ配信数
                              deprecated: false
                              nullable: true
                          example:
                            subtitle_transcription: 500
                            live: 1
                          contentType: application/json
                          description: 機能設定上限数
                          deprecated: false
                      required:
                        - start_date
                        - function_settings
                        - created_at
                        - updated_at
                        - function_settings_quota
                      example:
                        start_date: '2022-09-01'
                        function_settings:
                          onetime: true
                          custom_recipe: false
                          playback_rate: false
                          subtitle_transcription: false
                          live: true
                          dvr: false
                          accelerated_video_encoding: false
                          player_engine: false
                        created_at: 2022-03-01T00:00:00.000000+0900
                        updated_at: 2022-04-01T00:00:00.000000+0900
                        function_settings_quota:
                          subtitle_transcription: 500
                          live: 1
                      contentType: application/json
                    description: 機能設定履歴
                    deprecated: false
                  latest_function_settings:
                    type: object
                    properties:
                      start_date:
                        type: string
                        description: 適用開始日
                        deprecated: false
                      function_settings:
                        type: object
                        properties:
                          onetime:
                            type: boolean
                            description: ワンタイム機能
                            deprecated: false
                            default: false
                          custom_recipe:
                            type: boolean
                            description: カスタムレシピ機能
                            deprecated: false
                            default: false
                          playback_rate:
                            type: boolean
                            description: 再生速度設定機能
                            deprecated: false
                            default: false
                          subtitle_transcription:
                            type: boolean
                            description: 自動字幕生成
                            deprecated: false
                            default: false
                          live:
                            type: boolean
                            description: ライブ機能
                            deprecated: false
                            default: false
                          dvr:
                            type: boolean
                            description: DVR機能
                            deprecated: false
                            default: false
                          accelerated_video_encoding:
                            type: boolean
                            description: 高速変換機能
                            deprecated: false
                            default: false
                          player_engine:
                            type: boolean
                            description: デバイスプレイヤー機能
                            deprecated: false
                            default: false
                        example:
                          onetime: true
                          custom_recipe: false
                          playback_rate: false
                          subtitle_transcription: false
                          live: true
                          dvr: false
                          accelerated_video_encoding: false
                          player_engine: false
                        contentType: application/json
                        description: 機能設定
                        deprecated: false
                      created_at:
                        type: string
                        description: 機能設定作成日時
                        deprecated: false
                      updated_at:
                        type: string
                        description: 機能設定更新日時
                        deprecated: false
                      function_settings_quota:
                        type: object
                        properties:
                          subtitle_transcription:
                            type: integer
                            description: 自動字幕生成利用可能時間(秒)
                            deprecated: false
                            nullable: true
                          live:
                            type: integer
                            description: 同時ライブ配信数
                            deprecated: false
                            nullable: true
                        example:
                          subtitle_transcription: 500
                          live: 1
                        contentType: application/json
                        description: 機能設定上限数
                        deprecated: false
                    required:
                      - start_date
                      - function_settings
                      - created_at
                      - updated_at
                      - function_settings_quota
                    example:
                      start_date: '2022-09-01'
                      function_settings:
                        onetime: true
                        custom_recipe: false
                        playback_rate: false
                        subtitle_transcription: false
                        live: true
                        dvr: false
                        accelerated_video_encoding: false
                        player_engine: false
                      created_at: 2022-03-01T00:00:00.000000+0900
                      updated_at: 2022-04-01T00:00:00.000000+0900
                      function_settings_quota:
                        subtitle_transcription: 500
                        live: 1
                    contentType: application/json
                    description: 最新の機能設定
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - function_setting_history
                example:
                  contractor_id: exampleContractor
                  distributor_id: exampleDistributor
                  function_setting_history:
                    - start_date: '2022-09-01'
                      function_settings:
                        onetime: true
                        custom_recipe: false
                        playback_rate: false
                        subtitle_transcription: false
                        live: true
                        dvr: false
                        accelerated_video_encoding: false
                        player_engine: false
                      created_at: 2022-03-01T00:00:00.000000+0900
                      updated_at: 2022-04-01T00:00:00.000000+0900
                      function_settings_quota:
                        subtitle_transcription: 500
                        live: 1
                  latest_function_settings:
                    start_date: '2022-09-01'
                    function_settings:
                      onetime: true
                      custom_recipe: false
                      playback_rate: false
                      subtitle_transcription: false
                      live: true
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    created_at: 2022-03-01T00:00:00.000000+0900
                    updated_at: 2022-04-01T00:00:00.000000+0900
                    function_settings_quota:
                      subtitle_transcription: 500
                      live: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 対象の配信者が存在しません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/{distributor_id}/function_settings'

            -H 'Authorization: Bearer {contractor_token}'
      summary: 機能設定情報取得
      description: |-
        配信者の機能設定情報を取得します。
        最新の機能設定情報と機能設定変更の履歴が参照できます。
    delete:
      tags:
        - cont_function_settings
      operationId: delete-distributors-{distributor_id}-function_settings
      parameters:
        - name: distributor_id
          in: path
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 対象の機能設定の適用開始日 `yyyy-mm-dd`
                  deprecated: false
              required:
                - start_date
              example:
                start_date: '2022-09-01'
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  start_date:
                    type: string
                    description: 対象の機能設定の適用開始日 `yyyy-mm-dd`
                    deprecated: false
                required:
                  - contractor_id
                  - distributor_id
                  - start_date
                example:
                  contractor_id: exampleContractor
                  distributor_id: exampleDistributor
                  start_date: '2022-09-01'
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0016
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0016
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 正しい日付形式にしてください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 対象の配信者が存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0012
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0012
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 本日以前の適用開始日の契約は削除できません。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CNT_0006
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CNT_0006
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 対象の機能設定情報が存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X DELETE
            'https://${end_point}/distributors/{distributor_id}/function_settings'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "start_date": "2022-09-01"
            }'
      summary: 機能設定情報削除
      description: |-
        機能設定情報を削除します。

        パラメーターが以下の場合、削除できません。
        - 指定した適用開始日で登録された機能設定情報が存在しない
        - 指定した適用開始日が本日以前である
    patch:
      tags:
        - cont_function_settings
      operationId: patch-distributors-{distributor_id}-function_settings
      parameters:
        - name: distributor_id
          in: path
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: 適用開始日 `yyyy-mm-dd`
                  deprecated: false
                function_settings:
                  type: object
                  properties:
                    onetime:
                      type: boolean
                      description: ワンタイム機能
                      deprecated: false
                      default: false
                    custom_recipe:
                      type: boolean
                      description: カスタムレシピ機能
                      deprecated: false
                      default: false
                    playback_rate:
                      type: boolean
                      description: 再生速度設定機能
                      deprecated: false
                      default: false
                    subtitle_transcription:
                      type: boolean
                      description: 自動字幕生成
                      deprecated: false
                      default: false
                    live:
                      type: boolean
                      description: ライブ機能
                      deprecated: false
                      default: false
                    dvr:
                      type: boolean
                      description: DVR機能
                      deprecated: false
                      default: false
                    accelerated_video_encoding:
                      type: boolean
                      description: 高速変換機能
                      deprecated: false
                      default: false
                    player_engine:
                      type: boolean
                      description: デバイスプレイヤー機能
                      deprecated: false
                      default: false
                  example:
                    onetime: true
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: true
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  contentType: application/json
                  description: 機能設定
                  deprecated: false
                function_settings_quota:
                  type: object
                  properties:
                    subtitle_transcription:
                      type: integer
                      description: 自動字幕生成利用可能時間(秒)
                      deprecated: false
                      nullable: true
                    live:
                      type: integer
                      description: 同時ライブ配信数
                      deprecated: false
                      nullable: true
                  example:
                    subtitle_transcription: 500
                    live: 1
                  contentType: application/json
                  description: 機能設定上限数
                  deprecated: false
                  nullable: true
              required:
                - start_date
                - function_settings
              example:
                start_date: '2022-09-01'
                function_settings:
                  onetime: true
                  custom_recipe: false
                  playback_rate: false
                  subtitle_transcription: false
                  live: true
                  dvr: false
                  accelerated_video_encoding: false
                  player_engine: false
                function_settings_quota:
                  subtitle_transcription: 500
                  live: 1
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  start_date:
                    type: string
                    description: 適用開始日 `yyyy-mm-dd`
                    deprecated: false
                  created_at:
                    type: string
                    description: 機能設定作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 機能設定更新日時
                    deprecated: false
                  function_settings:
                    type: object
                    properties:
                      onetime:
                        type: boolean
                        description: ワンタイム機能
                        deprecated: false
                        default: false
                      custom_recipe:
                        type: boolean
                        description: カスタムレシピ機能
                        deprecated: false
                        default: false
                      playback_rate:
                        type: boolean
                        description: 再生速度設定機能
                        deprecated: false
                        default: false
                      subtitle_transcription:
                        type: boolean
                        description: 自動字幕生成
                        deprecated: false
                        default: false
                      live:
                        type: boolean
                        description: ライブ機能
                        deprecated: false
                        default: false
                      dvr:
                        type: boolean
                        description: DVR機能
                        deprecated: false
                        default: false
                      accelerated_video_encoding:
                        type: boolean
                        description: 高速変換機能
                        deprecated: false
                        default: false
                      player_engine:
                        type: boolean
                        description: デバイスプレイヤー機能
                        deprecated: false
                        default: false
                    example:
                      onetime: true
                      custom_recipe: false
                      playback_rate: false
                      subtitle_transcription: false
                      live: true
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    contentType: application/json
                    description: 機能設定
                    deprecated: false
                    nullable: true
                  function_settings_quota:
                    type: object
                    properties:
                      subtitle_transcription:
                        type: integer
                        description: 自動字幕生成利用可能時間(秒)
                        deprecated: false
                        nullable: true
                      live:
                        type: integer
                        description: 同時ライブ配信数
                        deprecated: false
                        nullable: true
                    example:
                      subtitle_transcription: 500
                      live: 1
                    contentType: application/json
                    description: 機能設定上限数
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - start_date
                  - created_at
                  - updated_at
                example:
                  contractor_id: exampleContractor
                  distributor_id: exampleDistributor
                  start_date: '2022-09-01'
                  created_at: 2022-08-01 12:00:00.000000+0900
                  updated_at: 2022-08-01 12:00:00.000000+0900
                  function_settings:
                    onetime: true
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: true
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  function_settings_quota:
                    subtitle_transcription: 500
                    live: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値が不適切です。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0016
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0016
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 正しい日付形式にしてください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0007
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0007
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 契約で利用できない機能を有効にできません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 対象の配信者が存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0010
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0010
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 本日よりも前の適用開始日の機能設定は登録できません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0014
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0014
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 契約者の適用開始日以前での適用開始日の機能設定は登録できません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CNT_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CNT_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 機能設定の割り当て上限数を超えています。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CNT_0006
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CNT_0006
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 対象の機能設定情報が存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X PATCH
            'https://${end_point}/distributors/{distributor_id}/function_settings'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "start_date": "2022-09-01",
              "function_settings": {
                "onetime": true,
                "custom_recipe": false,
                "playback_rate": false,
                "subtitle_transcription": false,
                "live": true,
                "dvr": false,
                "accelerated_video_encoding": false,
                "player_engine": false
              },
              "function_settings_quota": {
                "subtitle_transcription": 500,
                "live": 1
              }
            }'
      summary: 機能設定情報更新
      description: |-
        機能設定情報を更新します。

        パラメーターが以下の場合、登録できません。

        - 適用開始日に本日よりも前の日付が指定されている

        - 契約者が結んでいる契約で利用できないとされている機能を有効にしようとしている
  /distributors/analytics/visits:
    post:
      tags:
        - cont_analytics
      operationId: post-distributors-analytics-visits
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: 対象年月日(開始)
                  deprecated: false
                  minimum: '2023-01-01'
                to:
                  type: string
                  description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
                  deprecated: false
                timeframe:
                  type: string
                  enum:
                    - day
                    - month
                    - year
                  description: 集計期間
                  deprecated: false
                  default: day
                distributor_ids:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  description: 配信者IDリスト
                  deprecated: false
                  nullable: true
              required:
                - from
              example:
                from: '2023-01-01'
                to: '2023-01-02'
                timeframe: day
                distributor_ids:
                  - distributorid
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: object
                    properties:
                      new_visit_plays:
                        type: integer
                        description: 新規ユーザ再生回数
                        deprecated: false
                      new_visit_average_play_duration_seconds:
                        type: number
                        description: 新規ユーザ平均再生時間（秒）
                        deprecated: false
                      returning_visit_plays:
                        type: integer
                        description: リピートユーザ再生回数
                        deprecated: false
                      returning_visit_average_play_duration_seconds:
                        type: number
                        description: リピートユーザ平均再生時間（秒）
                        deprecated: false
                    required:
                      - new_visit_plays
                      - new_visit_average_play_duration_seconds
                      - returning_visit_plays
                      - returning_visit_average_play_duration_seconds
                    example:
                      new_visit_plays: '1'
                      new_visit_average_play_duration_seconds: '1'
                      returning_visit_plays: '1'
                      returning_visit_average_play_duration_seconds: '1'
                    contentType: application/json
                    description: 期間内全体統計
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: 年月日
                          deprecated: false
                        new_visit_plays:
                          type: integer
                          description: 新規ユーザ再生回数
                          deprecated: false
                        new_visit_average_play_duration_seconds:
                          type: number
                          description: 新規ユーザ平均再生時間（秒）
                          deprecated: false
                        returning_visit_plays:
                          type: integer
                          description: リピートユーザ再生回数
                          deprecated: false
                        returning_visit_average_play_duration_seconds:
                          type: number
                          description: リピートユーザ平均再生時間（秒）
                          deprecated: false
                      required:
                        - date
                        - new_visit_plays
                        - new_visit_average_play_duration_seconds
                        - returning_visit_plays
                        - returning_visit_average_play_duration_seconds
                      example:
                        date: '2023-01-01'
                        new_visit_plays: '1'
                        new_visit_average_play_duration_seconds: '1'
                        returning_visit_plays: '1'
                        returning_visit_average_play_duration_seconds: '1'
                      contentType: application/json
                    description: 時系列統計
                    deprecated: false
                  total_count:
                    type: integer
                    description: 時系列統計データレコード件数
                    deprecated: false
                required:
                  - total
                  - items
                  - total_count
                example:
                  total:
                    date: '2023-01-01'
                    new_visit_plays: 1
                    new_visit_average_play_duration_seconds: 1
                    returning_visit_plays: 1
                    returning_visit_average_play_duration_seconds: 1
                  items:
                    - date: '2023-01-01'
                      new_visit_plays: 1
                      new_visit_average_play_duration_seconds: 1
                      returning_visit_plays: 1
                      returning_visit_average_play_duration_seconds: 1
                  total_count: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X POST 'https://${end_point}/distributors/analytics/visits'
            -H 'Authorization: Bearer {contractor_token}'
            -H 'Content-Type: application/json'
            -d '{
              "from": "2023-01-01",
              "to": "2023-01-02",
              "timeframe": "day",
              "distributor_ids": [
                "distributorid"
              ]
            }'
      summary: 新規/リピート統計取得
  /distributors/analytics/contents/summary:
    post:
      tags:
        - cont_analytics
      operationId: post-distributors-analytics-contents-summary
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: 対象年月日(開始)
                  deprecated: false
                  minimum: '2023-01-01'
                to:
                  type: string
                  description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
                  deprecated: false
                distributor_ids:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  description: 配信者IDリスト
                  deprecated: false
                  nullable: true
                group_by:
                  type: string
                  enum:
                    - content_id
                    - country
                    - region
                    - referrer
                    - device
                    - os
                    - os_version
                    - browser
                    - browser_version
                  description: >-
                    統計値を集約するディメンション`filter_by`に`content_id`以外のディメンションを指定する場合、group_byには`content_id`以外を指定できません。
                  deprecated: false
                  default: content_id
                group_name:
                  type: string
                  description: >-
                    ディメンションの集約グループ名<br>`content_id`で集約してコンテンツIDをグループ名に指定すると、1つのコンテンツだけで集計されます。<br>`country`で集約して国名をグループ名に指定すると、その国名のコンテンツだけで集計されます。<br>`region`で集約して国名をグループ名に指定すると、その国内での地域で集計されます。<br>`referrer`で集約して参照元ドメインをグループ名に指定すると、その参照元ドメインのコンテンツだけで集計されます。<br>`device`で集約してデバイス種別をグループ名に指定すると、そのデバイス種別だけで集計されます。<br>`os`で集約してOSをグループ名に指定すると、そのOSだけで集計されます。<br>`os_version`で集約してOSをグループ名に指定すると、そのOSのメジャーバージョンで集計されます。<br>`browser`で集約してブラウザ名をグループ名に指定すると、そのブラウザだけで集計されます。<br>`browser_version`で集約してブラウザ名をグループ名に指定すると、そのブラウザのメジャーバージョンで集計されます。<br>
                  deprecated: false
                  minLength: 1
                  nullable: true
                content_id:
                  type: string
                  description: >-
                    コンテンツID<br>集計対象のコンテンツを1つに限定します。<br>`group_name`フィールドにコンテンツIDを指定した場合に、このフィールドで別のコンテンツIDを指定すると異なるコンテンツIDで2回フィルターされることになり、空の結果となります。
                  deprecated: false
                  minLength: 1
                  nullable: true
                filter_by:
                  type: string
                  enum:
                    - content_id
                    - country
                    - referrer
                    - device
                    - os
                    - browser
                  description: ディメンションを絞るグループ名
                  deprecated: false
                  minLength: 1
                  nullable: true
                filter_value:
                  type: string
                  description: '`filter_by`で指定したディメンションを絞り込む値'
                  deprecated: false
                  minLength: 1
                  nullable: true
                sort_by:
                  type: string
                  enum:
                    - plays
                    - impressions
                    - plays_from_impressions
                    - average_play_duration_seconds
                    - transfer
                  description: 並び替えに使用するフィールド
                  deprecated: false
                  default: plays
                order:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: 昇順(asc) / 降順(desc)
                  deprecated: false
                  default: desc
                media_type:
                  type: string
                  enum:
                    - pdf
                    - video
                    - live
                    - audio
                  description: コンテンツ種別
                  deprecated: false
                  default: video
                page_size:
                  type: integer
                  description: 1ページあたりのコンテンツ数
                  deprecated: false
                  maximum: 200
                  minimum: 1
                  default: 20
                page:
                  type: integer
                  description: ページ番号
                  deprecated: false
                  minimum: 1
                  default: 1
              required:
                - from
              example:
                from: '2023-01-01'
                to: '2023-01-02'
                distributor_ids:
                  - distributorid
                group_by: content_id
                group_name: グループ名
                content_id: 4ba28124-c54g-83d8-9xxb-5324bddbafc9
                filter_by: content_id
                filter_value: content_id
                sort_by: plays
                order: desc
                media_type: video
                page_size: 20
                page: 1
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: 対象のレコード件数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        distributor_ids:
                          type: array
                          items:
                            type: string
                          description: ユーザーID配列<br>集約したときに複数のユーザが含まれるとき要素が1以上になります。
                          deprecated: false
                        group_name:
                          type: string
                          description: ディメンションの集約グループ名
                          deprecated: false
                        alternative_group_name:
                          type: string
                          description: >-
                            ディメンションの集約グループ別名<br>content_idで集約したときコンテンツのタイトルが設定されます。<br>regionで集約したときは地域名が設定されます。<br>os_versionで集約したときはOSのメジャーバージョンが設定されます。なお、macOS
                            11以降のMacOSはMacOS
                            10として集計されます。<br>browser_versionで集約したときはブラウザのメジャーバージョンが設定されます。
                          deprecated: false
                        plays:
                          type: integer
                          description: 再生回数
                          deprecated: false
                        average_play_duration_seconds:
                          type: number
                          description: 平均再生時間（秒）
                          deprecated: false
                          nullable: true
                        impressions:
                          type: integer
                          description: >-
                            表示回数<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                          deprecated: false
                          nullable: true
                        plays_from_impressions:
                          type: number
                          description: >-
                            視聴割合。再生回数 /
                            表示回数。<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                          deprecated: false
                          nullable: true
                        transfer:
                          type: integer
                          description: 転送量(バイト)<br>コンテンツIDグループで集約したときのみ取得できます。
                          deprecated: false
                          nullable: true
                      required:
                        - distributor_ids
                        - group_name
                        - alternative_group_name
                        - plays
                        - average_play_duration_seconds
                      example:
                        distributor_ids:
                          - distributorid
                        group_name: グループ名
                        alternative_group_name: タイトル
                        plays: 10
                        average_play_duration_seconds: 10
                        impressions: 10
                        plays_from_impressions: 1
                        transfer: 1073741824
                      contentType: application/json
                    description: 統計
                    deprecated: false
                  page:
                    type: integer
                    description: ページ番号
                    deprecated: false
                    minimum: 1
                    default: 1
                required:
                  - total_count
                  - items
                example:
                  total_count: 1
                  items:
                    - user_ids:
                        - distributorid
                      group_name: グループ名
                      alternative_group_name: タイトル
                      plays: 10
                      average_play_duration_seconds: 10
                      impressions: 10
                      plays_from_impressions: 1
                      transfer: 1073741824
                  page: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_ANA_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - ライブコンテンツの統計では表示回数/視聴割合での並び替えはサポートされていません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0005
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0005
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - コンテンツID集約以外では再生回数/平均再生時間以外での並び替えはサポートされていません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0006
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0006
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - group_byとfilter_byの内、片方はcontent_idである必要があります。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0007
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0007
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - filter_byを指定した場合はfilter_valueも指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0008
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0008
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - >-
                            media_type=audio を指定した場合、group_by および filter_by に
                            content_id を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X POST
            'https://${end_point}/distributors/analytics/contents/summary'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "from": "2023-01-01",
              "to": "2023-01-02",
              "distributor_ids": [
                "distributorid"
              ],
              "group_by": "content_id",
              "group_name": "グループ名",
              "content_id": "4ba28124-c54g-83d8-9xxb-5324bddbafc9",
              "filter_by": "content_id",
              "filter_value": "content_id",
              "sort_by": "plays",
              "order": "desc",
              "media_type": "video",
              "page_size": 20,
              "page": 1
            }'
      summary: コンテンツ統計情報取得
  /distributors/analytics/contents/timeseries:
    post:
      tags:
        - cont_analytics
      operationId: post-distributors-analytics-contents-timeseries
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: 対象年月日(開始)
                  deprecated: false
                  minimum: '2023-01-01'
                to:
                  type: string
                  description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
                  deprecated: false
                timeframe:
                  type: string
                  enum:
                    - day
                    - month
                    - year
                  description: 集計期間
                  deprecated: false
                  default: day
                distributor_ids:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  description: 配信者IDリスト
                  deprecated: false
                  nullable: true
                group_by:
                  type: string
                  enum:
                    - content_id
                    - country
                    - referrer
                    - device
                    - os
                    - browser
                  description: 統計値を集約するディメンション
                  deprecated: false
                  default: content_id
                group_name:
                  type: string
                  description: >-
                    ディメンションの集約グループ名<br>特定のグループ名で集約するときに指定します。<br>`content_id`で集約するときはコンテンツIDが指定できます。<br>`country`で集約して国名をグループ名に指定すると、その国名のコンテンツだけで集計されます。<br>`referrer`で集約して参照元をグループ名に指定すると、その参照元のコンテンツだけで集計されます。<br>`device`で集約してデバイス種別をグループ名に指定すると、そのデバイス種別だけで集計されます。<br>`os`で集約してOSをグループ名に指定すると、そのOSだけで集計されます。<br>`browser`で集約してブラウザ名をグループ名に指定すると、そのブラウザだけで集計されます。<br>
                  deprecated: false
                  minLength: 1
                  nullable: true
                content_id:
                  type: string
                  description: >-
                    コンテンツID<br>集計対象のコンテンツを1つに限定します。<br>`group_name`フィールドにコンテンツIDを指定した場合に、このフィールドで別のコンテンツIDを指定すると異なるコンテンツIDで2回フィルターされることになり、0で埋められた結果が返ります。
                  deprecated: false
                  minLength: 1
                  nullable: true
                media_type:
                  type: string
                  enum:
                    - pdf
                    - video
                    - live
                    - audio
                  description: コンテンツ種別
                  deprecated: false
                  default: video
              required:
                - from
              example:
                from: '2023-01-01'
                to: '2023-01-02'
                timeframe: day
                distributor_ids:
                  - distributorid
                group_by: content_id
                group_name: グループ名
                content_id: 4ba28124-c54g-83d8-9xxb-5324bddbafc9
                media_type: video
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: object
                    properties:
                      plays:
                        type: integer
                        description: 合計再生回数
                        deprecated: false
                      average_play_duration_seconds:
                        type: number
                        description: 平均再生時間（秒）
                        deprecated: false
                        nullable: true
                      transfer:
                        type: integer
                        description: 合計転送量最(バイト)<br>コンテンツIDグループで集約したときのみ取得できます。
                        deprecated: false
                        nullable: true
                      impressions:
                        type: integer
                        description: >-
                          合計表示回数<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                        deprecated: false
                        nullable: true
                      plays_from_impressions:
                        type: number
                        description: >-
                          視聴割合。合計再生回数 /
                          合計表示回数。<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                        deprecated: false
                        nullable: true
                    required:
                      - plays
                      - average_play_duration_seconds
                    example:
                      plays: 10
                      average_play_duration_seconds: 10
                      transfer: 1073741824
                      impressions: 10
                      plays_from_impressions: 1
                    contentType: application/json
                    description: 期間内全体統計
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          description: 年月日
                          deprecated: false
                        plays:
                          type: integer
                          description: 再生回数
                          deprecated: false
                        average_play_duration_seconds:
                          type: number
                          description: 平均再生時間（秒）
                          deprecated: false
                          nullable: true
                        transfer:
                          type: integer
                          description: 転送量(バイト)<br>コンテンツIDグループで集約したときのみ取得できます。
                          deprecated: false
                          nullable: true
                        plays_from_impressions:
                          type: number
                          description: >-
                            視聴割合。再生回数 /
                            表示回数。<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                          deprecated: false
                          nullable: true
                        impressions:
                          type: integer
                          description: >-
                            表示回数<br>コンテンツIDグループで集約したときのみ取得できます。ただしライブコンテンツでは取得できません。
                          deprecated: false
                          nullable: true
                      required:
                        - date
                        - plays
                        - average_play_duration_seconds
                      example:
                        date: '2022-01-01'
                        plays: 10
                        average_play_duration_seconds: 10
                        transfer: 1073741824
                        plays_from_impressions: 1
                        impressions: 10
                      contentType: application/json
                    description: 時系列統計
                    deprecated: false
                  total_count:
                    type: integer
                    description: 時系列データレコード件数
                    deprecated: false
                  group_name:
                    type: string
                    description: ディメンションの集約グループ名
                    deprecated: false
                    nullable: true
                  alternative_group_name:
                    type: string
                    description: ディメンションの集約グループ別名<br>content_idで集約したときコンテンツのタイトルが設定されます。
                    deprecated: false
                    nullable: true
                required:
                  - total
                  - items
                  - total_count
                example:
                  total:
                    date: '2022-01-01'
                    plays: 10
                    average_play_duration_seconds: 10
                    transfer: 1073741824
                    plays_from_impressions: 1
                    impressions: 10
                  items:
                    - date: '2022-01-01'
                      plays: 10
                      average_play_duration_seconds: 10
                      transfer: 1073741824
                      plays_from_impressions: 1
                      impressions: 10
                  total_count: 1
                  group_name: グループ名
                  alternative_group_name: タイトル
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_ANA_0009
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0009
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - >-
                            media_type=audio を指定した場合、group_by に content_id
                            を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X POST
            'https://${end_point}/distributors/analytics/contents/timeseries'

            -H 'Authorization: Bearer {contractor_token}'

            -H 'Content-Type: application/json'

            -d '{
              "from": "2023-01-01",
              "to": "2023-01-02",
              "timeframe": "day",
              "distributor_ids": [
                "distributorid"
              ],
              "group_by": "content_id",
              "group_name": "グループ名",
              "content_id": "4ba28124-c54g-83d8-9xxb-5324bddbafc9",
              "media_type": "video"
            }'
      summary: コンテンツ時系列統計情報取得
  /distributors/analytics/contents/{content_id}/audience_retention:
    get:
      tags:
        - cont_analytics
      operationId: get-distributors-analytics-contents-{content_id}-audience_retention
      parameters:
        - name: distributor_id
          in: query
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
            minLength: 1
        - name: content_id
          in: path
          description: コンテンツID
          required: true
          example: content_id
          schema:
            type: string
            description: コンテンツID
            deprecated: false
            minLength: 1
        - name: from
          in: query
          description: 対象年月日(開始)
          required: true
          example: '2023-01-01'
          schema:
            type: string
            description: 対象年月日(開始)
            deprecated: false
            minimum: '2023-01-01'
        - name: to
          in: query
          description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2023-01-02'
          schema:
            type: string
            description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: media_type
          in: query
          description: コンテンツ種別
          example: video
          schema:
            type: string
            enum:
              - pdf
              - video
              - live
            description: コンテンツ種別
            deprecated: false
            default: video
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        playhead:
                          type: integer
                          description: 再生開始地点からの経過時間
                          deprecated: false
                        audience_retention:
                          type: number
                          description: 視聴割合
                          deprecated: false
                      required:
                        - playhead
                        - audience_retention
                      example:
                        playhead: 5
                        audience_retention: 0.5
                      contentType: application/json
                    description: 視聴維持率統計
                    deprecated: false
                  total_count:
                    type: integer
                    description: 視聴維持率データレコード件数
                    deprecated: false
                required:
                  - items
                  - total_count
                example:
                  items:
                    - playhead: 5
                      audience_retention: 0.5
                  total_count: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_ANA_0001
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0001
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 存在しない配信者IDが指定されました。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0003
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0003
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 存在しないコンテンツが指定されました。
                        description: エラーメッセージ
                    contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/analytics/contents/{content_id}/audience_retention?distributor_id=distributorid&from=2023-01-01&to=2023-01-02&media_type=video'

            -H 'Authorization: Bearer {contractor_token}'
      summary: コンテンツ視聴維持率取得
  /distributors/analytics/contents/{content_id}/completion:
    get:
      tags:
        - cont_analytics
      operationId: get-distributors-analytics-contents-{content_id}-completion
      parameters:
        - name: distributor_id
          in: query
          description: 配信者ID
          required: true
          example: distributorid
          schema:
            type: string
            description: 配信者ID
            deprecated: false
            minLength: 1
        - name: content_id
          in: path
          description: コンテンツID
          required: true
          example: 4ba28124-c54g-83d8-9xxb-5324bddbafc9
          schema:
            type: string
            description: コンテンツID
            deprecated: false
        - name: from
          in: query
          description: 対象年月日(開始)
          required: true
          example: '2023-01-01'
          schema:
            type: string
            description: 対象年月日(開始)
            deprecated: false
            minimum: '2023-01-01'
        - name: to
          in: query
          description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2023-01-02'
          schema:
            type: string
            description: 対象年月日(終了)<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: media_type
          in: query
          description: コンテンツ種別
          example: video
          schema:
            type: string
            enum:
              - video
            description: コンテンツ種別
            deprecated: false
            default: video
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        playback_progress:
                          type: number
                          description: コンテンツの全尺を1としたときの再生位置
                          deprecated: false
                        view_rate:
                          type: number
                          description: 視聴割合<br> シークなし視聴回数 / 総視聴回数
                          deprecated: false
                      required:
                        - playback_progress
                        - view_rate
                      example:
                        playback_progress: 0.25
                        view_rate: 0.5
                      contentType: application/json
                    description: 再生達成率統計
                    deprecated: false
                  total_count:
                    type: integer
                    description: 再生達成率データレコード件数
                    deprecated: false
                required:
                  - items
                  - total_count
                example:
                  items:
                    - playback_progress: 0.25
                      view_rate: 0.5
                  total_count: 1
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '404':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Not Found
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_ANA_0001
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0001
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 存在しない配信者IDが指定されました。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_ANA_0003
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_ANA_0003
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 存在しないコンテンツが指定されました。
                        description: エラーメッセージ
                    contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - contractor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/analytics/contents/{content_id}/completion?distributor_id=distributorid&from=2023-01-01&to=2023-01-02&media_type=video'

            -H 'Authorization: Bearer {contractor_token}'
      summary: コンテンツ再生達成率取得
  /distributors/auth/token:
    post:
      tags:
        - dist_token
      operationId: post-distributors-auth-token
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - password
                    - refresh_token
                  description: 権限付与タイプ
                  deprecated: false
                refresh_token:
                  type: string
                  description: リフレッシュトークン
                  deprecated: false
                  nullable: true
                password:
                  type: string
                  description: 配信者用パスワード
                  deprecated: false
                  nullable: true
                contractor_id:
                  type: string
                  description: 契約者ID
                  deprecated: false
                  maxLength: 100
                  nullable: true
                distributor_id:
                  type: string
                  description: 配信者ID
                  deprecated: false
                  nullable: true
              required:
                - grant_type
              example:
                grant_type: password
                refresh_token: exampleToken
                password: password
                contractor_id: contractorid
                distributor_id: distributorid
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  access_token:
                    type: string
                    description: アクセストークン
                    deprecated: false
                  access_token_expires_at:
                    type: string
                    description: アクセストークンの有効期限。
                    deprecated: false
                  refresh_token:
                    type: string
                    description: リフレッシュトークン
                    deprecated: false
                  refresh_token_expires_at:
                    type: string
                    description: リフレッシュトークンの有効期限。
                    deprecated: false
                    nullable: true
                  distributor_id_alias:
                    type: string
                    description: 配信者IDエイリアス
                    deprecated: false
                    nullable: true
                required:
                  - distributor_id
                  - access_token
                  - access_token_expires_at
                  - refresh_token
                example:
                  distributor_id: distributorid
                  access_token: exampleAccessToken
                  access_token_expires_at: 2020-01-01T00:00:00.000000+0900
                  refresh_token: exampleRefreshToken
                  refresh_token_expires_at: 2020-01-01T00:00:00.000000+0900
                  distributor_id_alias: exampleDistributorIdAlias
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[refresh_token]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X POST 'https://${end_point}/distributors/auth/token'
            -H 'Content-Type: application/json'
            -d '{
              "grant_type": "password",
              "refresh_token": "exampleToken",
              "password": "password",
              "contractor_id": "contractorid",
              "distributor_id": "distributorid"
            }'
      summary: 配信者トークン取得
      description: |-
        アクセストークン、リフレッシュトークンを取得します。

        `grant_type`に応じて、リクエストするパラメーターが違います。（後述）
        ただし、どちらの場合もレスポンスは同じです。

        各APIへのリクエスト時には、当該APIで取得したトークンをヘッダーに設定してください。

        ```
        Authorization: Bearer access_token
        ```

        #### アクセストークンの場合

        + grant_type: "password" 固定

        + contractor_id/distributor_id/password:必須

        #### リフレッシュトークンの場合

        + grant_type: "refresh_token" 固定

        + refresh_token:必須
  /distributors/usages/vod/storages:
    get:
      tags:
        - dist_usages
      operationId: get-distributors-usages-vod-storages
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
              - year
            description: 集計単位
            deprecated: false
            default: day
            nullable: true
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                        distributor_id:
                          type: string
                          description: 配信者ID
                          deprecated: false
                        aggregate_period:
                          type: string
                          description: 集計期間
                          deprecated: false
                        storage_amount:
                          type: integer
                          description: ストレージ利用量(バイト)
                          deprecated: false
                      required:
                        - contractor_id
                        - distributor_id
                        - aggregate_period
                        - storage_amount
                      example:
                        contractor_id: exampleContractorId
                        distributor_id: exampleDistributorId
                        aggregate_period: '2022-04-01'
                        storage_amount: 10000
                      contentType: application/json
                    description: ストレージ利用量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    contractor_id: exampleContractorId
                    distributor_id: exampleDistributorId
                    aggregate_period: '2022-04-01'
                    storage_amount: 10000
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - distributor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/usages/vod/storages?from=2022-01-01&to=2022-01-02&kind=day'

            -H 'Authorization: Bearer {distributor_token}'
      summary: ストレージ利用量取得
      description: |-
        配信者のVODでのストレージ利用量を取得します。

        * 配信者の利用量を取得することができます。
  /distributors/usages/vod/transfers:
    get:
      tags:
        - dist_usages
      operationId: get-distributors-usages-vod-transfers
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
              - year
            description: 集計単位
            deprecated: false
            default: day
            nullable: true
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                    description: itemsの総数
                    deprecated: false
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        contractor_id:
                          type: string
                          description: 契約者ID
                          deprecated: false
                        distributor_id:
                          type: string
                          description: 配信者ID
                          deprecated: false
                        aggregate_period:
                          type: string
                          description: 集計期間
                          deprecated: false
                        transfer_amount:
                          type: integer
                          description: 転送量(バイト)
                          deprecated: false
                      required:
                        - contractor_id
                        - distributor_id
                        - aggregate_period
                        - transfer_amount
                      example:
                        contractor_id: exampleContractorId
                        distributor_id: exampleDistributorId
                        aggregate_period: '2022-04-01'
                        transfer_amount: 1073741824
                      contentType: application/json
                    description: 転送量一覧
                    deprecated: false
                required:
                  - total_count
                  - items
                example:
                  total_count: 0
                  items:
                    contractor_id: exampleContractorId
                    distributor_id: exampleDistributorId
                    aggregate_period: '2022-04-01'
                    transfer_amount: 1073741824
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - distributor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/usages/vod/transfers?from=2022-01-01&to=2022-01-02&kind=day'

            -H 'Authorization: Bearer {distributor_token}'
      summary: 転送量取得
      description: |-
        配信者のVODでの転送量を取得します。

        * 配信者の転送量を取得することができます。
  /distributors/usages/vod/csv:
    get:
      tags:
        - dist_usages
      operationId: get-distributors-usages-vod-csv
      parameters:
        - name: from
          in: query
          description: 検索開始日
          required: true
          example: '2022-01-01'
          schema:
            type: string
            description: 検索開始日
            deprecated: false
            minimum: '2022-01-01'
        - name: to
          in: query
          description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
          example: '2022-01-02'
          schema:
            type: string
            description: 検索終了日<br>無指定のとき実行時前日の年月日(日本時間)が設定されます。
            deprecated: false
        - name: kind
          in: query
          description: 集計単位
          example: day
          schema:
            type: string
            enum:
              - day
              - month
              - year
            description: 集計単位
            deprecated: false
            default: day
        - name: simplified
          in: query
          description: true のとき、カラム名を日本語・ストレージ/転送量をバイトから GB（小数第3位）に変換した簡略版 CSV を返します。
          schema:
            type: boolean
            description: true のとき、カラム名を日本語・ストレージ/転送量をバイトから GB（小数第3位）に変換した簡略版 CSV を返します。
            deprecated: false
            default: false
        - name: encoding
          in: query
          description: 文字コード（utf-8 / shift-jis）
          example: utf-8
          schema:
            type: string
            enum:
              - utf-8
              - shift-jis
            description: 文字コード（utf-8 / shift-jis）
            deprecated: false
            default: utf-8
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                contentType: application/octet-stream
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0004
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0004
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 必須パラメーターが存在しません。[param_names]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0018
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0018
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 集計終了日は、集計開始日以降の日付を指定してください。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0019
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0019
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の範囲で指定する必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0022
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0022
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 検索開始日fromには本日以前の日付を設定してください。
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - distributor_token: []
      x-codeSamples:
        - lang: shell
          source: >-
            curl -v -X GET
            'https://${end_point}/distributors/usages/vod/csv?from=2022-01-01&to=2022-01-02&kind=day&simplified=False&encoding=utf-8'

            -H 'Authorization: Bearer {distributor_token}'
      summary: 利用量CSVダウンロード
      description: 配信者のVODでの利用量(ストレージ利用量、転送量)のCSVファイルを取得します。
  /distributors/me:
    get:
      tags:
        - distributors_me
      operationId: get-distributors-me
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  function_settings:
                    type: object
                    properties:
                      onetime:
                        type: boolean
                        description: ワンタイム機能
                        deprecated: false
                        default: false
                      custom_recipe:
                        type: boolean
                        description: カスタムレシピ機能
                        deprecated: false
                        default: false
                      playback_rate:
                        type: boolean
                        description: 再生速度設定機能
                        deprecated: false
                        default: false
                      subtitle_transcription:
                        type: boolean
                        description: 自動字幕生成
                        deprecated: false
                        default: false
                      live:
                        type: boolean
                        description: ライブ機能
                        deprecated: false
                        default: false
                      dvr:
                        type: boolean
                        description: DVR機能
                        deprecated: false
                        default: false
                      accelerated_video_encoding:
                        type: boolean
                        description: 高速変換機能
                        deprecated: false
                        default: false
                      player_engine:
                        type: boolean
                        description: デバイスプレイヤー機能
                        deprecated: false
                        default: false
                    example:
                      onetime: false
                      custom_recipe: false
                      playback_rate: false
                      subtitle_transcription: false
                      live: false
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    contentType: application/json
                    description: 機能設定
                    deprecated: false
                  function_settings_quota:
                    type: object
                    properties:
                      subtitle_transcription:
                        type: integer
                        description: 自動字幕生成利用可能時間(秒)
                        deprecated: false
                        nullable: true
                      live:
                        type: integer
                        description: 同時ライブ配信数
                        deprecated: false
                        nullable: true
                    example:
                      subtitle_transcription: 500
                      live: 1
                    contentType: application/json
                    description: 機能設定利用可能上限
                    deprecated: false
                  created_at:
                    type: string
                    description: 作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 更新日時
                    deprecated: false
                  distributor_id_alias:
                    type: string
                    description: 配信者IDエイリアス
                    deprecated: false
                    nullable: true
                  expires_at:
                    type: string
                    description: 失効日
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - function_settings
                  - function_settings_quota
                  - created_at
                  - updated_at
                  - distributor_id_alias
                example:
                  contractor_id: 32fc4184-39a2-4162-9997-fdfbbe987d3c
                  distributor_id: distributor001
                  function_settings:
                    onetime: false
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: false
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  function_settings_quota:
                    subtitle_transcription: 500
                    live: 1
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                  distributor_id_alias: distributorAlias001
                  expires_at: null
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0017
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0017
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 実行ユーザーが存在しません。
                    description: エラーメッセージ
                contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - distributor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X GET 'https://${end_point}/distributors/me'
            -H 'Authorization: Bearer {distributor_token}'
      summary: 配信者自身の情報取得
      description: 配信者自身の情報を取得します。
    patch:
      tags:
        - distributors_me
      operationId: patch-distributors-me
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: |

                    配信者用パスワード。半角英数字と以下の記号のみ登録できます。<br>
                    英大文字・英小文字・数字・記号をそれぞれ1文字以上含む10文字以上、100文字以下で指定してください。<br>
                    ```
                    ."#?!$%&()]@[,=~|`{}+*<>_/\;:^'-
                    ```
                  deprecated: false
                  maxLength: 100
                  minLength: 10
                  nullable: true
              example:
                password: Distributor_123
              contentType: application/json
      responses:
        '200':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  contractor_id:
                    type: string
                    description: 契約者ID
                    deprecated: false
                  distributor_id:
                    type: string
                    description: 配信者ID
                    deprecated: false
                  function_settings:
                    type: object
                    properties:
                      onetime:
                        type: boolean
                        description: ワンタイム機能
                        deprecated: false
                        default: false
                      custom_recipe:
                        type: boolean
                        description: カスタムレシピ機能
                        deprecated: false
                        default: false
                      playback_rate:
                        type: boolean
                        description: 再生速度設定機能
                        deprecated: false
                        default: false
                      subtitle_transcription:
                        type: boolean
                        description: 自動字幕生成
                        deprecated: false
                        default: false
                      live:
                        type: boolean
                        description: ライブ機能
                        deprecated: false
                        default: false
                      dvr:
                        type: boolean
                        description: DVR機能
                        deprecated: false
                        default: false
                      accelerated_video_encoding:
                        type: boolean
                        description: 高速変換機能
                        deprecated: false
                        default: false
                      player_engine:
                        type: boolean
                        description: デバイスプレイヤー機能
                        deprecated: false
                        default: false
                    example:
                      onetime: false
                      custom_recipe: false
                      playback_rate: false
                      subtitle_transcription: false
                      live: false
                      dvr: false
                      accelerated_video_encoding: false
                      player_engine: false
                    contentType: application/json
                    description: 機能設定
                    deprecated: false
                  function_settings_quota:
                    type: object
                    properties:
                      subtitle_transcription:
                        type: integer
                        description: 自動字幕生成利用可能時間(秒)
                        deprecated: false
                        nullable: true
                      live:
                        type: integer
                        description: 同時ライブ配信数
                        deprecated: false
                        nullable: true
                    example:
                      subtitle_transcription: 500
                      live: 1
                    contentType: application/json
                    description: 機能設定利用可能上限
                    deprecated: false
                  created_at:
                    type: string
                    description: 作成日時
                    deprecated: false
                  updated_at:
                    type: string
                    description: 更新日時
                    deprecated: false
                  distributor_id_alias:
                    type: string
                    description: 配信者IDエイリアス
                    deprecated: false
                    nullable: true
                  expires_at:
                    type: string
                    description: 失効日
                    deprecated: false
                    nullable: true
                required:
                  - contractor_id
                  - distributor_id
                  - function_settings
                  - function_settings_quota
                  - created_at
                  - updated_at
                  - distributor_id_alias
                example:
                  contractor_id: 32fc4184-39a2-4162-9997-fdfbbe987d3c
                  distributor_id: distributor001
                  function_settings:
                    onetime: false
                    custom_recipe: false
                    playback_rate: false
                    subtitle_transcription: false
                    live: false
                    dvr: false
                    accelerated_video_encoding: false
                    player_engine: false
                  function_settings_quota:
                    subtitle_transcription: 500
                    live: 1
                  created_at: 2022-03-01T00:00:00.000000+0900
                  updated_at: 2022-04-01T00:00:00.000000+0900
                  distributor_id_alias: distributorAlias001
                  expires_at: null
                contentType: application/json
        '400':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    title: MCRM_CMN_0011
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0011
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]の値([value])が不正です。'
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0015
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0015
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - パラメーターの値は許容された形式にしてください。[password]
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0017
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0017
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - 実行ユーザーが存在しません。
                        description: エラーメッセージ
                    contentType: application/json
                  - type: object
                    title: MCRM_CMN_0020
                    properties:
                      errorCode:
                        type: string
                        enum:
                          - MCRM_CMN_0020
                        description: エラーコード
                      reason:
                        type: string
                        enum:
                          - '[param]([value])は [condition] の長さである必要があります。'
                        description: エラーメッセージ
                    contentType: application/json
        '401':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0003
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0003
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - 認証に失敗しました。
                    description: エラーメッセージ
                contentType: application/json
        '403':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0023
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0023
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - ユーザーに実行権限がありません。
                    description: エラーメッセージ
                contentType: application/json
        '500':
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: '*'
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                title: MCRM_CMN_0010
                properties:
                  errorCode:
                    type: string
                    enum:
                      - MCRM_CMN_0010
                    description: エラーコード
                  reason:
                    type: string
                    enum:
                      - サーバー側で問題が発生しました。
                    description: エラーメッセージ
                contentType: application/json
      security:
        - distributor_token: []
      x-codeSamples:
        - lang: shell
          source: |-
            curl -v -X PATCH 'https://${end_point}/distributors/me'
            -H 'Authorization: Bearer {distributor_token}'
            -H 'Content-Type: application/json'
            -d '{
              "password": "Distributor_123"
            }'
      summary: 配信者自身の情報更新
      description: 配信者自身の情報を更新します。
components:
  securitySchemes:
    contractor_token:
      type: http
      scheme: bearer
      description: |
        [契約者用Token取得](#tag/cont_token)
    distributor_token:
      type: http
      scheme: bearer
      description: |
        [配信者用Token取得](#tag/dist_token)
x-tagGroups:
  - name: 全体共通API
    tags:
      - common_master_functions
  - name: Contractors用API
    tags:
      - cont_token
      - contractors
      - cont_contracts
      - cont_usages
      - cont_distributors
      - cont_function_settings
      - cont_analytics
  - name: Distributors用API
    tags:
      - dist_token
      - dist_usages
      - distributors_me
