Get a campaign report
The player counts by state. For each currency, the distinct rounds, the distinct players with rounds and the sum of the wins in minor units. It is read from the settled provider transactions of the campaign, never from the provider. The currencies are in code order.
Request
A client sends this request signed with its credential. The example is signed with the test API key test-key-test-key and the test secret docs-example-signing, at the timestamp 1767225600 with the nonce docs-example-nonce-0001; see Authentication and signing.
Headers
- Name
X-Api-Key- Type
- string, required
- Description
The credential id. Sent together with X-Timestamp, X-Nonce and X-Signature.
- Name
X-Signature- Type
- string, required
- Description
Base64 HMAC-SHA256 of the method, the path with its query, X-Timestamp, X-Nonce and the lowercase hex SHA-256 of the raw body, joined by newlines. Compared in constant time; 30 seconds of tolerance; each nonce is used once.
- Name
X-Timestamp- Type
- string, required
- Description
Unix seconds; within 30 seconds of the receiver's clock. Matches
^[0-9]{1,12}$.
- Name
X-Nonce- Type
- string, required
- Description
Single use per credential, kept until the timestamp plus 30 seconds. At least 16 characters. At most 128 characters.
Path parameters
- Name
campaignId- Type
- string (uuid), required
- Description
A UUID v7.
Request
curl "https://aggregator.asteriks.casino/v1/campaigns/0199c5a0-0000-7000-8000-000000000009/report" \
-H "X-Api-Key: test-key-test-key" \
-H "X-Timestamp: 1767225600" \
-H "X-Nonce: docs-example-nonce-0001" \
-H "X-Signature: sa17TH57K79g4tla1r5YoDVOQf6bprBogTIDtI9/yFc="
Response
The answer is 200 with application/json.
- Name
campaign_id- Type
- string (uuid), required
- Description
A UUID v7.
- Name
players- Type
- object, required
- Description
The player counts of the campaign, by the state of each player.
- Name
players.pending- Type
- integer, required
- Description
At least 0. At most 9007199254740991.
- Name
players.granted- Type
- integer, required
- Description
At least 0. At most 9007199254740991.
- Name
players.removed- Type
- integer, required
- Description
At least 0. At most 9007199254740991.
- Name
currencies- Type
- object[], required
- Description
One entry for each currency with settled rounds, in code order.
- Name
currencies[].currency- Type
- string, required
- Description
One of
TRY,EUR,USD,USDT,TON,BTC,AED,AFN,ALL,AMD,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BOV,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHE,CHF,CHW,CLF,CLP,CNY,COP,COU,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MXV,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TTD,TWD,TZS,UAH,UGX,USN,UYI,UYU,UYW,UZS,VED,VES,VND,VUV,WST,XAF,XCD,XCG,XOF,XPF,YER,ZAR,ZMW,ZWG.
- Name
currencies[].rounds- Type
- integer, required
- Description
The distinct rounds played. At least 0. At most 9007199254740991.
- Name
currencies[].players_with_rounds- Type
- integer, required
- Description
The distinct players who played a round. At least 0. At most 9007199254740991.
- Name
currencies[].total_win- Type
- integer, required
- Description
Gross of reversals: the sum of the settled campaign wins in this currency in minor units. A win that was rolled back stays counted here. At least 0. At most 9007199254740991.
Errors
Each error carries one of these codes in the error object of Errors.
- Name
MALFORMED_REQUEST- Type
- 400
- Description
MALFORMED_REQUEST: a body, query or path value fails its schema.
- Name
UNAUTHORIZED- Type
- 401
- Description
UNAUTHORIZED: a missing or wrong key, signature, timestamp or nonce.
- Name
NOT_FOUND- Type
- 404
- Description
NOT_FOUND: an unknown id, another client's id or an unknown path; one body for every 404.
Response
{
"campaign_id": "0199c5a0-0000-7000-8000-000000000009",
"players": {
"pending": 0,
"granted": 0,
"removed": 0
},
"currencies": [
{
"currency": "EUR",
"rounds": 0,
"players_with_rounds": 0,
"total_win": 0
}
]
}