Skip to main content
GET
/
affiliate
/
getAffiliateCommission
Get affiliate commission
curl --request GET \
  --url https://api.4casters.io/affiliate/getAffiliateCommission \
  --header 'Authorization: Bearer <token>'
{
  "commissionPaid": [
    {
      "alice": 124.5
    },
    {
      "bob": 12
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.4casters.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns commission paid to the caller by the players they have invited, grouped by player username. With no parameters, returns lifetime earnings; with fromDate / toDate, restricts the range.
Unlike most endpoints, this one returns the result at the top level as commissionPaid (not under data).

Request

GET /affiliate/getAffiliateCommission
fromDate
string
Start date (MM-DD-YYYY). Defaults to 08-02-2021.
toDate
string
End date (MM-DD-YYYY). Defaults to today.
curl "https://api.4casters.io/affiliate/getAffiliateCommission?fromDate=10-03-2022&toDate=10-10-2022" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

commissionPaid
array
Each entry is a single-key object mapping a player’s username to the total commission paid by that player in the requested range.

Example

{
  "commissionPaid": [
    { "alice":   124.50 },
    { "bob":      12.00 },
    { "charlie":  87.34 }
  ]
}

Errors

StatusMeaning
400fromDate is not parseable.

Authorizations

Authorization
string
header
required

Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.

Query Parameters

fromDate
string

Start date (MM-DD-YYYY). Defaults to 08-02-2021.

Example:

"10-03-2022"

toDate
string

End date (MM-DD-YYYY). Defaults to today.

Example:

"10-10-2022"

Response

Commission summary

commissionPaid
object[]

Each entry is a single-key object mapping a player's username to total commission paid.

Example:
[{ "alice": 124.5 }, { "bob": 12 }]