# InvestmentApi

All URIs are relative to *http://../..*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**getInvestmentAccounts**](InvestmentApi.md#getinvestmentaccounts) | **GET** /contacts/{uniqueIdentifier}/investments | Get investment accounts for a specific contact |
| [**getInvestmentAccounts1**](InvestmentApi.md#getinvestmentaccounts1) | **GET** /contacts/{uniqueIdentifier}/investments/{investmentAccountId} | Get investment accounts for a specific contact |



## getInvestmentAccounts

> InvestmentSourceResultSchema getInvestmentAccounts(uniqueIdentifier, organizationId)

Get investment accounts for a specific contact

### Example

```ts
import {
  Configuration,
  InvestmentApi,
} from '@equisoft/ucx-proxy-sdk-typescript';
import type { GetInvestmentAccountsRequest } from '@equisoft/ucx-proxy-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/ucx-proxy-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: default accessCode
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new InvestmentApi(config);

  const body = {
    // string | The unique identifier of a contact in the format SourceKey:ExternalId
    uniqueIdentifier: uniqueIdentifier_example,
    // string | The organization uuid to which the user belongs (optional)
    organizationId: organizationId_example,
  } satisfies GetInvestmentAccountsRequest;

  try {
    const data = await api.getInvestmentAccounts(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **uniqueIdentifier** | `string` | The unique identifier of a contact in the format SourceKey:ExternalId | [Defaults to `undefined`] |
| **organizationId** | `string` | The organization uuid to which the user belongs | [Optional] [Defaults to `undefined`] |

### Return type

[**InvestmentSourceResultSchema**](InvestmentSourceResultSchema.md)

### Authorization

[default accessCode](../README.md#default-accessCode)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **400** | Invalid query parameters |  -  |
| **500** | An unexpected error happened. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getInvestmentAccounts1

> InvestmentSourceResultSchema getInvestmentAccounts1(uniqueIdentifier, investmentAccountId, organizationId)

Get investment accounts for a specific contact

### Example

```ts
import {
  Configuration,
  InvestmentApi,
} from '@equisoft/ucx-proxy-sdk-typescript';
import type { GetInvestmentAccounts1Request } from '@equisoft/ucx-proxy-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/ucx-proxy-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: default accessCode
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new InvestmentApi(config);

  const body = {
    // string | The unique identifier of a contact in the format SourceKey:ExternalId
    uniqueIdentifier: uniqueIdentifier_example,
    // string | The unique identifier of an investment account in the format SourceKey:ExternalId
    investmentAccountId: investmentAccountId_example,
    // string | The organization uuid to which the user belongs (optional)
    organizationId: organizationId_example,
  } satisfies GetInvestmentAccounts1Request;

  try {
    const data = await api.getInvestmentAccounts1(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **uniqueIdentifier** | `string` | The unique identifier of a contact in the format SourceKey:ExternalId | [Defaults to `undefined`] |
| **investmentAccountId** | `string` | The unique identifier of an investment account in the format SourceKey:ExternalId | [Defaults to `undefined`] |
| **organizationId** | `string` | The organization uuid to which the user belongs | [Optional] [Defaults to `undefined`] |

### Return type

[**InvestmentSourceResultSchema**](InvestmentSourceResultSchema.md)

### Authorization

[default accessCode](../README.md#default-accessCode)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Success |  -  |
| **400** | Invalid query parameters |  -  |
| **500** | An unexpected error happened. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

