Update Bonus Entries

Overwrite the bonus entries value for a specific participant in a sweepstakes.

POST participants/updateBonusEntries

Description

This endpoint overwrites the BonusEntries field for a participant identified by ParticipantToken within a sweepstakes identified by SweepstakesToken. The sweepstakes must belong to the authenticated user. The new value must be an integer between 0 and 1,000,000.

Request Body Parameters

ParameterTypeRequiredDescription
SweepstakesTokenString (UUID v4)YesUnique identifier for the sweepstakes
ParticipantTokenString (UUID v4)YesUnique identifier for the participant
BonusEntriesNumber (integer)YesNew bonus entries value — integer between 0 and 1,000,000

Request Body

Field Type Required Description
SweepstakesToken String (UUID v4) Yes Unique identifier for the sweepstakes
ParticipantToken String (UUID v4) Yes Unique identifier for the participant
BonusEntries Number (integer) Yes New bonus entries value — integer between 0 and 1,000,000

Code Examples

curl -X POST "https://api-v3.sweeppea.com/participants/updateBonusEntries" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "SweepstakesToken": "uuid-v4-string", "ParticipantToken": "uuid-v4-string", "BonusEntries": 50 }'

Response

200 OK

{ "Response": true, "Telemetry": { "DataConsumed": 0, "APICalls": 42, "MaxAPICalls": 10000 }, "Data": { "ParticipantToken": "uuid-v4-string", "SweepstakesToken": "uuid-v4-string", "BonusEntries": 50 }, "Message": "(OK) Bonus entries updated successfully." }
Error Responses

400 Bad Request

{ "Response": false, "Message": "Invalid BonusEntries value. Must be an integer between 0 and 1,000,000.", "Help": { "ExpectedBody": { "SweepstakesToken": "string (required) — UUID v4 of the sweepstakes", "ParticipantToken": "string (required) — UUID v4 of the participant", "BonusEntries": "number (required) — New bonus entries value, between 0 and 1,000,000" } } }

404 Not Found

{ "Response": false, "Message": "Participant Not Found in This Sweepstakes", "Code": 404 }