> ## Documentation Index
> Fetch the complete documentation index at: https://doc.va777.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 派發免費轉活動

> [!NOTE]
>
> * 將 memberList 內的會員整批派發派發卡 (joinOptions=add)，整批成功或整批失敗 (all-or-nothing)。
> * 任一會員不存在 → 整批拒絕，回 ACCOUNT\_DOES\_NOT\_EXIST，errorMessage 帶不存在的會員帳號。
> * 名額檢查：若 (目前已派發數 + 本次 memberList 筆數) 超過活動 maxGrantCount，整批拒絕，回 FREESPIN\_QUOTA\_FULL。
> * 任一會員已綁定 (allowDuplicateJoin=false) 或達單人上限 (max\_grants\_per\_member) → 整批拒絕，回 BAD\_PARAMETERS，錯誤訊息帶違規會員。
> * 活動狀態異常 (不存在 / 未啟用 / 已過期 / 幣別不符) → 整批拒絕，回 FREESPIN\_EVENT\_NOT\_FOUND 或 BAD\_PARAMETERS。
> * 成功則回 grants：每筆皆含 grantID 與 memberAccount。

## 請求參數

**channelID** `number` *required*

渠道編號 (若無渠道，請帶入1)

**eventID** `string` *required*

活動編號 (24 碼 hex)

**memberList** `string[]` *required*

會員帳號列表(至少帶 1 個，不可重複，每個不可為空字串)（form-data 以同名欄位重複傳送多個值）

**sign** `string` *required*

簽章，產生方式請參考[簽章規則](https://doc.va777.net/guides/signature.md)

## 回應

成功（HTTP 狀態碼固定為 200，請以 `status.code` 判斷結果）

**data** `object`

**屬性**

**grants** `object[]`

發放結果 (整批成功才會有)

**屬性**

**memberAccount** `string`

會員帳號

**grantID** `string`

派發卡編號 (24 碼 hex)

**status** `object`

每次回應都會附帶的請求處理狀態

**屬性**

**code** `string`

回應訊息碼，請參照[回應訊息碼](https://doc.va777.net/reference/response-codes.md)

**message** `string`

回應詳細訊息

**datetime** `string`

請求接收時間，格式為 RFC3339

**traceCode** `string`

回應追蹤碼（唯一值），供雙方比對回應內容

```json 200 theme={null}
{
  "data": {
    "grants": [
      {
        "memberAccount": "test123",
        "grantID": "abccc1234567890aaaaa1254"
      },
      {
        "memberAccount": "test1234",
        "grantID": "abccc1234567890aaaaa1299"
      }
    ]
  },
  "status": {
    "code": "0",
    "message": "success",
    "datetime": "2022-07-01T10:13:54.920+08:00",
    "traceCode": "7cf25e1957cc47fe8e01f1a7c6d504d6"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.