# GET /api/items

商品一覧取得

呼び出し元のショップの商品を一覧で取得します。

公開・非公開の両方を対象に、商品詳細（`GET /api/items/{id}`）と同じ形式で返します。
取得による商品情報の変更や通知の送信はありません。

総件数は返しません。
取得件数が `limit` 未満の場合は、次のページはありません。

## 要求スコープ

- `items.read`

## パラメータ

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `visible` | query | `"true" \| "false"` | 任意 | 公開状態での絞り込み。true=公開中の商品のみ、false=非公開の商品のみ。未指定時は公開・非公開の両方を返します。 |
| `category_id` | query | `integer` | 任意 | 絞り込み対象のカテゴリ ID。指定したカテゴリ自身、またはその配下のカテゴリに属する商品だけを返します。未指定時は絞り込みません。指定したカテゴリを参照できない場合も、参照できるカテゴリに該当商品がない場合と同様に、ステータスコード 200 で空配列を返します。レスポンスから両者を区別できません。 |
| `order` | query | `"list_order" \| "created" \| "modified"` | 任意 | 並び替えの基準。list_order=ショップ内の表示順、created=作成日時、modified=最終更新日時。未指定時は表示順で並びます。 |
| `sort` | query | `"asc" \| "desc"` | 任意 | 並び順。asc=昇順、desc=降順。未指定時は昇順です。`order` で指定した基準に対して適用されます。 |
| `limit` | query | `integer` | 任意 | 1 回のリクエストで取得する件数。1〜100 を指定できます。既定は 20 です。 |
| `offset` | query | `integer \| null` | 任意 | 取得を開始する位置。先頭から読み飛ばす件数を 0〜1,000,000 で指定します。既定は 0 です。 |

## レスポンスボディ（200）

`application/json`

配列。各要素: `ItemDetailWithLinks`

`type` の値により分岐します。

- ItemDetailNormalWithLinks の場合
  - `type` "normal"（必須）: 商品種別。normal=デジタルコンテンツ・テイクアウト・定期便・抽選販売のいずれにも該当しない通常商品。
  - `id` integer（必須 / ≥ 0）: 商品 ID
  - `name` string（必須）: 商品名
  - `detail` string（必須）: 商品説明文。利用者入力をそのまま返すため利用側で必ずエスケープしてください。未設定時は空文字列です。
  - `identifier` string | null（必須）: 商品コード。ショップ運営者が任意で設定する識別子です。未設定時は null です。
  - `price` integer | null（必須）: 販売価格（税込、円）。未設定時は null です。
  - `proper_price` integer | null（必須）: セール元値（税込、円）。セール未設定時は null です。
  - `stock` integer（必須）: 在庫数。種類がある場合は各種類の在庫数の合計、無い場合は商品本体の在庫数です。
  - `visible` boolean（必須）: 公開状態。false の間はショップ画面に表示されず購入もできません。
  - `sales_status` ItemSalesStatus（必須）: 販売状態。item_waiting_for_sale=販売開始前、item_now_on_sale=販売中、item_end_of_sale=販売終了後。
  - `item_tax_type` ItemTaxType（必須）: 税区分。standard=標準税率、reduced=軽減税率。
  - `created_at` string (date-time)（必須）: 商品の作成日時（ISO 8601・UTC）
  - `modified_at` string (date-time)（必須）: 商品の最終更新日時（ISO 8601・UTC）
  - `images` ItemImage[]（必須）: 商品画像（最大 20 件）。表示順に並びます。
    - `id` integer（必須 / ≥ 0）: 画像 ID
    - `url` string (uri)（必須）: 画像の公開 URL。アップロードされたままのサイズで返します。
    - `scaled_url` string (uri)（必須）: 縦横比を保ったまま幅を変えた画像の URL。幅 640px を指定した例です。URL に含まれる幅の値を変えると、任意の幅で取得できます。
    - `square_url` string (uri)（必須）: 中央を切り抜いて正方形にした画像の URL。一辺 900px を指定した例です。URL に含まれる寸法の値を変えると、任意の大きさで取得できます。
  - `variations` ItemVariation[]（必須）: 種類一覧（最大 1000 件）。表示順に並びます。種類を持たない商品では空配列です。
    - `id` integer（必須 / ≥ 0）: 種類 ID
    - `name` string（任意）: 種類名（例: カラー・サイズの表示名）。種類名を持たない（種類コードのみを保持する）種類では省略されます。
    - `stock` integer（必須）: 当該種類の在庫数
    - `identifier` string | null（必須）: 種類コード（種類ごとの商品コード）。未設定時は null です。
    - `barcode` string | null（必須）: 種類ごとの JAN / GTIN。未設定時は null です。
  - `categories` ItemCategorySummary[]（必須）: 所属カテゴリ一覧。未所属時は空配列です。
    - `id` integer（必須 / ≥ 0）: カテゴリ ID
    - `name` string（必須）: カテゴリ名
    - `parent` ItemCategorySummary（必須）: 上位カテゴリ。最上位カテゴリでは null です。
      - ↻ ItemCategorySummary を再帰参照
  - `options` ItemOption[]（必須）: 商品オプション一覧（最大 6 件）。表示順に並びます。未設定時は空配列です。
    - `option_type` で分岐
      - ItemOptionSelect の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "select"（必須）
        - `choices` ItemOptionChoice[]（必須）: 選択肢一覧。表示順に並びます。
          - `id` integer（必須 / ≥ 0）: 選択肢 ID。購入時にどの選択肢を選んだかを指します。
          - `name` string（必須）: 選択肢名
          - `extra_price` integer（必須）: 選択時に加算される金額（税込、円）
      - ItemOptionForm の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "form"（必須）
        - `option_variation_id` integer | null（必須 / ≥ 0）: 購入時に指定する ID。値が未設定のオプションでは null です。
        - `extra_price` integer（必須）: 入力時に加算される金額（税込、円）。選択肢ごとに変わる select と違い一律です。
        - `max_length` integer | null（必須）: 自由入力の最大文字数。未設定時は null です。
        - `free_text_description` string | null（必須）: 自由入力欄に表示する補足説明。未設定時は null です。
  - `quantity_limit` integer | null（必須）: 1 回の購入における同時購入数の上限。未設定時は null です。
  - `_links` object（必須）: このリソースに関連する操作へのリンク集合。リソースの状態やトークンのスコープによってリンクの有無は変わりません。
    - `update_item` Link（必須）: [商品編集](post-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `delete_item` Link（必須）: [商品削除](delete-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_stock` Link（必須）: [在庫設定](put-api-items-id-stock.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_visibility` Link（必須）: [公開状態の切り替え](put-api-items-id-visibility.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_list_order` Link（必須）: [並び順の変更](put-api-items-id-list-order.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_image` Link（必須）: [画像追加](post-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_images` Link（必須）: [画像の並び替え](put-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `create_file_upload` Link（必須）: [アップロード先発行](post-api-files.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_variation` Link（必須）: [種類追加](post-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_variations` Link（必須）: [種類の並び替え](put-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
- ItemDetailDigitalWithLinks の場合
  - `type` "digital"（必須）: 商品種別。digital=デジタルコンテンツ。
  - `id` integer（必須 / ≥ 0）: 商品 ID
  - `name` string（必須）: 商品名
  - `detail` string（必須）: 商品説明文。利用者入力をそのまま返すため利用側で必ずエスケープしてください。未設定時は空文字列です。
  - `identifier` string | null（必須）: 商品コード。ショップ運営者が任意で設定する識別子です。未設定時は null です。
  - `price` integer | null（必須）: 販売価格（税込、円）。未設定時は null です。
  - `proper_price` integer | null（必須）: セール元値（税込、円）。セール未設定時は null です。
  - `stock` integer（必須）: 在庫数。種類がある場合は各種類の在庫数の合計、無い場合は商品本体の在庫数です。
  - `visible` boolean（必須）: 公開状態。false の間はショップ画面に表示されず購入もできません。
  - `sales_status` ItemSalesStatus（必須）: 販売状態。item_waiting_for_sale=販売開始前、item_now_on_sale=販売中、item_end_of_sale=販売終了後。
  - `item_tax_type` ItemTaxType（必須）: 税区分。standard=標準税率、reduced=軽減税率。
  - `created_at` string (date-time)（必須）: 商品の作成日時（ISO 8601・UTC）
  - `modified_at` string (date-time)（必須）: 商品の最終更新日時（ISO 8601・UTC）
  - `images` ItemImage[]（必須）: 商品画像（最大 20 件）。表示順に並びます。
    - `id` integer（必須 / ≥ 0）: 画像 ID
    - `url` string (uri)（必須）: 画像の公開 URL。アップロードされたままのサイズで返します。
    - `scaled_url` string (uri)（必須）: 縦横比を保ったまま幅を変えた画像の URL。幅 640px を指定した例です。URL に含まれる幅の値を変えると、任意の幅で取得できます。
    - `square_url` string (uri)（必須）: 中央を切り抜いて正方形にした画像の URL。一辺 900px を指定した例です。URL に含まれる寸法の値を変えると、任意の大きさで取得できます。
  - `variations` ItemVariation[]（必須）: 種類一覧（最大 1000 件）。表示順に並びます。種類を持たない商品では空配列です。
    - `id` integer（必須 / ≥ 0）: 種類 ID
    - `name` string（任意）: 種類名（例: カラー・サイズの表示名）。種類名を持たない（種類コードのみを保持する）種類では省略されます。
    - `stock` integer（必須）: 当該種類の在庫数
    - `identifier` string | null（必須）: 種類コード（種類ごとの商品コード）。未設定時は null です。
    - `barcode` string | null（必須）: 種類ごとの JAN / GTIN。未設定時は null です。
  - `categories` ItemCategorySummary[]（必須）: 所属カテゴリ一覧。未所属時は空配列です。
    - `id` integer（必須 / ≥ 0）: カテゴリ ID
    - `name` string（必須）: カテゴリ名
    - `parent` ItemCategorySummary（必須）: 上位カテゴリ。最上位カテゴリでは null です。
      - ↻ ItemCategorySummary を再帰参照
  - `options` ItemOption[]（必須）: 商品オプション一覧（最大 6 件）。表示順に並びます。未設定時は空配列です。
    - `option_type` で分岐
      - ItemOptionSelect の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "select"（必須）
        - `choices` ItemOptionChoice[]（必須）: 選択肢一覧。表示順に並びます。
          - `id` integer（必須 / ≥ 0）: 選択肢 ID。購入時にどの選択肢を選んだかを指します。
          - `name` string（必須）: 選択肢名
          - `extra_price` integer（必須）: 選択時に加算される金額（税込、円）
      - ItemOptionForm の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "form"（必須）
        - `option_variation_id` integer | null（必須 / ≥ 0）: 購入時に指定する ID。値が未設定のオプションでは null です。
        - `extra_price` integer（必須）: 入力時に加算される金額（税込、円）。選択肢ごとに変わる select と違い一律です。
        - `max_length` integer | null（必須）: 自由入力の最大文字数。未設定時は null です。
        - `free_text_description` string | null（必須）: 自由入力欄に表示する補足説明。未設定時は null です。
  - `quantity_limit` integer | null（必須）: 1 回の購入における同時購入数の上限。未設定時は null です。
  - `digital` ItemDigital（必須）: ダウンロード用ファイルの名前・サイズ・拡張子。type=digital のとき必ず存在します。
    - `file_name` string（必須）: ダウンロード用ファイルの表示名
    - `file_size` integer（必須）: ファイルサイズ（バイト）
    - `file_ext` string（必須）: ファイル拡張子（小文字）
  - `_links` object（必須）: このリソースに関連する操作へのリンク集合。リソースの状態やトークンのスコープによってリンクの有無は変わりません。
    - `update_item` Link（必須）: [商品編集](post-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `delete_item` Link（必須）: [商品削除](delete-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_stock` Link（必須）: [在庫設定](put-api-items-id-stock.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_visibility` Link（必須）: [公開状態の切り替え](put-api-items-id-visibility.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_list_order` Link（必須）: [並び順の変更](put-api-items-id-list-order.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_image` Link（必須）: [画像追加](post-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_images` Link（必須）: [画像の並び替え](put-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `create_file_upload` Link（必須）: [アップロード先発行](post-api-files.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_variation` Link（必須）: [種類追加](post-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_variations` Link（必須）: [種類の並び替え](put-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
- ItemDetailTakeoutWithLinks の場合
  - `type` "takeout"（必須）: 商品種別。takeout=テイクアウト。
  - `id` integer（必須 / ≥ 0）: 商品 ID
  - `name` string（必須）: 商品名
  - `detail` string（必須）: 商品説明文。利用者入力をそのまま返すため利用側で必ずエスケープしてください。未設定時は空文字列です。
  - `identifier` string | null（必須）: 商品コード。ショップ運営者が任意で設定する識別子です。未設定時は null です。
  - `price` integer | null（必須）: 販売価格（税込、円）。未設定時は null です。
  - `proper_price` integer | null（必須）: セール元値（税込、円）。セール未設定時は null です。
  - `stock` integer（必須）: 在庫数。種類がある場合は各種類の在庫数の合計、無い場合は商品本体の在庫数です。
  - `visible` boolean（必須）: 公開状態。false の間はショップ画面に表示されず購入もできません。
  - `sales_status` ItemSalesStatus（必須）: 販売状態。item_waiting_for_sale=販売開始前、item_now_on_sale=販売中、item_end_of_sale=販売終了後。
  - `item_tax_type` ItemTaxType（必須）: 税区分。standard=標準税率、reduced=軽減税率。
  - `created_at` string (date-time)（必須）: 商品の作成日時（ISO 8601・UTC）
  - `modified_at` string (date-time)（必須）: 商品の最終更新日時（ISO 8601・UTC）
  - `images` ItemImage[]（必須）: 商品画像（最大 20 件）。表示順に並びます。
    - `id` integer（必須 / ≥ 0）: 画像 ID
    - `url` string (uri)（必須）: 画像の公開 URL。アップロードされたままのサイズで返します。
    - `scaled_url` string (uri)（必須）: 縦横比を保ったまま幅を変えた画像の URL。幅 640px を指定した例です。URL に含まれる幅の値を変えると、任意の幅で取得できます。
    - `square_url` string (uri)（必須）: 中央を切り抜いて正方形にした画像の URL。一辺 900px を指定した例です。URL に含まれる寸法の値を変えると、任意の大きさで取得できます。
  - `variations` ItemVariation[]（必須）: 種類一覧（最大 1000 件）。表示順に並びます。種類を持たない商品では空配列です。
    - `id` integer（必須 / ≥ 0）: 種類 ID
    - `name` string（任意）: 種類名（例: カラー・サイズの表示名）。種類名を持たない（種類コードのみを保持する）種類では省略されます。
    - `stock` integer（必須）: 当該種類の在庫数
    - `identifier` string | null（必須）: 種類コード（種類ごとの商品コード）。未設定時は null です。
    - `barcode` string | null（必須）: 種類ごとの JAN / GTIN。未設定時は null です。
  - `categories` ItemCategorySummary[]（必須）: 所属カテゴリ一覧。未所属時は空配列です。
    - `id` integer（必須 / ≥ 0）: カテゴリ ID
    - `name` string（必須）: カテゴリ名
    - `parent` ItemCategorySummary（必須）: 上位カテゴリ。最上位カテゴリでは null です。
      - ↻ ItemCategorySummary を再帰参照
  - `options` ItemOption[]（必須）: 商品オプション一覧（最大 6 件）。表示順に並びます。未設定時は空配列です。
    - `option_type` で分岐
      - ItemOptionSelect の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "select"（必須）
        - `choices` ItemOptionChoice[]（必須）: 選択肢一覧。表示順に並びます。
          - `id` integer（必須 / ≥ 0）: 選択肢 ID。購入時にどの選択肢を選んだかを指します。
          - `name` string（必須）: 選択肢名
          - `extra_price` integer（必須）: 選択時に加算される金額（税込、円）
      - ItemOptionForm の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "form"（必須）
        - `option_variation_id` integer | null（必須 / ≥ 0）: 購入時に指定する ID。値が未設定のオプションでは null です。
        - `extra_price` integer（必須）: 入力時に加算される金額（税込、円）。選択肢ごとに変わる select と違い一律です。
        - `max_length` integer | null（必須）: 自由入力の最大文字数。未設定時は null です。
        - `free_text_description` string | null（必須）: 自由入力欄に表示する補足説明。未設定時は null です。
  - `quantity_limit` integer | null（必須）: 1 回の購入における同時購入数の上限。未設定時は null です。
  - `_links` object（必須）: このリソースに関連する操作へのリンク集合。リソースの状態やトークンのスコープによってリンクの有無は変わりません。
    - `update_item` Link（必須）: [商品編集](post-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `delete_item` Link（必須）: [商品削除](delete-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_stock` Link（必須）: [在庫設定](put-api-items-id-stock.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_visibility` Link（必須）: [公開状態の切り替え](put-api-items-id-visibility.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_list_order` Link（必須）: [並び順の変更](put-api-items-id-list-order.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_image` Link（必須）: [画像追加](post-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_images` Link（必須）: [画像の並び替え](put-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `create_file_upload` Link（必須）: [アップロード先発行](post-api-files.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_variation` Link（必須）: [種類追加](post-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_variations` Link（必須）: [種類の並び替え](put-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
- ItemDetailSubscriptionWithLinks の場合
  - `type` "subscription"（必須）: 商品種別。subscription=定期便。
  - `id` integer（必須 / ≥ 0）: 商品 ID
  - `name` string（必須）: 商品名
  - `detail` string（必須）: 商品説明文。利用者入力をそのまま返すため利用側で必ずエスケープしてください。未設定時は空文字列です。
  - `identifier` string | null（必須）: 商品コード。ショップ運営者が任意で設定する識別子です。未設定時は null です。
  - `price` integer | null（必須）: 販売価格（税込、円）。未設定時は null です。
  - `proper_price` integer | null（必須）: セール元値（税込、円）。セール未設定時は null です。
  - `stock` integer（必須）: 在庫数。種類がある場合は各種類の在庫数の合計、無い場合は商品本体の在庫数です。
  - `visible` boolean（必須）: 公開状態。false の間はショップ画面に表示されず購入もできません。
  - `sales_status` ItemSalesStatus（必須）: 販売状態。item_waiting_for_sale=販売開始前、item_now_on_sale=販売中、item_end_of_sale=販売終了後。
  - `item_tax_type` ItemTaxType（必須）: 税区分。standard=標準税率、reduced=軽減税率。
  - `created_at` string (date-time)（必須）: 商品の作成日時（ISO 8601・UTC）
  - `modified_at` string (date-time)（必須）: 商品の最終更新日時（ISO 8601・UTC）
  - `images` ItemImage[]（必須）: 商品画像（最大 20 件）。表示順に並びます。
    - `id` integer（必須 / ≥ 0）: 画像 ID
    - `url` string (uri)（必須）: 画像の公開 URL。アップロードされたままのサイズで返します。
    - `scaled_url` string (uri)（必須）: 縦横比を保ったまま幅を変えた画像の URL。幅 640px を指定した例です。URL に含まれる幅の値を変えると、任意の幅で取得できます。
    - `square_url` string (uri)（必須）: 中央を切り抜いて正方形にした画像の URL。一辺 900px を指定した例です。URL に含まれる寸法の値を変えると、任意の大きさで取得できます。
  - `variations` ItemVariation[]（必須）: 種類一覧（最大 1000 件）。表示順に並びます。種類を持たない商品では空配列です。
    - `id` integer（必須 / ≥ 0）: 種類 ID
    - `name` string（任意）: 種類名（例: カラー・サイズの表示名）。種類名を持たない（種類コードのみを保持する）種類では省略されます。
    - `stock` integer（必須）: 当該種類の在庫数
    - `identifier` string | null（必須）: 種類コード（種類ごとの商品コード）。未設定時は null です。
    - `barcode` string | null（必須）: 種類ごとの JAN / GTIN。未設定時は null です。
  - `categories` ItemCategorySummary[]（必須）: 所属カテゴリ一覧。未所属時は空配列です。
    - `id` integer（必須 / ≥ 0）: カテゴリ ID
    - `name` string（必須）: カテゴリ名
    - `parent` ItemCategorySummary（必須）: 上位カテゴリ。最上位カテゴリでは null です。
      - ↻ ItemCategorySummary を再帰参照
  - `options` ItemOption[]（必須）: 商品オプション一覧（最大 6 件）。表示順に並びます。未設定時は空配列です。
    - `option_type` で分岐
      - ItemOptionSelect の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "select"（必須）
        - `choices` ItemOptionChoice[]（必須）: 選択肢一覧。表示順に並びます。
          - `id` integer（必須 / ≥ 0）: 選択肢 ID。購入時にどの選択肢を選んだかを指します。
          - `name` string（必須）: 選択肢名
          - `extra_price` integer（必須）: 選択時に加算される金額（税込、円）
      - ItemOptionForm の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "form"（必須）
        - `option_variation_id` integer | null（必須 / ≥ 0）: 購入時に指定する ID。値が未設定のオプションでは null です。
        - `extra_price` integer（必須）: 入力時に加算される金額（税込、円）。選択肢ごとに変わる select と違い一律です。
        - `max_length` integer | null（必須）: 自由入力の最大文字数。未設定時は null です。
        - `free_text_description` string | null（必須）: 自由入力欄に表示する補足説明。未設定時は null です。
  - `quantity_limit` integer | null（必須）: 1 回の購入における同時購入数の上限。未設定時は null です。
  - `subscription` ItemSubscription（必須）: 定期便の価格・リピート回数・課金周期。type=subscription のとき必ず存在します。
    - `repeat_price` integer（必須）: リピート時の価格（税込、円）。セール適用後の値です。
    - `repeat_proper_price` integer | null（必須）: リピート時のセール元値（税込、円）。セール未設定時は null です。
    - `initial_price` integer | null（必須）: 初回価格（税込、円）。未設定時は null です。
    - `repeat_times` ItemSubscriptionRepeatTimes（必須）: リピート回数。repeat_3_times / repeat_6_times / repeat_12_times は指定回数で終了し、unlimited は停止されるまで継続します。
    - `cycle_plan` ItemSubscriptionCyclePlan（必須）: 課金周期。weekly=毎週、every_2_weeks=隔週、monthly=毎月、every_45_days=45日ごと、every_2_months=隔月、every_3_months=3ヶ月ごと。
  - `_links` object（必須）: このリソースに関連する操作へのリンク集合。リソースの状態やトークンのスコープによってリンクの有無は変わりません。
    - `update_item` Link（必須）: [商品編集](post-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `delete_item` Link（必須）: [商品削除](delete-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_stock` Link（必須）: [在庫設定](put-api-items-id-stock.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_visibility` Link（必須）: [公開状態の切り替え](put-api-items-id-visibility.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_list_order` Link（必須）: [並び順の変更](put-api-items-id-list-order.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_image` Link（必須）: [画像追加](post-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_images` Link（必須）: [画像の並び替え](put-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `create_file_upload` Link（必須）: [アップロード先発行](post-api-files.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_variation` Link（必須）: [種類追加](post-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_variations` Link（必須）: [種類の並び替え](put-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
- ItemDetailLotteryWithLinks の場合
  - `type` "lottery"（必須）: 商品種別。lottery=抽選販売。
  - `id` integer（必須 / ≥ 0）: 商品 ID
  - `name` string（必須）: 商品名
  - `detail` string（必須）: 商品説明文。利用者入力をそのまま返すため利用側で必ずエスケープしてください。未設定時は空文字列です。
  - `identifier` string | null（必須）: 商品コード。ショップ運営者が任意で設定する識別子です。未設定時は null です。
  - `price` integer | null（必須）: 販売価格（税込、円）。未設定時は null です。
  - `proper_price` integer | null（必須）: セール元値（税込、円）。セール未設定時は null です。
  - `stock` integer（必須）: 在庫数。種類がある場合は各種類の在庫数の合計、無い場合は商品本体の在庫数です。
  - `visible` boolean（必須）: 公開状態。false の間はショップ画面に表示されず購入もできません。
  - `sales_status` ItemSalesStatus（必須）: 販売状態。item_waiting_for_sale=販売開始前、item_now_on_sale=販売中、item_end_of_sale=販売終了後。
  - `item_tax_type` ItemTaxType（必須）: 税区分。standard=標準税率、reduced=軽減税率。
  - `created_at` string (date-time)（必須）: 商品の作成日時（ISO 8601・UTC）
  - `modified_at` string (date-time)（必須）: 商品の最終更新日時（ISO 8601・UTC）
  - `images` ItemImage[]（必須）: 商品画像（最大 20 件）。表示順に並びます。
    - `id` integer（必須 / ≥ 0）: 画像 ID
    - `url` string (uri)（必須）: 画像の公開 URL。アップロードされたままのサイズで返します。
    - `scaled_url` string (uri)（必須）: 縦横比を保ったまま幅を変えた画像の URL。幅 640px を指定した例です。URL に含まれる幅の値を変えると、任意の幅で取得できます。
    - `square_url` string (uri)（必須）: 中央を切り抜いて正方形にした画像の URL。一辺 900px を指定した例です。URL に含まれる寸法の値を変えると、任意の大きさで取得できます。
  - `variations` ItemVariation[]（必須）: 種類一覧（最大 1000 件）。表示順に並びます。種類を持たない商品では空配列です。
    - `id` integer（必須 / ≥ 0）: 種類 ID
    - `name` string（任意）: 種類名（例: カラー・サイズの表示名）。種類名を持たない（種類コードのみを保持する）種類では省略されます。
    - `stock` integer（必須）: 当該種類の在庫数
    - `identifier` string | null（必須）: 種類コード（種類ごとの商品コード）。未設定時は null です。
    - `barcode` string | null（必須）: 種類ごとの JAN / GTIN。未設定時は null です。
  - `categories` ItemCategorySummary[]（必須）: 所属カテゴリ一覧。未所属時は空配列です。
    - `id` integer（必須 / ≥ 0）: カテゴリ ID
    - `name` string（必須）: カテゴリ名
    - `parent` ItemCategorySummary（必須）: 上位カテゴリ。最上位カテゴリでは null です。
      - ↻ ItemCategorySummary を再帰参照
  - `options` ItemOption[]（必須）: 商品オプション一覧（最大 6 件）。表示順に並びます。未設定時は空配列です。
    - `option_type` で分岐
      - ItemOptionSelect の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "select"（必須）
        - `choices` ItemOptionChoice[]（必須）: 選択肢一覧。表示順に並びます。
          - `id` integer（必須 / ≥ 0）: 選択肢 ID。購入時にどの選択肢を選んだかを指します。
          - `name` string（必須）: 選択肢名
          - `extra_price` integer（必須）: 選択時に加算される金額（税込、円）
      - ItemOptionForm の場合
        - `id` integer（必須 / ≥ 0）: オプション ID
        - `name` string（必須）: オプション名
        - `required` boolean（必須）: 購入時に入力／選択が必須か
        - `option_type` "form"（必須）
        - `option_variation_id` integer | null（必須 / ≥ 0）: 購入時に指定する ID。値が未設定のオプションでは null です。
        - `extra_price` integer（必須）: 入力時に加算される金額（税込、円）。選択肢ごとに変わる select と違い一律です。
        - `max_length` integer | null（必須）: 自由入力の最大文字数。未設定時は null です。
        - `free_text_description` string | null（必須）: 自由入力欄に表示する補足説明。未設定時は null です。
  - `quantity_limit` integer | null（必須）: 1 回の購入における同時購入数の上限。未設定時は null です。
  - `lottery` ItemLottery（必須）: 抽選販売の応募期間・抽選状態・抽選や当落通知の日時・購入締切。type=lottery のとき必ず存在します。
    - `application_start_at` string (date-time)（必須）: 応募開始日時（ISO 8601・UTC）
    - `application_end_at` string (date-time)（必須）: 応募終了日時（ISO 8601・UTC）
    - `scheduled_drawing_at` string (date-time) | null（必須）: 抽選実施予定日時（ISO 8601・UTC）。抽選日が未確定の場合は null です。
    - `scheduled_announce_at` string (date-time)（必須）: 当落通知予定日時（ISO 8601・UTC）
    - `expiration_at` string (date-time) | null（必須）: 購入締切日時（ISO 8601・UTC）。設定されていない場合は null です。
    - `drawn_at` string (date-time) | null（必須）: 実際に抽選を実施した日時（ISO 8601・UTC）。未実施の場合は null です。
    - `announced_at` string (date-time) | null（必須）: 当落通知を実際に行った日時（ISO 8601・UTC）。未通知の場合は null です。
    - `cancelled_at` string (date-time) | null（必須）: 抽選をキャンセルした日時（ISO 8601・UTC）。キャンセルされていない場合は null です。
    - `lottery_status` ItemLotteryStatus（必須）: 抽選状態。before_lottery=抽選前、during_lottery=抽選中、announced=当落通知済み、cancelled=キャンセル済み、errored=エラー。
  - `_links` object（必須）: このリソースに関連する操作へのリンク集合。リソースの状態やトークンのスコープによってリンクの有無は変わりません。
    - `update_item` Link（必須）: [商品編集](post-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `delete_item` Link（必須）: [商品削除](delete-api-items-id.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_stock` Link（必須）: [在庫設定](put-api-items-id-stock.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_visibility` Link（必須）: [公開状態の切り替え](put-api-items-id-visibility.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `update_item_list_order` Link（必須）: [並び順の変更](put-api-items-id-list-order.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_image` Link（必須）: [画像追加](post-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_images` Link（必須）: [画像の並び替え](put-api-items-id-images.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `create_file_upload` Link（必須）: [アップロード先発行](post-api-files.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `add_item_variation` Link（必須）: [種類追加](post-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL
    - `reorder_item_variations` Link（必須）: [種類の並び替え](put-api-items-id-variations.md)
      - `href` string (uri)（必須）: エンドポイントの絶対 URL
      - `method` "GET" | "POST" | "PUT" | "DELETE"（必須）: エンドポイントを呼び出す際に使う HTTP メソッド
      - `document_href` string (uri)（必須）: ドキュメントサイト上でこのエンドポイントを説明するページの URL

## リクエスト例

```sh
curl -X GET "https://apiv2.thebase.com/api/items" \
  -H "Authorization: Bearer <your-token>"
```

## レスポンス

| Status | Description |
| --- | --- |
| `200` | 取得成功 |

## エラー

エラーは `application/problem+json` の Problem 形式で返します。認証・スコープ・予期しない内部エラーなど、すべてのエンドポイントに共通のエラーと構造・判別方法は [エラーレスポンス](/docs/errors.md) を参照してください。

このエンドポイントが返すその他のエラーは次のとおりです。

| Status | Type | Description |
| --- | --- | --- |
| `400` | `/errors/request/invalid-query` | 1 つ以上のクエリパラメータがエンドポイントのスキーマを満たさない場合に返します。 |

