# アカウント管理API

{% hint style="info" %}
これらのAPIはMSPアカウントのディストリビューターにのみ適用されます。ほとんどのMSPは、コマンダーの「[msp](/keeperpam/jp/commander-cli/command-reference/msp-management-commands.md)」コマンドを使用して企業を管理できます。
{% endhint %}

## APIの機能

APIで実現する主なユースケースは以下の通りです。

* 試用版アカウントを作成
* 有料アカウントへ変換
* MSPをすべて一覧表示
* 現在の使用状況を取得
* 月間の使用量を取得
* 有料アカウントを取り消し
* 期限切れのアカウントを有効化
* MSP製品を一覧表示
* 保留中/競合するアカウントの削除

{% hint style="success" %}
MSP固有のAPIにアクセスするには、サポート担当者までお問い合わせください。APIキーはKeeperレコードでシークレットキーとして共有されます。
{% endhint %}

### API定義

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>" path="/convert-to-paid" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fp3RR75ufemlDFb781gSf%2Fmsp_vendor_api_v9.yaml?alt=media&token=e6c3d034-5d32-42c1-ae2b-071108139211>" path="/current-usage" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fp3RR75ufemlDFb781gSf%2Fmsp_vendor_api_v9.yaml?alt=media&token=e6c3d034-5d32-42c1-ae2b-071108139211>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>" path="/monthly-usage" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>" path="/cancel-paid-account" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>" path="/create-trial-account" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F7CMvZh2m6DFtSgXm5p5Q%2Fmsp_vendor_api_v6.yaml?alt=media&token=e0ccfb98-ac54-4199-b2c7-da8d5cb2fd09>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>" path="/accounts" method="get" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>" path="/activate-expired" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>" path="/msp-products" method="get" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>
{% endopenapi %}

{% openapi src="<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>" path="/remove-account" method="post" %}
<https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzBWOt7OzyR98qYOXbQaZ%2Fmsp_vendor_api_v8.yaml?alt=media&token=7fd7054d-5155-45d5-8f66-8bf9fc0f5dd0>
{% endopenapi %}

### 事前共有シークレットからJSON Web Tokenを作成する

アクセスが要求された後、KeeperからAPIを使用するために必要な情報を含むレコードを共有します。上記のAPIメソッドを使用するにはJWTを作成する必要があります。以下の例では、「iat」と「exp」は5分間隔になっています。以下のコードは、ウェブリクエストで必要なトークンを生成するものです。

```
 System.out.println(LocalDateTime.now().toEpochSecond(ZoneOffset.UTC));
       System.out.println(LocalDateTime.now().plusMinutes(5).toEpochSecond(ZoneOffset.UTC));
```

### JWTスクリプトのサンプル例

以下のスクリプトでJWTが正しく生成されます。`create-trial-account` へのPOSTに必要なデータが含まれています。

```
var jwt = require('jsonwebtoken');
var request = require('request');
var rightnowTimeStampInSeconds = Math.floor(Date.now() / 1000);
jwt.sign({
    "iat": rightnowTimeStampInSeconds ,
    "iss": "PARTNER_KEY",
    "exp": rightnowTimeStampInSeconds + (60*5) //adding 5 mins
  }, "PARTNER_SECRET", { algorithm: 'HS512' }, function(err, token) {
    var options = {
    'method': 'POST',
    'url': '',
    'headers': {
        'vendor': 'PARTNER_NAME',
        'Authorization': 'Bearer '+ token,
        'Content-Type': 'application/json'
    },
    body: '{"name":"string","country":"US","zipCode":"98001","email":"test+werworir@keeperdemo.io","vendorInternalId":"89654we7r64ert65","state":"CA","city":"My city","street":"the street","phone":"19191919191"}'

    };
    request(options, function (error, response) {
        if (error) console.log("Error From the server: "+error);
        console.log("response body: "+response.body);
    });
});
```

### その他のJWT生成方法

[JWT.io](https://jwt.io/)のようなツールを利用すれば、事前に共有されているシークレットからJSON Web Tokenを生成できます。

* 暗号化には、HS512アルゴリズムを使用します。
* ペイロードとして以下のJSONを使用します。このトークンは5分間有効となります。
* トークンをエンコードするための秘密キーとして `secret.key` を使用します。

```
{
  "iat": timestamp in unix ,
  "iss": "consumer.key",
  "exp": timestamp in unix 
}
```

### APIについての追加詳細

#### MSPアカウントステータス <a href="#msp-account-statuses" id="msp-account-statuses"></a>

一部のAPIエンドポイントのレスポンスには、MSPのステータスが含まれます。各ステータスの意味は以下の表のとおりです。

| ステータス                     | 定義                                                                                                                                                                    |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PENDING (保留中)             | `/create-trial-account` エンドポイントを通じてアカウントが作成されると、ユーザーにアカウントをアクティブにしてトライアルを開始するよう招待するメールが送信されます。                                                                        |
| TRIAL (トライアル)             | 新しくアクティブとなったMSPは、自動的に14日間のトライアルを開始します。トライアルが終了した後、`/convert-to-paid` エンドポイントが呼び出されない場合、MSPは非アクティブ化され、ログインできなくなります。データは1年後に削除されます。期限切れのトライアルも、データ保持期間内であれば再アクティブ化できます。 |
| ACTIVE (アクティブ)            | 有効期限内の有料MSPアカウント (アクティブ)                                                                                                                                              |
| REGION\_CONFLICT (地域の競合)  | 米国リージョンで `/create-trial-account` によりアカウント作成後、招待メールのリンクではなく別リージョンのサイトからトライアルを有効化したとき。レスポンスの `accountRegion` に登録済みアカウントのリージョンが含まれる                                      |
| PRODUCT\_CONFLICT (製品の競合) | 米国リージョンで `/create-trial-account` によりアカウント作成後、招待メールのリンクではなくサイト上からエンタープライズ向けまたは個人向けのトライアルを有効化したとき。レスポンスの `productType` にKeeperの製品種別が含まれる                                |
| EXPIRED (期限切れ)            | `/cancel-paid-account` エンドポイントが呼び出されると、指定されたMSPは即座に期限切れとなり、このMSPの請求が停止します。                                                                                            |

#### 製品IDとSKUの対応 <a href="#product-id-to-sku-mapping" id="product-id-to-sku-mapping"></a>

各ラインアイテムには読みやすい名称があり、IDと対応付けられています。使用状況APIのレスポンスに含まれます。

<table><thead><tr><th width="129">productID</th><th>Line Item</th></tr></thead><tbody><tr><td>720</td><td>Keeper MSP</td></tr><tr><td>10001</td><td>Keeper Business</td></tr><tr><td>10002</td><td>Keeper Business Plus</td></tr><tr><td>10010</td><td>Keeper Enterprise</td></tr><tr><td>10011</td><td>Keeper Enterprise Plus</td></tr><tr><td>967</td><td>Keeper Connection Manager Add On</td></tr><tr><td>968</td><td>Keeper Secrets Manager Add On</td></tr><tr><td>910</td><td>KeeperChat Add On</td></tr><tr><td>920</td><td>Keeper ARAM Add On</td></tr><tr><td>930</td><td>Keeper BreachWatch Add On</td></tr><tr><td>940</td><td>Keeper Compliance Reporting Add On</td></tr><tr><td>1011</td><td>Keeper 1TB Storage Add On</td></tr><tr><td>1012</td><td>Keeper 10TB Storage Add On</td></tr><tr><td>730</td><td>Dedicated Service &#x26; Support</td></tr><tr><td>973</td><td>Remote Browser Isolation</td></tr><tr><td>978</td><td>Privilege Access Management</td></tr></tbody></table>

#### API定義のYAMLファイル <a href="#api-definition-yaml-file" id="api-definition-yaml-file"></a>

Postmanや[Swagger Editor](https://editor.swagger.io/)などでAPIの挙動を確認する場合は、関連するAPIのYAML定義をダウンロードしてください。

#### 現在の使用状況の出力例

```json
{
    "success": true,
    "usage": {
        "mcItems": [
            {
                "companyId": "NDU5ODU",
                "companyName": "Cowboys",
                "plan": "Keeper Business Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5ODY",
                "companyName": "Eagles",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5ODc",
                "companyName": "Commanders",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5ODg",
                "companyName": "Giants",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5ODk",
                "companyName": "Packers",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 30,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 1000,
                        "productId": 1011,
                        "productName": "1TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDU5OTA",
                "companyName": "Vikings",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTE",
                "companyName": "Bears",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 30,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTI",
                "companyName": "Lions",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTM",
                "companyName": "Buccaneers",
                "plan": "Keeper Business Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTQ",
                "companyName": "Saints",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTU",
                "companyName": "Falcons",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    }
                ]
            },
            {
                "companyId": "NDkzNDk",
                "companyName": "MC Test",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 10000,
                        "productId": 1012,
                        "productName": "10TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDU5OTY",
                "companyName": "Panthers",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTc",
                "companyName": "Rams",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 2,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTg",
                "companyName": "Cardinals",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDU5OTk",
                "companyName": "49ers",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    }
                ]
            },
            {
                "companyId": "NDYwMDA",
                "companyName": "seahawks",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 2,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDYwMDE",
                "companyName": "NFC Business",
                "plan": "Keeper Business Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 10,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    }
                ]
            },
            {
                "companyId": "NDYwMDI",
                "companyName": "NFC Business Plus",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDY5NTk",
                "companyName": "NFC Business - All Upgrades",
                "plan": "Keeper Business Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 10000,
                        "productId": 1012,
                        "productName": "10TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDYwMDM",
                "companyName": "NFC Enterprise",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    }
                ]
            },
            {
                "companyId": "NDY5NjA",
                "companyName": "NFC Business Plus - All Upgrades",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 10000,
                        "productId": 1012,
                        "productName": "10TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDYwMDQ",
                "companyName": "NFC Enterprise Plus",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    }
                ]
            },
            {
                "companyId": "NDY5NjE",
                "companyName": "NFC Enterprise Plus - All Upgrades",
                "plan": "Keeper Enterprise Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10011,
                        "productName": "Keeper Enterprise Plus Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 10000,
                        "productId": 1012,
                        "productName": "10TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDY5NjI",
                "companyName": "NFC Enterprise - All Upgrades",
                "plan": "Keeper Enterprise Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10010,
                        "productName": "Keeper Enterprise Bundle"
                    },
                    {
                        "unit": "GB",
                        "quantity": 10000,
                        "productId": 1012,
                        "productName": "10TB Secure File Storage"
                    }
                ]
            },
            {
                "companyId": "NDYwMDk",
                "companyName": "Company 1",
                "plan": "Keeper Business Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10001,
                        "productName": "Keeper Business Bundle"
                    }
                ]
            },
            {
                "companyId": "NDYwMTA",
                "companyName": "Company 2",
                "plan": "Keeper Business Plus Bundle",
                "invitedUsers": 1,
                "maximumAllowedUsers": 5,
                "products": [
                    {
                        "unit": "bundles",
                        "quantity": 1,
                        "productId": 10002,
                        "productName": "Keeper Business Plus Bundle"
                    }
                ]
            }
        ],
        "mspItem": {
            "companyId": "NDU5Njg",
            "companyName": "QaMspNfl",
            "invitedUsers": 1,
            "products": [
                {
                    "unit": "licenses",
                    "quantity": 31,
                    "productId": 720,
                    "productName": "MSP Base License"
                },
                {
                    "unit": "GB",
                    "quantity": 10000,
                    "productId": 1012,
                    "productName": "10TB Secure File Storage"
                },
                {
                    "unit": "",
                    "quantity": 1,
                    "productId": 730,
                    "productName": "Dedicated Service & Support"
                },
                {
                    "unit": "licenses",
                    "quantity": 31,
                    "productId": 920,
                    "productName": "Advanced Reporting & Alerts"
                },
                {
                    "unit": "licenses",
                    "quantity": 31,
                    "productId": 940,
                    "productName": "Compliance Reporting"
                },
                {
                    "unit": "licenses",
                    "quantity": 31,
                    "productId": 930,
                    "productName": "BreachWatch"
                },
                {
                    "unit": "KCM users",
                    "quantity": 10,
                    "productId": 967,
                    "productName": "Keeper Connection Manager (KCM)"
                },
                {
                    "unit": "licenses",
                    "quantity": 31,
                    "productId": 910,
                    "productName": "KeeperChat"
                }
            ]
        }
    }
}
```

#### 月間使用量の出力例

```json
{"success":true,"usage":{"total":2387.74,"tax":0,"currency":"USD","mcItems":[{"companyId":"NDU5OTk","total":3,"companyName":"49ers","products":[{"unitPrice":3,"unit":"user","quantity":1,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":3}]},{"companyId":"NDU5OTE","total":278.2,"companyName":"Bears","products":[{"unitPrice":4.8,"unit":"user","quantity":30,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":144},{"unitPrice":0.5,"unit":"user","quantity":30,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":15},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":1,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":25.2},{"unitPrice":1,"unit":"user","quantity":30,"productId":910,"productName":"KeeperChat","avgMonthlyCost":30}]},{"companyId":"NDU5OTM","total":2.25,"companyName":"Buccaneers","products":[{"unitPrice":2.25,"unit":"user","quantity":1,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":2.25}]},{"companyId":"NDU5OTg","total":4.2,"companyName":"Cardinals","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]},{"companyId":"NDU5ODc","total":3,"companyName":"Commanders","products":[{"unitPrice":3,"unit":"user","quantity":1,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":3}]},{"companyId":"NDYwMDk","total":2.25,"companyName":"Company 1","products":[{"unitPrice":2.25,"unit":"user","quantity":1,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":2.25}]},{"companyId":"NDYwMTA","total":4.2,"companyName":"Company 2","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]},{"companyId":"NDU5ODU","total":2.25,"companyName":"Cowboys","products":[{"unitPrice":2.25,"unit":"user","quantity":1,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":2.25}]},{"companyId":"NDU5ODY","total":4.2,"companyName":"Eagles","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]},{"companyId":"NDU5OTU","total":3,"companyName":"Falcons","products":[{"unitPrice":3,"unit":"user","quantity":1,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":3}]},{"companyId":"NDU5ODg","total":4.8,"companyName":"Giants","products":[{"unitPrice":4.8,"unit":"user","quantity":1,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.8}]},{"companyId":"NDU5OTI","total":4.8,"companyName":"Lions","products":[{"unitPrice":4.8,"unit":"user","quantity":1,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.8}]},{"companyId":"NDkzNDk","total":181.04,"companyName":"MC Test","products":[{"unitPrice":4.8,"unit":"user","quantity":0.89,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.27},{"unitPrice":89,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":89},{"unitPrice":0.5,"unit":"user","quantity":0.89,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":0.45},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":0.89,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":22.43},{"unitPrice":1,"unit":"user","quantity":0.89,"productId":910,"productName":"KeeperChat","avgMonthlyCost":0.89}]},{"companyId":"NDYwMDE","total":37.5,"companyName":"NFC Business","products":[{"unitPrice":2.25,"unit":"user","quantity":10,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":22.5},{"unitPrice":0.5,"unit":"user","quantity":10,"productId":920,"productName":"Advanced Reporting & Alerts","avgMonthlyCost":5},{"unitPrice":1,"unit":"user","quantity":10,"productId":930,"productName":"BreachWatch","avgMonthlyCost":10}]},{"companyId":"NDY5NTk","total":421.25,"companyName":"NFC Business - All Upgrades","products":[{"unitPrice":2.25,"unit":"user","quantity":1,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":2.25},{"unitPrice":100,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":100},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":920,"productName":"Advanced Reporting & Alerts","avgMonthlyCost":0.5},{"unitPrice":1,"unit":"user","quantity":1,"productId":930,"productName":"BreachWatch","avgMonthlyCost":1},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":0.5},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":10,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":252},{"unitPrice":1,"unit":"user","quantity":1,"productId":910,"productName":"KeeperChat","avgMonthlyCost":1}]},{"companyId":"NDYwMDI","total":4.2,"companyName":"NFC Business Plus","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]},{"companyId":"NDY5NjA","total":194.9,"companyName":"NFC Business Plus - All Upgrades","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2},{"unitPrice":100,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":100},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":0.5},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":1,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":25.2},{"unitPrice":1,"unit":"user","quantity":1,"productId":910,"productName":"KeeperChat","avgMonthlyCost":1}]},{"companyId":"NDYwMDM","total":3,"companyName":"NFC Enterprise","products":[{"unitPrice":3,"unit":"user","quantity":1,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":3}]},{"companyId":"NDY5NjI","total":195.2,"companyName":"NFC Enterprise - All Upgrades","products":[{"unitPrice":3,"unit":"user","quantity":1,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":3},{"unitPrice":100,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":100},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":920,"productName":"Advanced Reporting & Alerts","avgMonthlyCost":0.5},{"unitPrice":1,"unit":"user","quantity":1,"productId":930,"productName":"BreachWatch","avgMonthlyCost":1},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":0.5},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":1,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":25.2},{"unitPrice":1,"unit":"user","quantity":1,"productId":910,"productName":"KeeperChat","avgMonthlyCost":1}]},{"companyId":"NDYwMDQ","total":4.8,"companyName":"NFC Enterprise Plus","products":[{"unitPrice":4.8,"unit":"user","quantity":1,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.8}]},{"companyId":"NDY5NjE","total":195.5,"companyName":"NFC Enterprise Plus - All Upgrades","products":[{"unitPrice":4.8,"unit":"user","quantity":1,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.8},{"unitPrice":100,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":100},{"unitPrice":0.5,"unit":"user","quantity":1,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":0.5},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":1,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":25.2},{"unitPrice":1,"unit":"user","quantity":1,"productId":910,"productName":"KeeperChat","avgMonthlyCost":1}]},{"companyId":"NDU5ODk","total":239,"companyName":"Packers","products":[{"unitPrice":3,"unit":"user","quantity":30,"productId":10010,"productName":"Keeper Enterprise Bundle","avgMonthlyCost":90},{"unitPrice":25,"quantity":1,"productId":1011,"productName":"1TB Secure File Storage","avgMonthlyCost":25},{"unitPrice":0.5,"unit":"user","quantity":30,"productId":920,"productName":"Advanced Reporting & Alerts","avgMonthlyCost":15},{"unitPrice":1,"unit":"user","quantity":30,"productId":930,"productName":"BreachWatch","avgMonthlyCost":30},{"unitPrice":0.5,"unit":"user","quantity":30,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":15},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64}]},{"companyId":"NDU5OTY","total":4.8,"companyName":"Panthers","products":[{"unitPrice":4.8,"unit":"user","quantity":1,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":4.8}]},{"companyId":"NDU5OTc","total":4.5,"companyName":"Rams","products":[{"unitPrice":2.25,"unit":"user","quantity":2,"productId":10001,"productName":"Keeper Business Bundle","avgMonthlyCost":4.5}]},{"companyId":"NDU5OTQ","total":4.2,"companyName":"Saints","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]},{"companyId":"NDYwMDA","total":9.6,"companyName":"seahawks","products":[{"unitPrice":4.8,"unit":"user","quantity":2,"productId":10011,"productName":"Keeper Enterprise Plus Bundle","avgMonthlyCost":9.6}]},{"companyId":"NDU5OTA","total":4.2,"companyName":"Vikings","products":[{"unitPrice":4.2,"unit":"user","quantity":1,"productId":10002,"productName":"Keeper Business Plus Bundle","avgMonthlyCost":4.2}]}],"subTotal":2387.74,"mspItem":{"companyId":"NDU5Njg","total":567.9,"companyName":"QaMspNfl","products":[{"unitPrice":3.4,"unit":"user","quantity":31,"productId":720,"productName":"MSP Base License","avgMonthlyCost":105.4},{"unitPrice":100,"quantity":1,"productId":1012,"productName":"10TB Secure File Storage","avgMonthlyCost":100},{"unitPrice":0.5,"unit":"user","quantity":31,"productId":940,"productName":"Compliance Reporting","avgMonthlyCost":15.5},{"unitPrice":64,"quantity":1,"productId":730,"productName":"Dedicated Service & Support","avgMonthlyCost":64},{"unitPrice":25.2,"unit":"user","quantity":10,"productId":967,"productName":"Keeper Connection Manager (KCM)","avgMonthlyCost":252},{"unitPrice":1,"unit":"user","quantity":31,"productId":910,"productName":"KeeperChat","avgMonthlyCost":31}]}}}
```

{% hint style="info" %}
アカウント作成APIを利用すると、作成済みまたは招待済みのアカウント宛にメールが自動送信されます。以下はその例です。
{% endhint %}

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FD6ZKOS9pSFUvR7RmPwa5%2Fimage%20(2).png?alt=media&#x26;token=1fb78c08-ea13-4599-a4cf-039dc96d9194" alt=""><figcaption></figcaption></figure>

これらのAPIの使用方法についてご不明な点がございましたら、サポートチームまたは営業担当者までご連絡ください。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/enterprise-guide/jp/keeper-msp/account-management-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
