> For the complete documentation index, see [llms.txt](https://docs-tron.en.tronify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tron.en.tronify.io/stakepal-api/create-reclaim-order.md).

# Create Reclaim Order

### Endpoint usage

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/staking/updateDelegate`

The fields with \* are required, and the fields without \* are optional

#### Request Body

| Name                                         | Type   | Description                                |
| -------------------------------------------- | ------ | ------------------------------------------ |
| address<mark style="color:red;">\*</mark>    | String | User wallet address (delegation initiator) |
| stakingId<mark style="color:red;">\*</mark>  | String | Delegation record ID                       |
| opType<mark style="color:red;">\*</mark>     | String | reclaim                                    |
| sourceFlag<mark style="color:red;">\*</mark> | String | Source identifier                          |

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

```javascript
{
  "resCode": 100,
  "resMsg": "Success",
  "data": {
    "orderId": "tb_xxx",
    "delegateAddress": "T...",
    "receiveAddress": "T...",
    "orderType": "ENERGY",
    "pledgeTrxNum": 1234.56,
    "pledgeNum": 100000,
    "opType": "reclaim"
  }
}

 
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### code example

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

```
// example
const params = {
    "address": "Txxxxxxxxxxx",
    "stakingId": "xxxx",
    "opType": "xxxx",
    "sourceFlag": "tronify"
}
 const res = await axios.post('https://open.tronify.io/api/staking/updateDelegate',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman example

<figure><img src="https://3188465811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnv0Qbx2yTtH3TKQFd528%2Fuploads%2FBKqljAfSpbB7PIOUNoLF%2Fimage.png?alt=media&amp;token=4f52340b-5269-49be-8e50-c55f3a2db40f" alt=""><figcaption></figcaption></figure>
