> ## Documentation Index
> Fetch the complete documentation index at: https://docs.utage-system.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 商品作成

> 商品を作成します。商品一覧の末尾に追加されます。作成した商品で販売するには、商品詳細（`POST /products/{product_id}/details`）を追加します。

API経由の商品作成には作成上限（月間・累計）があり、超過すると `429`（`monthly_limit_exceeded` / `total_limit_exceeded`）を返します。契約内容による商品の件数上限（アーカイブ済みを含む）に達している場合は `400`（`bad_request`）を返します。


`POST`

```
https://api.utage-system.com/v1/products
```


## OpenAPI

````yaml POST /products
openapi: 3.0.3
info:
  title: UTAGE API
  description: >
    UTAGEのパブリックAPIです。ファネル、メール・LINE配信、会員サイト、イベント・予約、決済、メディアなどのリソースをプログラムから操作できます。


    ## 認証

    すべてのリクエストにAPIキーによるBearer認証が必要です（要素タイプ・LINEメッセージタイプ・配信条件タイプの参照エンドポイントを除く）。


    ```

    Authorization: Bearer {api_key}

    ```


    APIキーはUTAGE管理画面から発行できます。APIキーが未指定・無効・無効化済みの場合、またはアカウントが利用停止中の場合は `401
    Unauthorized`（`error.code` は `unauthorized`）が返されます。


    ## レート制限

    リクエスト数には以下の制限があります。表の値は既定値で、契約内容により異なる場合があります。


    | 分間上限 | 日間上限 |

    |----------|----------|

    | 60リクエスト/分（APIキー単位・暦の1分ごと） | 10,000リクエスト/日（アカウント単位・暦日ごと） |


    レスポンスヘッダーで分間上限の窓が終わる時刻を確認できます（分間の残数と日間の残数はヘッダーに含まれません）。


    | ヘッダー | 説明 |

    |----------|------|

    | X-RateLimit-Limit | 接続元IP単位でAPI全体に掛かる制限の上限値（APIキー単位の分間上限ではありません） |

    | X-RateLimit-Remaining | 接続元IP単位の制限の残りリクエスト数（分間上限の残数ではありません） |

    | X-RateLimit-Reset | APIキー単位の分間上限で、現在の1分間の窓が終わる（次の分が始まる）UNIXタイムスタンプ |


    上限を超えた場合は `429 Too Many Requests`（`error.code` は
    `rate_limit_exceeded`）が返されます。日間上限の超過時は `X-RateLimit-Reset`
    が翌日0:00になります（`X-RateLimit-Limit` / `X-RateLimit-Remaining`
    は超過時も接続元IP単位の値です）。認証不要のエンドポイントと読者作成（`POST
    /accounts/{account_id}/scenarios/{scenario_id}/readers`、`POST
    /accounts/{account_id}/line/friends/{friend_id}/readers`）はレート制限の対象外で、`X-RateLimit-Reset`
    ヘッダーは付きません。


    データを作成するAPIには、これとは別にAPI経由の作成件数の上限があります。超過時は `429` で `total_limit_exceeded` /
    `hourly_limit_exceeded` / `monthly_limit_exceeded`
    が返され、`details.resource_type` に対象のリソース種別が含まれます。


    ## エラーレスポンス

    エラー時は以下の形式で返されます。


    ```json

    {
      "error": {
        "code": "error_code",
        "message": "エラーメッセージ"
      }
    }

    ```


    エラーの種類によっては `error.details`
    に補足情報（バリデーションの項目別エラー、`retry_after`、`resource_type` など）が含まれます。
  version: '1.0'
  contact:
    name: UTAGE サポート
servers:
  - url: https://api.utage-system.com/v1
    description: UTAGE API
security:
  - BearerAuth: []
tags:
  - name: ファネル
    description: ファネルの作成・更新・一覧取得
  - name: ステップ
    description: ファネル内のステップの作成・更新・並び替え・一覧取得
  - name: ページ
    description: ステップ内のページの作成・更新・取得・削除・一覧取得
  - name: 配信アカウント
    description: 配信アカウントの作成・一覧取得
  - name: シナリオ
    description: シナリオの作成・一覧取得
  - name: メディア
    description: 動画・音声・通常メディアの一覧取得・アップロード・名称変更
  - name: 要素タイプ
    description: ファネルページ・レッスン・HTMLメールの要素タイプ定義、LINEメッセージタイプ・配信条件タイプの取得（認証不要）
  - name: ファネル統計
    description: ファネルの集計データ・登録者・登録経路の取得
  - name: 配信メッセージ
    description: 配信メッセージの作成・更新・テスト送信・配信統計、置き換え文字の取得
  - name: 読者
    description: 読者の作成・更新・取得、ラベル・配信履歴・開封/クリック履歴の取得
  - name: LINE
    description: LINE友だち・カスタム送信者・1対1チャット・テンプレート・テンプレートグループ・リッチメニュー・自動応答の操作
  - name: ラベル・共通読者・登録経路
    description: ラベル・共通読者・アクション・登録経路の操作
  - name: 登録経路
    description: ファネルの登録経路・登録経路グループの作成・取得・更新・削除
  - name: ファネルアクション
    description: ファネルアクション（管理画面「アクション設定」）の作成・取得・更新・削除とアクショングループの一覧取得
  - name: 登録フォーム・読者項目
    description: 読者項目と登録フォーム項目の作成・更新・取得・削除・並び替え
  - name: 連携
    description: Googleスプレッドシート連携アカウント・広告連携設定の一覧取得
  - name: 会員サイト
    description: 会員サイトの一覧取得・作成・取得・更新・削除・並び替え
  - name: コース
    description: 会員サイト配下のコースの一覧取得・作成・取得・更新・削除・並び替え
  - name: コースグループ
    description: コースグループの一覧取得・作成・取得・更新・削除
  - name: バンドル
    description: バンドル（受講生に開放するコース・コミュニティグループのセット）の一覧取得・作成・取得・更新・削除・並び替え
  - name: レッスン
    description: 会員サイトのレッスン・レッスングループの操作と、レッスンごと受講状況・受講完了者の取得
  - name: 受講生
    description: 会員サイトの受講生の作成・更新・取得・削除、受講状況・操作履歴の取得、コース・バンドルの登録受講生一覧
  - name: 登録コース・コミュニティ
    description: 受講生のバンドル・単一コース・コミュニティグループへの登録の追加・更新・解除・一覧取得
  - name: コミュニティグループ
    description: 会員サイトのコミュニティグループの一覧取得
  - name: イベント
    description: イベント（セミナー・説明会、個別相談・個別予約）の一覧取得・作成・取得・更新・削除
  - name: 日程
    description: イベントの日程の一覧取得・作成・取得・更新・削除
  - name: 日程設定
    description: 個別相談・個別予約タイプのイベントの日程設定（開催する曜日・時間帯・特定日の開催設定・担当者・日程の表示期間）の取得・更新
  - name: 申込フォーム・申込者項目
    description: イベントの申込フォームの基本項目・申込者項目の取得・更新
  - name: 申込者
    description: イベントの申込者の一覧取得・詳細取得・更新
  - name: イベントグループ
    description: イベントグループ（イベント一覧の「グループ管理」）の作成・更新・一覧取得・削除
  - name: 担当者
    description: 担当者（個別相談・個別予約の「担当者設定」）の作成・更新・一覧取得・削除と連携用リンクの発行・削除
  - name: 商品
    description: 商品の一覧取得・作成・取得・更新・削除・並び替え
  - name: 商品グループ
    description: 商品グループの一覧取得・作成・取得・更新・削除
  - name: 商品詳細
    description: 商品配下の商品詳細（価格・支払方法・決済代行会社・支払回数・購入後の動作・通知設定）の作成・更新・並び替え・取得・削除
  - name: 売上
    description: 売上の一覧・詳細取得、領収書・請求書設定の更新、銀行振込の入金反映、削除、月別・日別売上集計
paths:
  /products:
    post:
      tags:
        - 商品
      summary: 商品作成
      description: >
        商品を作成します。商品一覧の末尾に追加されます。作成した商品で販売するには、商品詳細（`POST
        /products/{product_id}/details`）を追加します。


        API経由の商品作成には作成上限（月間・累計）があり、超過すると `429`（`monthly_limit_exceeded` /
        `total_limit_exceeded`）を返します。契約内容による商品の件数上限（アーカイブ済みを含む）に達している場合は
        `400`（`bad_request`）を返します。
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: 商品名
                memo:
                  type: string
                  nullable: true
                  maxLength: 65535
                  description: メモ（管理画面の商品基本設定でのみ表示される内部メモ。最大65,535バイト）
                product_group_id:
                  type: string
                  nullable: true
                  description: 所属する商品グループのID（`GET /product-groups` で取得）。`null`・省略は未分類
                business_id:
                  type: string
                  nullable: true
                  description: >-
                    領収書の発行事業者とする事業者設定のID。`null`・省略はデフォルト。事業者設定の一覧取得APIは無いため、既存の商品の
                    `business_id` を再利用してください
                deny_multiple_purchases:
                  type: boolean
                  default: false
                  description: 重複購入を禁止するか（`true`=禁止する / `false`=許可する）。`null` は不可
                has_sales_limit:
                  type: boolean
                  default: false
                  description: 販売上限を指定するか（`true`=指定する / `false`=指定しない）。`null` は不可
                max_sales_quantity:
                  type: integer
                  minimum: 0
                  maximum: 2147483647
                  description: 販売上限数。`has_sales_limit` が `true` の場合は必須。`null` は不可
      responses:
        '201':
          description: 作成された商品
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentProduct'
        '400':
          description: 契約内容による件数上限（アーカイブ済みを含む商品の件数）に達している（`bad_request`）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: bad_request
                  message: これ以上商品を追加することができません
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: >
            バリデーションエラー（`validation_error`）。`details`
            にフィールド別のメッセージを含みます。存在しない（または他のユーザーの）`product_group_id` /
            `business_id` を指定した場合、`has_sales_limit` が `true` で
            `max_sales_quantity` を指定していない場合もこのエラーです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation_error:
                  summary: 必須項目の未指定
                  value:
                    error:
                      code: validation_error
                      message: 入力内容に誤りがあります
                      details:
                        name:
                          - 商品名は必ず指定してください。
                reference_not_found:
                  summary: 存在しない商品グループ
                  value:
                    error:
                      code: validation_error
                      message: 入力内容に誤りがあります
                      details:
                        product_group_id:
                          - 指定された商品グループが存在しません
        '429':
          $ref: '#/components/responses/ResourceLimitExceeded'
components:
  schemas:
    PaymentProduct:
      type: object
      properties:
        id:
          type: string
          description: 商品ID
        name:
          type: string
          nullable: true
          description: 商品名
        memo:
          type: string
          nullable: true
          description: メモ（管理画面の商品基本設定でのみ表示される内部メモ）
        product_group_id:
          type: string
          nullable: true
          description: 所属する商品グループのID。未分類の場合は null
        business_id:
          type: string
          nullable: true
          description: 領収書の発行事業者（事業者設定）のID。デフォルトの場合、または参照先の事業者設定が削除済みの場合は null
        deny_multiple_purchases:
          type: boolean
          description: 重複購入を禁止するか（true=禁止する / false=許可する）
        has_sales_limit:
          type: boolean
          description: 販売上限を指定するか（true=指定する / false=指定しない）
        max_sales_quantity:
          type: integer
          description: 販売上限数。未設定の場合は 0
        is_archived:
          type: boolean
          description: アーカイブ済みか
        order:
          type: integer
          description: 表示順。商品並び替え（PATCH /products/reorder）後はグループ内の並び順（0始まり）
        created_at:
          type: string
          nullable: true
          description: 作成日時（Y-m-d H:i:s）
        updated_at:
          type: string
          nullable: true
          description: 更新日時（Y-m-d H:i:s）
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード
            message:
              type: string
              description: エラーメッセージ
            details:
              type: object
              nullable: true
              description: >-
                エラーの補足情報（`retry_after` /
                `resource_type`、項目別のエラーメッセージ等）。エラー種別により含まれる場合があります。`422`
                の項目別エラーの値は通常はメッセージの配列ですが、会員サイト更新・コース更新の変更時だけ行う検証では文字列です。
  responses:
    Unauthorized:
      description: 認証エラー。APIキーが未指定・無効・無効化済み、またはアカウントが利用停止中。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: APIキーが無効です
    ResourceLimitExceeded:
      description: >-
        作成上限超過。`error.code` は `total_limit_exceeded`（累計）/
        `monthly_limit_exceeded`（月間）のいずれかで、`hourly_limit_exceeded`（1時間）は読者作成（`reader`）と受講生作成（`members_user`）だけで返ります。`details.resource_type`
        に対象リソース、月間上限のときは `details.retry_after` に上限判定が再計算される日時（Y-m-d
        H:i:s）を含みます。同じ `429`
        で、分間・日間のレート制限超過（`rate_limit_exceeded`。`X-RateLimit-Reset`
        の時刻以降に再試行）も返ります。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: monthly_limit_exceeded
              message: 月間の作成上限に達しました
              details:
                resource_type: message
                retry_after: '2026-11-01 00:05:00'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: APIキーをBearerトークンとして指定

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.