---
# System prepended metadata

title: ThirdPartyNotify 規格

---

# ThirdPartyNotify 規格

<br>

---

<br>

<br>

## 權限

<br>

需要 `THIRD_PARTY_ADMIN` Role 權限

<br>

request header 帶 token:

```json
{
    "Authorization": "Bearer ******"
}
```

<br>

---


<br>

## API

<br>

Method: _POST_

dev: 

`https://dev-api.gashpoint.io/gamefi/api/gamefi/v1/chainNotify`

stage: 

`https://staging-api.gashpoint.io/gamefi/api/gamefi/v1/chainNotify`

prod: 

`https://api.gashpoint.io/gamefi/api/gamefi/v1/chainNotify`

<br>

---

<br>

## 請求參數

<br>


* TokenNotifyList: List

    * TokenNotify: Object

        * ChainID: Integer (鍊代碼)

        * ContractAddress: String (合約位置)

        * From: String (發送方)

        * To: String (接收方)

        * BID: String (產品編號)

        * Amount: String （交易金額）

        * BurnAmount: String (銷毀金額)

        * Fees: String (手續費) 

        * Decimal: Integer (位數)

        * Value: String (數量)

        * TokenID: Long (TokenID (若為ERC721))

        * TxHash: String （txHash）

        * TxTime: String (交易時間：yyyy-MM-dd HH:mm:ss）

        * EventType: Integer (Event 類別)

        * AdditionalInfo: String (Json 字串，附加訊息)

        

    <br>

* StakeNotifyList: List

    * StakeNotify: Object

        * ContractAddress: String (合約位置)

        * WalletAddress: String (錢包位址)

        * StakingTokenIds: String (質押)

        * Reward: String (質押收益)

        * Fees: String (手續費) 

        * Decimal: Integer (位數)

        * TxHash: String （txHash）

        * TxTime: String (交易時間：yyyy-MM-dd HH:mm:ss）

        * EventType: Integer (Event 類別)

        * AdditionalInfo: String (Json 字串，附加訊息)


<br>
<br>

DEMO POST

<br>

```json
{
    "TokenNotifyList": [
        {
            "ChainID": "1671120562",
            "ContractAddress": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",
            "From": "0xd86aF8e0c15D58F3bEaBE3BbaDA18a09B92650F5",
            "To": "0x0952CA46762c3C9B1d8d3ac36AAcCf4854ea905e",
            "BID": "",
            "Amount": "20000000000000000",
            "BurnAmount": "",
            "Fees": "517820000000000",
            "Decimal": 18,
            "Value": "",
            "TokenID": "",
            "TxHash": "0xc1a231aaca8f7480cc05d309293fd9bcacc75d935af07a3599526fa12eedfb9c",
            "TxTime": "2022-11-11 11:11:11",
            "EventType": 1,
            "AdditionalInfo": "{}"
        }
    ],

    "StakeNotifyList": [],

}

```

<br>

---

<br>

## 回應

<br>

200 成功

<br>

```json
{
  "MsgLevel": "SUCCESS", // 訊息等級
  "MsgCode": "000000", // 回應代碼
  "Msg": "OK", // 回應訊息
  "Data": true // 回應額外訊息
}
```


<br>

4xx or 5xx 失敗

<br>

```json
{
  "MsgLevel": "SYSTEM_ERROR", // 訊息等級
  "MsgCode": "999999", // 回應代碼
  "Msg": "system exception error", // 回應訊息
  "Data": "失敗具體原因" // 回應額外訊息
}
```

<br>

