B2COPY 投資プラットフォームで作成されたマスター アカウントと投資アカウントのリストを返します。アカウント、クライアントの電子メール、またはタイプでフィルターし、結果をページ単位で表示します。
エンドポイント
GET [host]/api/v2/b2copy/accounts認証
Authorization: Bearer <access_token> ヘッダーでアクセス トークンを送信します。Back Office の Authorization を参照してください。
リクエストボディ
| 名前 | 種類 | 必須 | 説明 |
|---|---|---|---|
| investmentPlatformId | 整数 | はい | 投資プラットフォームのインスタンス。単一の接続された MT サーバーの場合は 1 を使用します。複数ある場合はサポートにお問い合わせください。 |
| account_number | 文字列 | いいえ | 特定のマスターアカウントまたは投資アカウントの MT ログイン。 |
| 文字列 | いいえ | クライアントの電子メール — そのクライアントのアカウントを返します。 | |
| is_master | ブール値 | いいえ | true → マスターアカウントのみ。 false → 投資口座のみ。 |
| limit | 整数 | いいえ | 返されるアイテムの最大数。 |
| offset | 整数 | いいえ | 最初の N 項目をスキップします。 |
| sort_by | 文字列 | いいえ | 並べ替えフィールド。サポートされている: created_at。 |
| sort_order | 文字列 | いいえ | ソート方向: asc または desc。 |
curl --location --request GET 'https://host.name/api/v2/b2copy/accounts' \
--header 'Authorization: Bearer <access_token>' \
--data-raw '{
"investment_platform_id": 1,
"account_number": "2121944013",
"email": "username@example.com",
"is_master": true,
"limit": 100,
"offset": 0,
"sort_by": "created_at",
"sort_order": "asc"
}'応答
一致するアカウントを記述するオブジェクトの配列。
{
"firstName": "John",
"lastName": "Smith",
"email": "username@example.com",
"account_id": "2121944013",
"group": "demo_standalone",
"account_type": "master",
"createdAt": "2024-02-09T10:32:47.000000Z"
}