# Managees

## Overview

The Managees module provides a set of API endpoints designed for managers to onboard and manage their linked managees within the platform. The endpoints facilitate various operations, from creating managee profiles to listing all managees and generating widget user references for enhanced user interaction with the platform's widgets.

**API Endpoints for the Managees Module:**

1. [**Create Managee**](#create-a-managee)**:** This endpoint is used by managers to create a new customer profile for a personal customer. The user also inputs additional data necessary for KYC screening.
2. [**List Managees**](#list-managees)**:** Managers can use this endpoint to retrieve a list of all managees they have created. The list provides essential information about each managee, such as their ID, name, date added, verification status, and any associated widget references. This is a GET request with pagination capabilities to effectively manage large numbers of managees.
3. [**Get List of Accounts for a Managee by ID**](#get-list-of-accounts-for-a-managee-by-id)**: (DEPRECATED)** Retrieves a list of accounts belonging to a managee. You can filter the list by the managee's ID, the asset (currency), and control pagination with page number and size.
4. [**Create Widget User**](#create-widget-user)**:** This POST endpoint enables managers to create a widget user reference for their managees, which facilitates the managee's interaction with the platform's widgets. A widget user reference is associated with the managee, allowing for a more dynamic and engaging user experience within the platform interface.
5. [**Upload KYC Document**](#upload-kyc-document): Upload Documents for a newly created Managee Customer, if using external KYC.

These API calls are integral to managee account management as they allow for seamless operations concerning the create-list-manage lifecycle of managee profiles under a manager account. Through their use, managers can streamline operations, ensure account accuracy, and deliver a more refined platform experience to their managees.

***

## Create a Managee

This endpoint enables the onboarding of a Managee customer with detailed KYC requirements. It supports two verification flows: manual document upload and Jumio-based identity verification. Allows a manager to create a linked customer, referred to as a managee. The user provides additional information necessary for KYC screening. A file with proof of address is also required. The response contains a Jumio Link, from which the customer can enter and verify their identity information. A manager can set up a new customer account under their purview by entering the customer's (managee's) details into the system.

### Create Managee

<sup><mark style="color:orange;background-color:yellow;">**POST**<mark style="color:orange;background-color:yellow;"></sup> <sup>/api/v6/customer/managees/create</sup>

### KYC Collection

Ibanera collects KYC for Managee customers. This endpoint offers the flexibility of either using Ibanera's ID Verification provider, Jumio, or using your own IDv solution. The below section outlines each approach can be executed.

**Using Ibanera's ID Verification**

* <sub>bUseJumio is not included (defaults to true).</sub>
* <sub>KYC will be handled via a Jumio verification link returned in the response.</sub>
* <sub>Proof of Address document is sent directly in this request (proofOfAddressFile and proofOfAddressType fields).</sub>
* <sub>No need to upload documents separately.</sub>

| `emailAddress`                      | string             | Required, must be a valid email                                                                                                                                     |
| ----------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `manageesReference`                 | string             | Required, reference for the customer                                                                                                                                |
| `parentCustomersId`                 | integer (int32)    | Optional                                                                                                                                                            |
| `fiatCurrencyCode`                  | string             | Required                                                                                                                                                            |
| `fullName`                          | string             | Required                                                                                                                                                            |
| `firstGivenName`                    | string             | Required                                                                                                                                                            |
| `lastSurname`                       | string             | Required                                                                                                                                                            |
| `townCity`                          | string             | Required                                                                                                                                                            |
| `addressCountryISO`                 | string             | Required, 2-letter ISO country code                                                                                                                                 |
| `addressLine1`                      | string             | Required                                                                                                                                                            |
| `addressLine2`                      | string             | Optional                                                                                                                                                            |
| `stateProvince`                     | string             | Required                                                                                                                                                            |
| `postcode`                          | string             | Required                                                                                                                                                            |
| `phoneNumber`                       | string             | Required                                                                                                                                                            |
| `dateOfBirth`                       | string (date-time) | Required, e.g., "1990-01-01T00:00:00Z"                                                                                                                              |
| `taxNumber`                         | string             | Required                                                                                                                                                            |
| `nationalityISO`                    | string             | Required, ISO country code                                                                                                                                          |
| `occupation`                        | string             | Required                                                                                                                                                            |
| `sendInvite`                        | boolean            | Required                                                                                                                                                            |
| `sourceFundsTypes`                  | array of string    | Optional                                                                                                                                                            |
| `otherSourceOfFunds`                | string             | Optional                                                                                                                                                            |
| `estimatedNetWorth`                 | number (double)    | Optional                                                                                                                                                            |
| `estimatedGrossAnnualIncome`        | number (double)    | Optional                                                                                                                                                            |
| `otherBanks`                        | array of string    | Optional                                                                                                                                                            |
| `bActivelyEmployed`                 | boolean            | Optional                                                                                                                                                            |
| `employedCompanyName`               | string             | Optional                                                                                                                                                            |
| `employedJobTitle`                  | string             | Optional                                                                                                                                                            |
| `purposeOfOpeningAccountTypes`      | array of string    | Optional                                                                                                                                                            |
| `monthlyTurnover`                   | number (double)    | Optional                                                                                                                                                            |
| `anticipatedTransactionActivity`    | number (double)    | Optional                                                                                                                                                            |
| `purchaseCryptoMonthlyVolume`       | number (double)    | Optional                                                                                                                                                            |
| `purchaseCryptoAverageAmount`       | number (double)    | Optional                                                                                                                                                            |
| `purchaseCryptoTotalAmountPerMonth` | number (double)    | Optional                                                                                                                                                            |
| `sellingCryptoAverageAmount`        | number (double)    | Optional                                                                                                                                                            |
| `sellingCryptoMonthlyVolume`        | number (double)    | Optional                                                                                                                                                            |
| `sellingCryptoTotalAmountPerMonth`  | number (double)    | Optional                                                                                                                                                            |
| `totalMonthlyVolume`                | number (double)    | Optional                                                                                                                                                            |
| `totalAverageAmount`                | number (double)    | Optional                                                                                                                                                            |
| `totalMonthlyAmount`                | number (double)    | Optional                                                                                                                                                            |
| `btcTradingPercentage`              | number (double)    | Optional                                                                                                                                                            |
| `ethTradingPercentage`              | number (double)    | Optional                                                                                                                                                            |
| `usdcTradingPercentage`             | number (double)    | Optional                                                                                                                                                            |
| `otherCoinsTradingPercentage`       | number (double)    | Optional                                                                                                                                                            |
| `bIrsTax`                           | boolean            | Optional                                                                                                                                                            |
| `bForeignAccountTax`                | boolean            | Optional                                                                                                                                                            |
| `bNotCriminal`                      | boolean            | Optional                                                                                                                                                            |
| `bAccurateInfo`                     | boolean            | Optional                                                                                                                                                            |
| `proofOfAddressFile`                | string             | Required, base64-encoded JPEG/PNG, max 10MB                                                                                                                         |
| `proofOfAddressType`                | string (enum)      | Required, values: Unknown, BankStatement, CouncilBill, CreditCardStatement, LeaseAgreement, LoanApplication, MortgageApplication, PhoneBill, TaxReturn, UtilityBill |
| `bCreateDDA`                        | boolean            | <p>Optional<br><br>To Automatically Create Managee DDA account with onboarding</p>                                                                                  |

**Sample Request Body Parameters:**

```
{
  "emailAddress": "john.doe@ibanera.com",
  "manageesReference": "USA12345",
  "fiatCurrencyCode": "USD",
  "fullName": "John Doe",
  "firstGivenName": "John",
  "lastSurname": "Doe",
  "townCity": "New York",
  "addressCountryISO": "USA",
  "addressLine1": "123 Main Street",
  "addressLine2": "Apt 4B",
  "stateProvince": "NY",
  "postcode": "10001",
  "phoneNumber": "+12125551234",
  "dateOfBirth": "1985-07-15",
  "taxNumber": "999-45-6789",
  "nationalityISO": "USA",
  "occupation": "Software Engineer",
  "sendInvite": true,
  "sourceFundsTypes": [
    "Salary"
  ],
  "otherSourceOfFunds": "Freelancing",
  "estimatedNetWorth": 150000.00,
  "estimatedGrossAnnualIncome": 90000.00,
  "otherBanks": [
    "Bank of America"
  ],
  "bActivelyEmployed": true,
  "employedCompanyName": "Tech Solutions Inc.",
  "employedJobTitle": "Senior Developer",
  "purposeOfOpeningAccountTypes": [
    "DigitalAsset"
  ],
  "monthlyTurnover": 10000.00,
  "anticipatedTransactionActivity": 8000.00,
  "purchaseCryptoMonthlyVolume": 2000.00,
  "purchaseCryptoAverageAmount": 500.00,
  "purchaseCryptoTotalAmountPerMonth": 2000.00,
  "sellingCryptoAverageAmount": 400.00,
  "sellingCryptoMonthlyVolume": 1600.00,
  "sellingCryptoTotalAmountPerMonth": 1600.00,
  "totalMonthlyVolume": 3600.00,
  "totalAverageAmount": 450.00,
  "totalMonthlyAmount": 3600.00,
  "btcTradingPercentage": 50.0,
  "ethTradingPercentage": 30.0,
  "usdcTradingPercentage": 10.0,
  "otherCoinsTradingPercentage": 10.0,
  "bIrsTax": true,
  "bForeignAccountTax": false,
  "bNotCriminal": true,
  "bAccurateInfo": true,
  "proofOfAddressFile": "BASE64_ENCODED_STRING_HERE",
  "proofOfAddressType": "UtilityBill",
  "bCreateDDA": true
}
```

Upon successful creation, the API will return a Jumio verification link that the user must follow to complete KYC. This verification link is accessible in the jumioLink field.

**Response Body Parameters:**

* id (Integer): A placeholder ID not actively used in the response.
* details (Object):
  * manageesId(bigint): Newly Created Customer ID
  * jumioLink(Array of Objects): Newly created customer will require to validate email from portl link (e.g. <https://customer-uat.ibanera.com>) before further identity verification on this jumio link.

**Response Body Example**

```
{
    "id": 0,
    "details": {
        "manageesId": 14973,
        "jumioLink": "https://customer-uat.ibanera.com/manageesidverification?token=1naM3iyljym7wz%2f5C6yujA%3d%3d"
    },
    "status": "1",
    "errors": []
}
```

#### Using External IDv Provider

When using an external IDv provider, there are two steps to the onboarding process. The first step is to submit the customer details as defined below. Once the customer is created, you must then use an additional API endpoint to Upload Documents, which would be the externally collected ID verification documents.

`bUseJumio` = false (IDv Collected Externally)

| `emailAddress`                      | string             | Required, must be a valid email        |
| ----------------------------------- | ------------------ | -------------------------------------- |
| `manageesReference`                 | string             | Required, reference for the customer   |
| `parentCustomersId`                 | integer (int32)    | Optional                               |
| `fiatCurrencyCode`                  | string             | Required                               |
| `fullName`                          | string             | Required                               |
| `firstGivenName`                    | string             | Required                               |
| `lastSurname`                       | string             | Required                               |
| `townCity`                          | string             | Required                               |
| `addressCountryISO`                 | string             | Required, 2-letter ISO country code    |
| `addressLine1`                      | string             | Required                               |
| `addressLine2`                      | string             | Optional                               |
| `stateProvince`                     | string             | Required                               |
| `postcode`                          | string             | Required                               |
| `phoneNumber`                       | string             | Required                               |
| `dateOfBirth`                       | string (date-time) | Required, e.g., "1990-01-01T00:00:00Z" |
| `taxNumber`                         | string             | Required                               |
| `nationalityISO`                    | string             | Required, ISO country code             |
| `occupation`                        | string             | Required                               |
| `sendInvite`                        | boolean            | Required                               |
| `sourceFundsTypes`                  | array of string    | Optional                               |
| `otherSourceOfFunds`                | string             | Optional                               |
| `estimatedNetWorth`                 | number (double)    | Optional                               |
| `estimatedGrossAnnualIncome`        | number (double)    | Optional                               |
| `otherBanks`                        | array of string    | Optional                               |
| `bActivelyEmployed`                 | boolean            | Optional                               |
| `employedCompanyName`               | string             | Optional                               |
| `employedJobTitle`                  | string             | Optional                               |
| `purposeOfOpeningAccountTypes`      | array of string    | Optional                               |
| `monthlyTurnover`                   | number (double)    | Optional                               |
| `anticipatedTransactionActivity`    | number (double)    | Optional                               |
| `purchaseCryptoMonthlyVolume`       | number (double)    | Optional                               |
| `purchaseCryptoAverageAmount`       | number (double)    | Optional                               |
| `purchaseCryptoTotalAmountPerMonth` | number (double)    | Optional                               |
| `sellingCryptoAverageAmount`        | number (double)    | Optional                               |
| `sellingCryptoMonthlyVolume`        | number (double)    | Optional                               |
| `sellingCryptoTotalAmountPerMonth`  | number (double)    | Optional                               |
| `totalMonthlyVolume`                | number (double)    | Optional                               |
| `totalAverageAmount`                | number (double)    | Optional                               |
| `totalMonthlyAmount`                | number (double)    | Optional                               |
| `btcTradingPercentage`              | number (double)    | Optional                               |
| `ethTradingPercentage`              | number (double)    | Optional                               |
| `usdcTradingPercentage`             | number (double)    | Optional                               |
| `otherCoinsTradingPercentage`       | number (double)    | Optional                               |
| `bIrsTax`                           | boolean            | Optional                               |
| `bForeignAccountTax`                | boolean            | Optional                               |
| `bNotCriminal`                      | boolean            | Optional                               |
| `bAccurateInfo`                     | boolean            | Optional                               |

#### **KYC Verification DTO**

| `documentType`                 | [**Document Type**](#document-type-1)                                                   | Type of document used (e.g., `ID_CARD`)    |
| ------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------ |
| `subType`                      | [**Document Sub Type**](#document-sub-type-1)                                           | Sub-category (e.g., `NATIONAL_ID`)         |
| `issuingCountry`               | string (ISO3)                                                                           | Issuing country (e.g., `USA` for Pakistan) |
| `firstName`                    | string                                                                                  | First name from the document               |
| `lastName`                     | string                                                                                  | Last name from the document                |
| `dateOfBirth`                  | string (date)                                                                           | Date of birth in ISO format                |
| `expiryDate`                   | string (date)                                                                           | Document expiry date                       |
| `documentNumber`               | string                                                                                  | Unique number of the document              |
| `gender`                       | string                                                                                  | Gender (e.g., `M` for Male)                |
| `workFlowDecisionResult`       | [**WorkflowDetailsDecisionTypes**](#workflowdetailsdecisiontypes-1)                     | Overall workflow decision (e.g., `PASSED`) |
| `workflowDetailsCategoryTypes` | [**WorkflowDetailsCapabilityCategoryTypes**](#workflowdetailscapabilitycategorytypes-1) | Category type (e.g., `ID`)                 |

#### Capabilities (Nested) DTO

| `liveLinessDecisionResult` | [**WorkflowDetailsDecisionTypes**](#workflowdetailsdecisiontypes-1) | Liveness check result (e.g., `PASSED`)  |
| -------------------------- | ------------------------------------------------------------------- | --------------------------------------- |
| `similarityDecisionResult` | [**WorkflowDetailsDecisionTypes**](#workflowdetailsdecisiontypes-1) | Face similarity result (e.g., `PASSED`) |

#### Enumeration Values

#### **Document Type**

| PASSPORT         | Customer Passport, clearly displaying key identification details page |
| ---------------- | --------------------------------------------------------------------- |
| DRIVING\_LICENSE | Drivers License documentation                                         |
| ID\_CARD         | Identification Card document                                          |
| VISA             | Customer Visa document                                                |

#### **Document Sub Type**

| NOTIONAL\_ID               | Customer Passport, clearly displaying key identification details page             |
| -------------------------- | --------------------------------------------------------------------------------- |
| CONSULAR\_ID               | Drivers License documentation                                                     |
| ELECTORAL\_ID              | Identification Card document                                                      |
| RESIDENT\_PERMIT\_ID       | Customer Visa document                                                            |
| TAX\_ID                    | Customer selfie photo, must be clear                                              |
| STUDENT\_ID                | Customer Proof of Address, must be within 90 days to be accepted                  |
| PASSPORT\_CARD\_ID         | Passport Identification Card                                                      |
| MILITARY\_ID               | Military Identification Card                                                      |
| PUBLIC\_SAFETY\_ID         | Public Safety Identification Card                                                 |
| HEALTH\_ID                 | Health Identification Card                                                        |
| OTHER\_ID                  | Other Identification Card                                                         |
| VISA                       | Visa Identification Card                                                          |
| REGULAR\_DRIVING\_LICENSE  | Use when DocumentType is DRIVING\_LICENSE, for regular drivers license            |
| LEARNING\_DRIVING\_LICENSE | Use when DocumentType is DRIVING\_LICENSE, for learners drivers license or permit |
| E\_PASSPORT                | Use when DocumentType is PASSPORT                                                 |

#### Supporting Document Type

| BankStatement       | Official bank-issued statement showing account details and customer address.   |
| ------------------- | ------------------------------------------------------------------------------ |
| CouncilBill         | Bill from local government or municipality sent to a residential address.      |
| CreditCardStatement | Statement from a credit card company showing transactions and billing address. |
| LeaseAgreement      | Legal document outlining rental terms and the tenant's residential address.    |
| LoanApplication     | Submitted form for a loan, containing personal and address details.            |
| MortgageApplication | Application for a mortgage including applicant and property address info.      |
| PhoneBill           | Landline or mobile phone bill with user’s name and billing address.            |
| TaxReturn           | Government-submitted tax form that includes taxpayer's address.                |
| UtilityBill         | Bill for essential services (water, electricity, gas) confirming residency.    |

#### Document Side

| Front | Front side of Identification Document |
| ----- | ------------------------------------- |
| Back  | Back side of Identification Document  |
| Face  | Selfie of customer                    |

#### Decision Results

| NOT\_EXECUTED | ID Verification Workflow not executed        |
| ------------- | -------------------------------------------- |
| PASSED        | ID Verification Workflow Passed Successfully |
| REJECTED      | ID Verification was Rejected                 |
| WARNING       | ID Verification completed with warning       |

#### WorkflowDetailsDecisionTypes

| `NOT_EXECUTED` | The check or verification step was not executed.                               |
| -------------- | ------------------------------------------------------------------------------ |
| `PASSED`       | The verification step passed successfully.                                     |
| `REJECTED`     | The verification step failed and was explicitly rejected.                      |
| `WARNING`      | The verification step completed with a warning that may require manual review. |

#### WorkflowDetailsCapabilityCategoryTypes

| `ID`       | Identity document verification (e.g., ID card)                        |
| ---------- | --------------------------------------------------------------------- |
| `FACEMAP`  | Facial mapping used for biometric comparison                          |
| `DOCUMENT` | Supporting document verification (e.g., utility bill, bank statement) |
| `SELFIE`   | Live selfie verification                                              |

#### Source of Funds Types

<table><thead><tr><th>Value</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>Salary</td><td>Salary</td><td></td></tr><tr><td>Savings</td><td>Savings</td><td></td></tr><tr><td>SelfEmployed</td><td>Self Employed</td><td></td></tr><tr><td>Loans</td><td>Loans/Borrowed Funds</td><td></td></tr></tbody></table>

#### Purpose Of Opening Account Types

<table><thead><tr><th>Value</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>DigitalAsset</td><td>Digital Asset OTC Desk</td><td></td></tr><tr><td>CryptoLoans</td><td>Crypto Loans</td><td></td></tr><tr><td>PeerToPeer</td><td>Peer to Peer Transfer</td><td></td></tr><tr><td>CreditDebit</td><td>Credit or Debit Services</td><td></td></tr></tbody></table>

**Request Payload Example**

```
{
  "bUseJumio": false,
  "emailAddress": "john.doe62@ibanera.com",
  "manageesReference": "USA1234",
  "fiatCurrencyCode": "USD",
  "fullName": "John Doe",
  "firstGivenName": "John",
  "lastSurname": "Doe",
  "townCity": "Columbus",
  "addressCountryISO": "USA",
  "addressLine1": "742 Evergreen Terrace",
  "stateProvince": "OH",
  "postcode": "43215",
  "phoneNumber": "+16145551234",
  "dateOfBirth": "1988-05-20",
  "taxNumber": "123-45-6789",
  "nationalityISO": "USA",
  "occupation": "Software Engineer",
  "sendInvite": true,
  "sourceFundsTypes": [
    "Salary",
    "Savings"
  ],
  "otherSourceOfFunds": "Freelance Projects",
  "estimatedNetWorth": 250000.00,
  "estimatedGrossAnnualIncome": 95000.00,
  "otherBanks": [
    "Chase",
    "Wells Fargo"
  ],
  "bActivelyEmployed": true,
  "employedCompanyName": "Innovative Tech Corp",
  "employedJobTitle": "Senior Developer",
  "purposeOfOpeningAccountTypes": [
    "DigitalAsset",
    "Investment"
  ],
  "monthlyTurnover": 8000.00,
  "anticipatedTransactionActivity": 7500.00,
  "purchaseCryptoMonthlyVolume": 1500.00,
  "purchaseCryptoAverageAmount": 500.00,
  "purchaseCryptoTotalAmountPerMonth": 1500.00,
  "sellingCryptoAverageAmount": 400.00,
  "sellingCryptoMonthlyVolume": 1200.00,
  "sellingCryptoTotalAmountPerMonth": 1200.00,
  "totalMonthlyVolume": 2700.00,
  "totalAverageAmount": 450.00,
  "totalMonthlyAmount": 2700.00,
  "btcTradingPercentage": 40.0,
  "ethTradingPercentage": 35.0,
  "usdcTradingPercentage": 15.0,
  "otherCoinsTradingPercentage": 10.0,
  "bIrsTax": true,
  "bForeignAccountTax": false,
  "bNotCriminal": true,
  "bAccurateInfo": true,
  "kycVerificationDetails": {
    "documentType": "ID_CARD",
    "subType": "STATE_ID",
    "issuingCountry": "USA",
    "firstName": "John",
    "lastName": "Doe",
    "dateOfBirth": "1988-05-20T00:00:00",
    "expiryDate": "2032-08-15T00:00:00",
    "documentNumber": "D1234567",
    "gender": "M",
    "workFlowDecisionResult": "PASSED",
    "workflowDetailsCategoryTypes": "ID",
    "capabilities": {
      "liveLinessDecisionResult": "PASSED",
      "similarityDecisionResult": "PASSED"
    }
  }
}
```

**Response Payload (Success Example)**

```
{
    "id": 0,
    "details": {
        "manageesId": 14981,
        "kycDocumentsRequired": [
            {
                "type": "ID_CARD",
                "supportingDocumentTypes": null,
                "sidesRequired": [
                    "Front",
                    "Back"
                ]
            },
            {
                "type": "SELFIE",
                "supportingDocumentTypes": null,
                "sidesRequired": [
                    "Face"
                ]
            },
            {
                "type": "PROOF_OF_ADDRESS",
                "supportingDocumentTypes": [
                    "BankStatement",
                    "CouncilBill",
                    "CreditCardStatement",
                    "LeaseAgreement",
                    "LoanApplication",
                    "MortgageApplication",
                    "PhoneBill",
                    "TaxReturn",
                    "UtilityBill"
                ],
                "sidesRequired": [
                    "Front"
                ]
            }
        ]
    },
    "status": "1",
    "errors": []
}
```

**Response Payload (Failure Example)**

```
{
    "id": 0,
    "details": null,
    "status": "0",
    "errors": [
        {
            "fieldName": "ErrorLabel",
            "messageCode": "User already exists"
        }
    ]
}
```

#### Possible Error Message Codes

<table><thead><tr><th width="322">Error Message Code Example</th><th>Description</th></tr></thead><tbody><tr><td>Required</td><td>Named field missing</td></tr><tr><td>Invalid_Length</td><td>Named field length invalid</td></tr><tr><td>Invalid_Format</td><td>Named field format invalid</td></tr><tr><td>Username_Not_Available</td><td>User with requested email already exists</td></tr><tr><td>Currency_Invalid</td><td>Currency not supported</td></tr><tr><td>Nationality_Invalid</td><td>Requested user nationality not supported</td></tr><tr><td>Address_Country_Invalid</td><td>Address country not supported</td></tr><tr><td>Percentage_Invalid</td><td>Percentages must be between 0 and 100</td></tr><tr><td>Total_Percentage_Invalid</td><td>Total percentage must be at most 100</td></tr><tr><td>Type_Duplicated</td><td>Duplicate entries in array</td></tr><tr><td>IrsTax_Invalid</td><td>User must agree to terms</td></tr><tr><td>ForeignAccountTax_Invalid</td><td>User must agree to terms</td></tr><tr><td>NotCriminal_Invalid</td><td>User must agree to terms</td></tr><tr><td>AccurateInfo_Invalid</td><td>User must agree to terms</td></tr></tbody></table>

Once submitted successfully, the API will respond with the kycDocumentsRequired to complete the onboarding. These documents can be submitted via the Upload Document endpoint below.

## Upload KYC Document

Upload individual KYC documents (e.g., ID Front, ID Back, Face Photo) associated with the ManageesId Id received from [**Create Managee**](#create-a-managee).

<sub><mark style="color:orange;background-color:yellow;">**POST**<mark style="color:orange;background-color:yellow;"></sub> <sub>/api/v6/customer/managees/uploaddocument</sub>

<sub>**Request Format:**</sub> <sub>multipart/form-data</sub>

**Request Payload**

| **Parameter**              | **Type** | **Description**                                                           |
| -------------------------- | -------- | ------------------------------------------------------------------------- |
| **ManageesId**             | int      | Unique identifier of the customer, obtained from onboard endpoint         |
| **Type**                   | enum     | Type of document being uploaded, obtained from result of onboard endpoint |
| **DocumentSide**           | enum     | Side of the document (e.g., Front, Back, Face)                            |
| **File**                   | file     | The document file to be uploaded                                          |
| **SupportingDocumentType** | enum     | Only required for `PROOF_OF_ADDRESS`                                      |

**Enumeration Values:**

* [**Type**](#document-type)
* [**DocumentSide**](#document-side)
* [**SupportingDocumentType**](#supporting-document-type)

**Response Payload (Success Example)**

```
{
    "id": 0,
    "details": {
        "bSuccess": true,
        "documentID": "743f1614-6cb5-486a-a2bc-0c1eb14a1168"
    },
    "status": "1",
    "errors": []
}
```

**Response Payload (Failure Example)**

```
{
    "id": 0,
    "status": "0",
    "errors": [
        {
            "fieldName": "ManageesId",
            "messageCode": " ManageesId is required"
        }
    ]
}
```

***

## List Managees

Retrieve a paginated list of basic data for all managees linked to the manager. Managers can view a list of all their linked customers, sortable and navigable through numerous pages.

* **Endpoint**: `/api/v2/customer/managees/list`
* **Method**: GET

{% openapi src="/files/8wfNPb3MIn4CPnxhg0ir" path="/api/v2/customer/managees/list" method="get" %}
[public-api-customer-role (8).json](https://1042261367-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxYGT6bxbvntyOdsHjmeN%2Fuploads%2Fgit-blob-f4945577c49293d171bc558d4321443c27fcf223%2Fpublic-api-customer-role%20\(8\).json?alt=media)
{% endopenapi %}

**Query Parameters**:

* `PageNumber`: Page to view
* `PageSize`: Results per page

**Success Response Parameters**:

* `id` (Integer): An identifier for the list operation; might not be used in the response.
* `details` (Array of Objects): An array containing managee objects with the following structure:
  * `manageesId` (Integer): The unique ID of the managee user.
  * `manageesReference` (String): Your reference for the managee.
  * `name` (String): Managee’s full name.
  * `addDate` (DateTime): Date and time when the managee was created, formatted in ISO 8601.
  * `verificationStatus` (String): Current verification status of the managee ("Pending," "Accepted," or "Rejected").
  * `widgetUserReference` (String): Widget user reference associated with the managee, if any.
  * `parentCustomersId` (Integer): ID of the managee's parent customer.
* `pageSize` (Integer): The number of results per page returned in the response.
* `pageNumber` (Integer): The current page number in the paginated list.
* `numberOfPages` (Integer): The total number of available pages.
* `status` (String): Indicates the status code of the response ("1" for success).
* `errors` (Array): Contains error details if any occurred during the request.

#### Response Body Example:

```json
{
    "id": 1777,
    "details": [
        {
            "manageesId": 14359,
            "manageesReference": "34233rqcpomrkvr3g56",
            "name": "Jaden Kris",
            "addDate": "2024-07-24T15:12:46.547",
            "verificationStatus": "Pending",
            "widgetUserReference": null,
            "parentCustomersId": 14358
        }
    ],
    "pageSize": 10,
    "pageNumber": 7,
    "numberOfPages": 7,
    "status": "1",
    "errors": []
}
```

**Response with Errors Parameters**:

* `id` (Integer): Reference identifier for the request; often not used with errors.
* `details` (null): Typically null when errors are present.
* `status` (String): Status code of the operation ("0" for errors).
* `errors` (Array of Objects): An array of error objects, each containing:
  * `fieldName` (String): The field name that caused the error.
  * `messageCode` (String): Specific code indicating the error (e.g., "Invalid").

#### Possible Error Message Codes

| Error Message Code Example | Description             |
| -------------------------- | ----------------------- |
| Invalid                    | Named parameter invalid |

***

## Get List of Accounts for a Managee by ID

**This endpoint is deprecated and may have functionality issues. This endpoint was replaced by the new** [**List Asset Accounts for Customer**](/api-endpoints/accounts.md#list-asset-accounts-for-customer) **endpoint (**[**Accounts Module API**](/api-endpoints/accounts.md)**). Please use** [**List Asset Accounts for Customer**](/api-endpoints/accounts.md#list-asset-accounts-for-customer) **for this purpose.**

This endpoint retrieves a list of accounts belonging to a managee. You can filter the list by the managee's ID, the asset (currency), and control pagination with page number and size. This functionality is like a filterable list that shows all the accounts for individuals or entities managed by another party. It allows the user to see only specific accounts, sort it by the type of money in the account (like USD), and break the list into readable chunks (pages).

* **Endpoint**: `/api/v1/customer/manageeaccounts/list`
* **Method**: GET
* **Query Parameters**:
  * `ManageesId` (Integer): Managee's ID for filtering (optional).
  * `Asset` (String): Asset code for filtering (optional).
  * `PageNumber` (Integer): The page number for pagination, default is 1 (optional).
  * `PageSize` (Integer): The number of records per page, default is 10 (optional).\\

{% openapi src="/files/v26YtDRIkV6wiBPah7nY" path="/api/v1/customer/manageeaccounts/list" method="get" %}
[PublicAPI-April16.json](https://1042261367-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxYGT6bxbvntyOdsHjmeN%2Fuploads%2Fgit-blob-c8d5f9dcad96517eae48c21ca883167a3d1730b6%2FPublicAPI-April16.json?alt=media)
{% endopenapi %}

**Response Body Parameters and Types**:

* `id` (Integer): A reference ID for the account list.
* `details` (Array of Objects): A list of account objects, each with the following structure:
  * `id` (Integer): The unique ID for the account.
  * `manageesId` (Integer): The related managee’s ID for this account.
  * `name` (String): The name associated with the account.
  * `routingNumber` (String): The account routing number for financial transactions.
  * `accountNumber` (String): The specific account number.
  * `asset` (String): Currency code of the account’s asset.
  * `totalBalance` (Decimal): The total money held in the account.
  * `availableBalance` (Decimal): The funds available for withdrawal or spending.
  * `pendingBalance` (Decimal): Amounts that are in the process of being deposited or withdrawn.
  * `bSuppressed` (Boolean): Indicates whether the account is currently suppressed (hidden) or active.
  * `dateAdded` (String): Date and time the account was created, in ISO 8601 format.
* `pageSize` (Integer): Numerical size of the current page in the paginated response.
* `pageNumber` (Integer): Current page number within the paginated set.
* `numberOfPages` (Integer): Total number of response pages available.
* `status` (String): The operation's success status; '1' for success.
* `errors` (Array): An array of error objects, detailing any issues encountered with the request.

**Success Response Example**:

The response returns a list of managee accounts with details including the account's name, routing number, account number, asset, balances, and addition date.

```json
{
  "id": 1025,
  "details": [
    {
      "id": 1055,
      "manageesId": 1004,
      "name": "Account Name",
      "routingNumber": "021214891",
      "accountNumber": "357901009807",
      "asset": "USD",
      "totalBalance": 100.0,
      "availableBalance": 0.0,
      "pendingBalance": 100.0,
      "bSuppressed": false,
      "dateAdded": "2022-07-07T16:33:08.413+00:00"
    }
  ],
  "pageSize": 10,
  "pageNumber": 1,
  "numberOfPages": 1,
  "status": "1",
  "errors": []
}
```

***

## Create Widget User

This endpoint allows the creation of a widget user reference for the managee to facilitate the use of the crypto widget. Special identifiers for managees are generated to give them access to easier checkouts, as customer information will already be provided.

* **Endpoint**: `/api/v1/customer/managees/createwidgetuser`
* **Method**: POST

{% openapi src="/files/jJ7E6wWPcyFuZH6ofuNu" path="/api/v1/customer/managees/createwidgetuser" method="post" %}
[Customer API - Customer v5.0.7.json](https://1042261367-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxYGT6bxbvntyOdsHjmeN%2Fuploads%2Fgit-blob-1018aaf3121ec8a24cd8dd89c9a572d034369d99%2FCustomer%20API%20-%20Customer%20v5.0.7.json?alt=media)
{% endopenapi %}

**Request Body**:

* `manageesId` (Integer): The managee's ID for who the widget user is being created.
* `widgetUserReference` (String, max length 100): The widget user reference associated with the managee.

**Success Response Parameters**:

* `id` (Integer): A reference ID for the createwidgetuser operation, not typically used in the response.
* `status` (String): The status code of the operation ("1" for success).
* `errors` (Array): An empty array, indicating that no errors occurred during the request.

**Success Response Example**:

```json
{
  "id": 0,
  "status": "1"
  "errors": []
}
```

**Response Example with Errors**:

```json
{
  "id": 0,
  "details": null,
  "status": "0",
  "errors": [
    {
      "fieldName": "ManageesId",
      "messageCode": "Managee_Not_Found"
    }
  ]
}
```

#### Possible Error Message Codes

<table><thead><tr><th width="296">Error Message Code Example</th><th>Description</th></tr></thead><tbody><tr><td>Widget_Client_Not_Found</td><td>Manager does not have associated widget client</td></tr><tr><td>Managee_Not_Found</td><td>Managee’s Id is invalid</td></tr><tr><td>Managee_Not_Verified</td><td>Managee is not verified</td></tr><tr><td>Widget_User_Already_Exists</td><td>Managee already has an associated widget user</td></tr><tr><td>Already_Used</td><td>WidgetUserReference already used before</td></tr></tbody></table>


---

# 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://customer-api-docs.ibanera.com/api-endpoints/managees.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.
