> For the complete documentation index, see [llms.txt](https://gitbook.umiverse.io/sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.umiverse.io/sdk/umiverse-sdk-doc/dive-points/increase-divepoint/api.md).

# API

{{DOMAIN}} <https://sdk.umiverse.io/>

Signature Method: Follow the order provided in the documentation (excluding ts and sign), concatenate the corresponding parameter values into a string, append ts and **UMI-API-KEY** (provided by us) at the end, and then use MD5 to generate the signature.

Signature String

```javascript
const text = `${merchantId}${action}${user}${amount}${limitTotal}${limitDay}${description}${ts}${KEY}`;
```

JavaScript Example:

```javascript
// Signature Example
const KEY = "UMI-API-KEY";
let str = '';
// Iterate through the parameter object
for (const key in param) {
    if (param.hasOwnProperty(key)) {
        const value = param[key];
        // Concatenate parameter values into the string
        str += `${value}`;
    }
}
// Append the timestamp and secret key to the end of the string
str += `${ts}${KEY}`;
// Compute the MD5 hash value
const sign = md5(str);
```

## Increase DivePoint

<mark style="color:green;">`POST`</mark> [https://sdk.umiverse.io](https://sdk.umiverse.io/)`/quest/divepoint/inc`

By calling this API, the game provider can increase the DivePoint balance for a user in the corresponding game on the UMI platform.

#### Request Body

| Name                                          | Type   | Description                                                                                              |
| --------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| merchantId<mark style="color:red;">\*</mark>  | String | The unique Merchant ID assigned to your account.                                                         |
| extraParams                                   | String | Additional attributes, provided as a JSON string or single string to include supplementary information.  |
| sign<mark style="color:red;">\*</mark>        | String | The signature of the request parameters, used to verify the authenticity of the request.                 |
| ts<mark style="color:red;">\*</mark>          | Number | The current timestamp, e.g., 1699243390.                                                                 |
| description<mark style="color:red;">\*</mark> | String | A description of the quest or activity.                                                                  |
| amount<mark style="color:red;">\*</mark>      | String | The number of DivePoints to be added.                                                                    |
| user<mark style="color:red;">\*</mark>        | String | Umi platform account ID, provided by the Umi platform when the user logs into your game.                 |
| limitTotal<mark style="color:red;">\*</mark>  | Number | The total number of times a user can claim this reward. A value of 0 indicates no limit.                 |
| limitDay<mark style="color:red;">\*</mark>    | Number | The number of times a user can claim this reward in a single day. A value of 0 indicates no daily limit. |
| action<mark style="color:red;">\*</mark>      | String | Operational characteristic values, such as login or daily\_quest.                                        |

{% tabs %}
{% tab title="200: OK SUCCESS" %}

````json
```json
{
    "statusCode": 200,
    "message": "success",
    "data": null,
    "count": 0
}
```
````

{% endtab %}

{% tab title="400: Bad Request Param Error" %}

```json
{
    "statusCode": 400,
    "message": [
        "merchantId should not be empty",
        "user should not be empty",
        "amount should not be empty",
        "description should not be empty",
        "ts should not be empty",
        "sign should not be empty"
    ],
    "error": "Bad Request"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Signature Error And Others" %}

```json
{
    "statusCode": 422,
    "message": "signature not correct",
    "error": "Unprocessable Entity"
}
```

{% endtab %}
{% endtabs %}
