Skip to main content

Query Rebate Records

1. Query Rebate Records (Reconciliation Statement)

Interface Path

  • Get
  • /api/promo/rebate/bill

Description

  • The query interface uses a pagination mode. For example, if there are 350 records in the given time range, set 100 records per page
  • For the first page, set the start parameter to 0 and the count parameter to 100
  • For the second page, set start += 100 to 100, and count to 100
  • And so on
  • Time filtering is based on dispatch time (create_time). It is recommended to pull data in hourly or daily segments

Interface Frequency Description

  • The query rebate records API can be called at most once every 10 seconds

Request Parameters

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
time_startDispatch Time Start (inclusive)stringOptionalIn milliseconds. If not provided, no lower bound is applied
time_endDispatch Time End (inclusive)stringOptionalIn milliseconds. If not provided, no upper bound is applied
activity_idActivity IDstringOptionalExact match. If not provided, all rebate activities are queried
user_idUser IDstringOptionalExact match. If not provided, all users are queried
statusStatus FilterstringOptionalNot provided - all, "0" - failed, "1" - success
startPagination Start IndexintRequiredDefault 0
countRecords Per PageintRequiredDefault 100, minimum 1, maximum 3000
timestampCurrent TimestampstringRequiredTimestamp when calling the interface (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSignature algorithm details in the interface description

Response Parameters

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--startStart IndexintPagination start index of this request
--page_sizeRecords Per PageintRecords per page of this request
--totalTotal RecordsintTotal records matching the query
--listRebate Record ListListRebate Record List
----idRecord IDstringUnique rebate record ID
----activity_idActivity IDstringID of the associated rebate activity
----user_idUser IDstringUser ID
----dateSettlement DateintUTC millisecond timestamp of 00:00:00 on the settlement date. Convert to local timezone as needed
----currencyCurrencystringCurrency
----turnoverValid TurnoverstringValid turnover amount that triggered this rebate
----rateRebate RatestringMatched rebate rate, float string in % (e.g. "1.5" means 1.5%)
----rebate_amountRebate AmountstringActual rebate amount issued
----wallet_txn_idWallet Transaction IDstringWallet transaction ID for reconciliation. Not returned when status = 0
----statusStatusint0 - Failed, 1 - Success
----create_timeDispatch TimeintRebate dispatch time, in milliseconds
----txn_idsAssociated Bet ID ListArrayList of bet record IDs that triggered this rebate

Request Example

curl --location 'https://staging.aig1234.com/api/promo/rebate/bill?agent_id=agent001&time_start=1742256000000&time_end=1742342399000&status=1&start=0&count=100&timestamp=1742300000000&sign=a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4'

Response Example

{
"code": 200,
"message": "success",
"data": {
"start": 0,
"page_size": 100,
"total": 2,
"list": [
{
"id": "67d1a2b3c4e5f6789abcdef0",
"activity_id": "67c0a1b2c3d4e5f678901234",
"user_id": "user888",
"date": 1742256000000,
"currency": "CNY",
"turnover": "5800.00",
"rate": "1",
"rebate_amount": "58.00",
"wallet_txn_id": "68a3c4d5e6f7890abcdef123",
"status": 1,
"create_time": 1742300123456,
"txn_ids": [
"67f1a2b3c4e5f6789abc0001",
"67f1a2b3c4e5f6789abc0002"
]
},
{
"id": "67d1a2b3c4e5f6789abcdef1",
"activity_id": "67c0a1b2c3d4e5f678901234",
"user_id": "user999",
"date": 1742256000000,
"currency": "CNY",
"turnover": "12000.00",
"rate": "2",
"rebate_amount": "240.00",
"wallet_txn_id": "68a3c4d5e6f7890abcdef456",
"status": 1,
"create_time": 1742300456789,
"txn_ids": [
"67f1a2b3c4e5f6789abc0010"
]
}
]
}
}

Error Codes

200    Success
408000 Request Parameter Error
408003 Whitelist Restriction
600100 Invalid Signature
600101 Invalid Parameter
700101 Merchant Does Not Exist