> For the complete documentation index, see [llms.txt](https://docs-tron.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.tronify.io/stakepal-api/create-reclaim-order.md).

# 创建回收订单

### 接口调用

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

**以下参数带\*字段为必填，不带\*号为选填**

#### Request Body

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| address<mark style="color:red;">\*</mark>    | String | 用户地址（钱包地址）  |
| stakingId<mark style="color:red;">\*</mark>  | String | 代理记录 id     |
| opType<mark style="color:red;">\*</mark>     | String | reclaim     |
| sourceFlag<mark style="color:red;">\*</mark> | String | 来源标识        |

{% 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 %}

### 调用示例

{% 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 示例

<figure><img src="https://437826888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4K3XSHX743UkF46Owwyj%2Fuploads%2FFiJQGTNsStOPXaBSo2dt%2Fimage.png?alt=media&amp;token=5179f3bf-993c-4f65-b8dc-85d5042f0f4a" alt=""><figcaption></figcaption></figure>
