Retorna uma lista de contas mestras e de investimento criadas na plataforma de investimento B2COPY. Filtre por conta, e-mail do cliente ou tipo e percorra os resultados.
Ponto final
GET [host]/api/v2/b2copy/accountsAutenticação
Envie o token de acesso no cabeçalho Authorization: Bearer <access_token> — consulte Authorization in the Back Office.
Solicitar corpo
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| investmentPlatformId | integer | Yes | The investment platform instance. Use 1 for a single connected MT server; contact Support if you have several. |
| account_number | string | No | MT login of a specific master or investment account. |
| string | No | Client email — returns accounts of that client. | |
| is_master | boolean | No | true → only master accounts; false → only investment accounts. |
| limit | integer | No | Maximum number of items returned. |
| offset | integer | No | Skip the first N items. |
| sort_by | string | No | Sort field. Supported: created_at. |
| sort_order | string | No | Sort direction: asc or 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": "[email protected]",
"is_master": true,
"limit": 100,
"offset": 0,
"sort_by": "created_at",
"sort_order": "asc"
}'Resposta
Uma matriz de objetos que descreve as contas correspondentes.
{
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"account_id": "2121944013",
"group": "demo_standalone",
"account_type": "master",
"createdAt": "2024-02-09T10:32:47.000000Z"
}