# Tokenization platform user api

## User signup

<mark style="color:green;">`POST`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/signup`

#### Query Parameters

| Name      | Type   | Description            |
| --------- | ------ | ---------------------- |
| firstName | string | User's first name      |
| LastName  | string | User's last name       |
| email     | string | Email address of user. |
| password  | string | Password of user       |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
    "status": true,
    "message": "Please verify your email address by clicking the link that we have mailed you!"
}
```

{% endtab %}

{% tab title="302 Could not find a cake matching this query." %}

```javascript
{
    "status": false,
    "message": "That email is already taken."
}
```

{% endtab %}
{% endtabs %}

## User login

<mark style="color:green;">`POST`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/login`

#### Request Body

| Name     | Type   | Description     |
| -------- | ------ | --------------- |
| email    | string | user's email id |
| password | string | user's password |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "token": JWT token
}
```

{% endtab %}

{% tab title="302 " %}

```
{
    "token": "failure",
    "message": "Oops! Wrong password."
}
```

{% endtab %}
{% endtabs %}

## User KYC submission

<mark style="color:green;">`POST`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/kyc`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| kycDocName1   | string | Document name for eg( national id , passport ) |
| kycDoc1       | object | Document in .jpeg format                       |
| kycDocName2   | string | Document name for eg( national id , passport ) |
| kycDoc2       | object | Document in .jpeg format                       |
| kycDocName3   | string | Document name for eg( national id , passport ) |
| kycDoc3       | object | Document in .jpeg format                       |
| ISDCode       | string | Country isd code                               |
| contactNumber | number | Contact number                                 |
| country       | string | Country name                                   |

{% tabs %}
{% tab title="200 " %}

```
{ 
    status: true, 
    message: "KYC Submitted." 
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false, 
    message: "error occured. only jpeg allowed" 
}
```

{% endtab %}
{% endtabs %}

## Platform transaction logs

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/Demo/:projectName/transactions`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "tokenTransferLogs": []
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false, 
    message: "Error occured while fetching data" 
}
```

{% endtab %}
{% endtabs %}

## User's wallet with balance

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/wallets`

#### Path Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true
    "ETHAddress": "0x903c304e0Cb1E53D0b0146D5bAF4Dfd8d29F8853",
    "ETHBalance": "0",
    "BTCAddress": "1ApGZheEjuMZ4aEyXfvYEo9YFJ8KiYYRcj",
    "BTCBalance": "0.00000000"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false, 
    message: "Network error occured" 
}
```

{% endtab %}
{% endtabs %}

## User's profile details

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/profile`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "userData": {
        "firstName": "akshay",
        "lastName": "pilankar",
        "email": "akshay@xinfin.org",
        "uniqueId": "8576f9e0-2acd-11e9-993f-29be15409e48",
        "contactNumber": "null - 9878944560",
        "accountStatus": true
    }
}
```

{% endtab %}

{% tab title="302 " %}

```
{ 
    status: false, 
    message: "error occured." 
}
```

{% endtab %}
{% endtabs %}

## Tokenization platform information

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/platform/info`

#### Path Parameters

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string |             |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "projectData": {
        "siteLogo": dataImageURL ,
        "siteName": "ndkjfdkjull",
        "coinName": "Demo",
        "coinSymbol": "Dmo",
        "tokenSold": 0,
        "tokenSupply": "1000000",
        "softCap": "100",
        "minimumContribution": 10,
        "bonusRate": 0,
        "homeURL": "null",
        "contactEmail": null,
        "startDate": "2/5/2019",
        "endDate": "2/5/2019"
    }
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    status: false, 
    message: "error occured."
}
```

{% endtab %}
{% endtabs %}

## Token price in terms of ETHER , BITCOIN & USD

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/platform/tokenPrice`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": true,
    "tokenBTC": 0.00031572,
    "tokenETH": 0.01,
    "tokenUSD": 1.0841288076
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    message: "Network error occured" 
}
```

{% endtab %}
{% endtabs %}

## User's ETHER and BITCOIN balance

<mark style="color:blue;">`GET`</mark> `https://api.mycontract.co:3001/v1/:projectName/user/balances`

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | JWT token   |

{% tabs %}
{% tab title="200 " %}

```
{
    "ETHBalance": "0",
    "BTCBalance": "0.00000000"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ 
    message: "Network error occured" 
}
```

{% endtab %}
{% endtabs %}
