Add campaign players
Add up to 500 players
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.
Body
- Name
players- Type
- string[], required
- Description
At least 1 item. At most 500 items. No item repeats. Each item: at least 1 character. At most 44 characters.
Request
curl -X POST "https://aggregator.asteriks.casino/v1/campaigns/0199c5a0-0000-7000-8000-000000000009/players" \
-H "X-Api-Key: test-key-test-key" \
-H "X-Timestamp: 1767225600" \
-H "X-Nonce: docs-example-nonce-0001" \
-H "X-Signature: eSiRTDuqq4LV1lq3VThYuVDLZHD+H70BFzRdA+Ch3Dw=" \
-H "Content-Type: application/json" \
-d '{
"players": [
"text"
]
}'
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
- Name
players[].player_id- Type
- string, required
- Description
The client's own player id, at most 44 characters so that every provider can carry it namespaced. At least 1 character. At most 44 characters.
- Name
players[].status- Type
- string, required
- Description
One of
pending,granted,removed.
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.
- Name
CAMPAIGN_NOT_EDITABLE- Type
- 409
- Description
The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in
error.cap(CampaignCap).
- Name
CAMPAIGN_LIMIT_REACHED- Type
- 409
- Description
The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in
error.cap(CampaignCap).
- Name
CAMPAIGN_PROVIDER_REFUSED- Type
- 409
- Description
The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in
error.cap(CampaignCap).
- Name
CAMPAIGN_CODE_CONFLICT- Type
- 409
- Description
The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in
error.cap(CampaignCap).
- Name
CAMPAIGNS_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_MULTIPLE_GAMES_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_DEFERRED_START_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_PLAYER_REMOVAL_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_CANCEL_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_CURRENCY_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_MIXED_VENDORS_NOT_SUPPORTED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_BET_LEVEL_NOT_ALLOWED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_ROUNDS_NOT_ALLOWED- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
CAMPAIGN_GAME_NOT_ELIGIBLE- Type
- 422
- Description
A campaign feature the provider cannot serve, refused before any provider call.
- Name
INTERNAL_ERROR- Type
- 502
- Description
INTERNAL_ERROR: the provider failed to answer.
- Name
INTERNAL_ERROR- Type
- 503
- Description
INTERNAL_ERROR is retryable. Another write of the campaign holds its provider-write lease, so this request sent nothing to the provider and changed nothing. Repeat the same request after Retry-After. Retry-After: The whole seconds to wait before repeating the request: the time to the end of the held lease, rounded up, and at least 1. Cache-Control: A refusal is never cached.
Response
{
"campaign_id": "0199c5a0-0000-7000-8000-000000000009",
"players": [
{
"player_id": "player-1001",
"status": "pending"
}
]
}