API Reference
Bonusacties
Bonusacties ophalen en voltooien voor wedstrijdinzendingen
Bonusacties
Bonusacties zijn taken die deelnemers kunnen voltooien om extra punten te verdienen in een wedstrijd. Gebruik deze eindpunten om beschikbare bonusacties op te halen en als voltooid te markeren.
Bonusacties ophalen
/api/v1/entries/:entryId/bonus-actionsHaal alle bonusacties op voor een specifieke inzending, inclusief hun voltooiingsstatus.
Padparameters
entryIdstring required De unieke inzendings-ID. Gebruik 'lookup' met queryparameters om te zoeken op e-mail.
Queryparameters (wanneer entryId "lookup" is)
emailstring required E-mailadres om op te zoeken
contestIdstring required Wedstrijd-ID om binnen te zoeken
Verzoek
# Op basis van inzendings-ID
curl -X GET https://blitzrocket.com/api/v1/entries/entry_abc123/bonus-actions \
-H "x-api-key: your_api_key_here"
# Op basis van e-mail lookup
curl -X GET "https://blitzrocket.com/api/v1/entries/lookup/bonus-actions?email=jane@example.com&contestId=clx1abc123" \
-H "x-api-key: your_api_key_here"
Antwoord
{
"success": true,
"data": {
"entryId": "entry_abc123",
"email": "jane@example.com",
"totalPoints": 150,
"bonusActionsCompleted": 2,
"bonusActionsTotal": 5,
"bonusPointsEarned": 30,
"actions": [
{
"id": "ba_001",
"action": "follow_twitter",
"description": "Volg ons op Twitter",
"icon": "twitter",
"iconColor": "#1DA1F2",
"points": 10,
"confirmationType": "auto",
"destinationUrl": "https://twitter.com/blitzrocket",
"order": 1,
"completed": true,
"completedAt": "2025-06-15T12:00:00.000Z",
"completionStatus": "verified"
},
{
"id": "ba_002",
"action": "share_referral",
"description": "Deel je verwijzingslink",
"icon": "share",
"iconColor": "#10B981",
"points": 20,
"confirmationType": "manual",
"destinationUrl": null,
"order": 2,
"completed": true,
"completedAt": "2025-06-16T09:30:00.000Z",
"completionStatus": "verified"
},
{
"id": "ba_003",
"action": "visit_website",
"description": "Bezoek onze productpagina",
"icon": "link",
"iconColor": "#6366F1",
"points": 5,
"confirmationType": "click",
"destinationUrl": "https://example.com/product",
"order": 3,
"completed": false,
"completedAt": null,
"completionStatus": null
}
]
}
}
Antwoordvelden
entryIdstringDe inzendings-ID
emailstringE-mailadres van deelnemer
totalPointsnumberTotaal aantal punten voor de inzending
bonusActionsCompletednumberAantal voltooide bonusacties
bonusActionsTotalnumberTotaal aantal beschikbare bonusacties
bonusPointsEarnednumberPunten verdiend met bonusacties
actions[].idstringUnieke identifier voor de bonusactie
actions[].actionstringType actie identifier
actions[].pointsnumberPunten toegekend voor het voltooien van deze actie
actions[].completedbooleanOf deze actie voltooid is
Bonusactie voltooien
/api/v1/entries/:entryId/bonus-actions/:bonusActionId/completeMarkeer een bonusactie als voltooid voor een inzending en ken de bijbehorende punten toe.
Padparameters
entryIdstring required De unieke inzendings-ID
bonusActionIdstring required De unieke bonusactie-ID
Verzoekbody
proofstringBewijs van voltooiing (optioneel, bijvoorbeeld URL van screenshot)
answerstringAntwoord voor quiz-achtige bonusacties (optioneel)
Verzoek
curl -X POST https://blitzrocket.com/api/v1/entries/entry_abc123/bonus-actions/ba_003/complete \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{}'
Antwoord (Nieuwe Voltooiing)
{
"success": true,
"data": {
"alreadyCompleted": false,
"completedAt": "2025-06-17T14:00:00.000Z",
"pointsAdded": 5,
"newTotalPoints": 155,
"message": "Bonusactie succesvol voltooid."
}
}
Antwoord (Al Voltooid)
{
"success": true,
"data": {
"alreadyCompleted": true,
"completedAt": "2025-06-15T12:00:00.000Z",
"message": "Deze bonusactie is al voltooid."
}
}
Foutantwoorden
| Status | Fout | Beschrijving |
|---|---|---|
400 | Ontbrekende entryId of bonusActionId | Beide padparameters zijn vereist |
401 | Ongeldige API-sleutel | API-sleutel ontbreekt of is ongeldig |
404 | Inschrijving of bonusactie niet gevonden | De opgegeven resource bestaat niet |