---
title: "カテゴリーの作成"
---

> Documentation Index
> Fetch the complete documentation index at: https://apidocs.cs-cart.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# カテゴリーの作成

<span class="api-method api-method-post">`POST`</span> `/categories`

新しいカテゴリーを作成するには、`/api/categories`に対してPOSTを送信します。

## リクエスト：ヘッダー

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Basic <認証情報>`     |

> **認証情報について**
>
> 認証情報は、ユーザーのEメールアドレスとAPIキーをコロンで連結したものをBase64エンコードしたものです。

## リクエスト：ボディ

| Name                      | Type   | 必須 | 説明          | デフォルト値  |
| ------------------------- | ------ | -- | ----------- | ------- |
| category                  | string | 必須 | カテゴリー名      |         |
| status                    | string |    | ステータス       | D       |
| age\_limit                | int32  |    | 年齢制限        |         |
| age\_verification         | string |    | 年齢確認        | N       |
| age\_warning\_message     | string |    | 年齢警告メッセージ   |         |
| default\_layout           | string |    | デフォルトレイアウト  |         |
| description               | string |    | 説明          |         |
| id\_path                  | string |    | IDパス        |         |
| lang\_code                | string |    | 言語コード       |         |
| localization              | string |    | ローカライゼーション  |         |
| main\_pair                | string |    | メイン画像       |         |
| meta\_description         | string |    | メタ説明        |         |
| meta\_keywords            | string |    | メタキーワード     |         |
| page\_title               | string |    | ページタイトル     |         |
| parent\_age\_limit        | string |    | 親カテゴリーの年齢制限 |         |
| parent\_age\_verification | string |    | 親カテゴリーの年齢確認 | N       |
| parent\_id                | int32  |    | 親カテゴリーID    |         |
| position                  | int32  |    | 表示順番        |         |
| product\_columns          | int32  |    | 商品カラム数      | 1       |
| product\_count            | int32  |    | 商品数         | 0       |
| product\_details\_layout  | string |    | 商品詳細レイアウト   | default |
| selected\_layouts         | string |    | 選択されたレイアウト  |         |
| seo\_name                 | string |    | SEO名        |         |
| usergroup\_ids            | string |    | ユーザーグループID  |         |

## レスポンス

```json
{
    "category_id": 242
}
```

Source: https://apidocs.cs-cart.jp/categories/api-category-create/index.mdx
