API Reference
참가자
콘테스트 참가자 생성, 조회, 수정 및 관리
참가자
콘테스트 참가자 및 그들의 참가 내역을 관리합니다.
참가자 목록 조회
/api/v1/contests/:contestId/entries특정 콘테스트의 참가자 목록을 페이지네이션하여 반환합니다.
경로 매개변수
contestIdstring required 고유한 콘테스트 식별자
쿼리 매개변수
pagenumber페이지 번호, 1부터 시작. 기본값: 1
limitnumber페이지당 참가자 수 (1-100). 기본값: 20
searchstring이메일 또는 이름으로 검색 (대소문자 구분 없음)
요청
curl -X GET "https://blitzrocket.com/api/v1/contests/clx1abc123/entries?page=1&limit=10" \
-H "x-api-key: your_api_key_here"
응답
{
"success": true,
"data": [
{
"id": "entry_abc123",
"email": "jane@example.com",
"name": "Jane Doe",
"phone": null,
"points": 150,
"emailConfirmed": true,
"disqualified": false,
"referralCode": "REF-XYZ789",
"createdAt": "2025-06-15T10:30:00.000Z"
},
{
"id": "entry_def456",
"email": "john@example.com",
"name": "John Smith",
"phone": "+1234567890",
"points": 85,
"emailConfirmed": true,
"disqualified": false,
"referralCode": "REF-ABC456",
"createdAt": "2025-06-16T14:20:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1523,
"totalPages": 153
}
}
응답 필드
idstring참가자의 고유 식별자
emailstring참가자의 이메일 주소
namestring | null참가자의 이름
phonestring | null참가자의 전화번호
pointsnumber획득한 총 포인트
emailConfirmedboolean이메일 확인 여부
disqualifiedboolean참가 자격 박탈 여부
referralCodestring | null이 참가자에 대한 고유 추천 코드
createdAtstring참가자가 생성된 ISO 8601 타임스탬프
참가자 상세 조회
/api/v1/entries/:entryId특정 참가자에 대한 상세 정보를 조회합니다.
경로 매개변수
entryIdstring required 고유 참가자 식별자
요청
curl -X GET https://blitzrocket.com/api/v1/entries/entry_abc123 \
-H "x-api-key: your_api_key_here"
응답
{
"success": true,
"data": {
"id": "entry_abc123",
"email": "jane@example.com",
"name": "Jane Doe",
"phone": null,
"points": 150,
"pointsUsed": 25,
"emailConfirmed": true,
"disqualified": false,
"referralCode": "REF-XYZ789",
"contestId": "clx1abc123def456",
"contestTitle": "Summer Giveaway 2025",
"referralsCount": 3,
"bonusActionsCompleted": 5,
"totalPurchaseValue": 129.99,
"totalPurchaseCount": 2,
"createdAt": "2025-06-15T10:30:00.000Z"
}
}
참가자 생성
/api/v1/contests/:contestId/entries콘테스트에 새 참가자를 생성합니다. 비공개 API 키가 필요합니다.
경로 매개변수
contestIdstring required 고유한 콘테스트 식별자
요청 본문
emailstring참가자의 이메일 주소입니다. 이메일 또는 전화번호 중 하나는 필수입니다.
phonestring참가자의 전화번호입니다. 이메일 또는 전화번호 중 하나는 필수입니다.
namestring참가자의 이름 (선택 사항)
referralCodestring다른 참가자로부터 받은 추천 코드 (선택 사항)
customFieldDataobject사용자 정의 필드 데이터 객체 (선택 사항)
요청
curl -X POST https://blitzrocket.com/api/v1/contests/clx1abc123/entries \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"name": "New User",
"referralCode": "REF-XYZ789"
}'
응답 (201 Created)
{
"success": true,
"data": {
"entryId": "entry_new789",
"email": "newuser@example.com",
"alreadyExists": false,
"isReferred": true,
"pointsAwarded": {
"advocate": 10,
"friend": 5
}
}
}
이메일이 이미 대회에 존재하는 경우, 응답에는 "alreadyExists": true가 포함되며 상태 코드는 200 OK가 됩니다.
참가 정보 수정
/api/v1/entries/:entryId기존 참가 정보 업데이트. 최소 하나 이상의 필드를 제공해야 합니다.
경로 매개변수
entryIdstring required 고유 참가자 식별자
요청 본문
namestring수정된 이름
emailstring수정된 이메일 주소
phonestring수정된 전화번호
customFieldDataobject수정된 사용자 정의 필드 데이터
요청
curl -X PUT https://blitzrocket.com/api/v1/entries/entry_abc123 \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Updated",
"phone": "+1987654321"
}'
응답
{
"success": true,
"data": {
"id": "entry_abc123",
"email": "jane@example.com",
"name": "Jane Updated",
"phone": "+1987654321",
"points": 150
}
}
참가 자격 박탈
/api/v1/entries/:entryId/disqualify참가 자격을 박탈하거나 재자격을 부여합니다.
경로 매개변수
entryIdstring required 고유 참가자 식별자
요청 본문
disqualifybooleantrue로 설정하면 자격 박탈, false로 설정하면 재자격 부여. 생략 시 토글 동작.
요청
curl -X POST https://blitzrocket.com/api/v1/entries/entry_abc123/disqualify \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{"disqualify": true}'
응답
{
"success": true,
"data": {
"entryId": "entry_abc123",
"disqualified": true,
"message": "Entry has been disqualified"
}
}
포인트 조정
/api/v1/entries/:entryId/points엔트리의 포인트를 추가하거나 차감합니다. 포인트는 0 미만으로 내려갈 수 없습니다.
경로 매개변수
entryIdstring required 고유한 엔트리 식별자
요청 본문
pointsnumber required 추가할(양수) 또는 차감할(음수) 포인트
reasonstring required 조정 사유
요청
curl -X POST https://blitzrocket.com/api/v1/entries/entry_abc123/points \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"points": 50,
"reason": "Bonus for completing survey"
}'
응답
{
"success": true,
"data": {
"message": "Successfully added 50 points",
"previousTotal": 150,
"newTotal": 200,
"adjustment": 50
}
}
포인트를 차감하려면 음수 값을 사용하세요:
{
"points": -25,
"reason": "Penalty for rule violation"
}
오류 응답
| 상태 코드 | 오류 | 설명 |
|---|---|---|
400 | points 또는 reason 누락 | 두 필드 모두 필수입니다 |
403 | 개인 키 필요 | 이 엔드포인트는 개인 API 키가 필요합니다 |
404 | 엔트리 없음 | 해당 ID의 엔트리가 존재하지 않습니다 |