# Generate Redeem Code ## Request URL >{API_URL} ## Request Parameters | Field Name | Type | Length | Description | | | ------------- | ------ | ------ | ----------- | --------------------------------------------------------- | | itype | string | 21 | Yes | 30 = Generate Redeem Code | | authcode | string | 32 | Yes | Agent identifier, assigned by the provider | | authkey | string | 32 | Yes | Agent secret key, assigned by the provider | | info | string | 128 | Yes | Redeem code identifier | | quantity | int | 32 | Yes | Generate the number of redeem codes | | type | int | 32 | Yes | Type :1= Unique code, 2= Shared code | | exchangelimit | int | 32 | Yes | The number of times each code can be redeemed | | accountlimit | int | 32 | Yes | The number of times each code can be redeemed per account | | score | int64 | 64 | Yes | Denomination of the exchange code | | st | int64 | 64 | Yes | The starting time of the validity period | | et | int64 | 64 | Yes | Expiration time of validity period | ## Example - **URL**: - {API_URL} - **HTTP Method**: - `POST` - **Form Data**: > Content-Type: `application/x-www-form-urlencoded` ``` itype :30 authcode :test666 authkey :KepYRwz4mOP3THAcfiQb info :National Day Activity quantity :10 type :2 exchangelimit :10 accountlimit :2 score :1000 st :1758272961261 et :1758652455165 ``` ## Response Fields | Field Name | Type | Length | Description | | ---------- | ---- | ------ | ----------------------------------------------------- | | ret | int | 32 | -1 indicates success; other than -1 indicates failure | | data | arr | 2048 | the array of redeem code created | ## Response Format ``` { "ret": -1, "info": "ok", "data": [ "29EZ3V", "4DQNMU", "59NW2Q", "CZX79Z", "DDUWYR", "M6FP3L", "N53J44", "PBFYHS", "QXQWZN", "USYFQN" ] } ```