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

GET/api/v1/entries/:entryId/bonus-actions
Public or Private API Key

Haal 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

bash
# 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

json
{
  "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

entryIdstring

De inzendings-ID

emailstring

E-mailadres van deelnemer

totalPointsnumber

Totaal aantal punten voor de inzending

bonusActionsCompletednumber

Aantal voltooide bonusacties

bonusActionsTotalnumber

Totaal aantal beschikbare bonusacties

bonusPointsEarnednumber

Punten verdiend met bonusacties

actions[].idstring

Unieke identifier voor de bonusactie

actions[].actionstring

Type actie identifier

actions[].pointsnumber

Punten toegekend voor het voltooien van deze actie

actions[].completedboolean

Of deze actie voltooid is


Bonusactie voltooien

POST/api/v1/entries/:entryId/bonus-actions/:bonusActionId/complete
Public or Private API Key

Markeer 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

proofstring

Bewijs van voltooiing (optioneel, bijvoorbeeld URL van screenshot)

answerstring

Antwoord voor quiz-achtige bonusacties (optioneel)

Verzoek

bash
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)

json
{
  "success": true,
  "data": {
    "alreadyCompleted": false,
    "completedAt": "2025-06-17T14:00:00.000Z",
    "pointsAdded": 5,
    "newTotalPoints": 155,
    "message": "Bonusactie succesvol voltooid."
  }
}

Antwoord (Al Voltooid)

json
{
  "success": true,
  "data": {
    "alreadyCompleted": true,
    "completedAt": "2025-06-15T12:00:00.000Z",
    "message": "Deze bonusactie is al voltooid."
  }
}

Foutantwoorden

StatusFoutBeschrijving
400Ontbrekende entryId of bonusActionIdBeide padparameters zijn vereist
401Ongeldige API-sleutelAPI-sleutel ontbreekt of is ongeldig
404Inschrijving of bonusactie niet gevondenDe opgegeven resource bestaat niet