GET /api/v1/classes/{classId}/cardsν€λ | κ° | νμ |
X-API-Key | λ°κΈλ°μ API ν€ | β
|
{
"success": true,
"data": {
"cards": [
{
"templateId": "abc123",
"type": "reward",
"points": 5,
"description": "μμ
μ κ·Ή μ°Έμ¬",
"categoryId": "cat_collab",
"categoryName": "νμ
"
}
]
},
"message": "μλ μΉ΄λ λͺ©λ‘ μ‘°νμ μ±κ³΅νμ΅λλ€."
}νλ | μ€λͺ
|
templateId | μΉ΄λ λΆμ¬ μ μ¬μ©νλ μΉ΄λ ID |
type | reward(μΉμ°¬) / penalty(λ
Έλ ₯) |
points | μΉ΄λμ μ€μ λ μ μ |
description | μΉ΄λ μ€λͺ
|
categoryId / categoryName | μ°κ²°λ μλ μΉ΄ν
κ³ λ¦¬ (μμΌλ©΄ null) |
POST /api/v1/classes/{classId}/students/{studentCode}/cardsνλΌλ―Έν° | νμ
| μ€λͺ
|
classId | string | ν΄λμ€ ID |
studentCode | number | νμ λ²νΈ(μΆμλ²νΈ) |
νλ | νμ
| νμ | μ€λͺ
|
templateId | string | β
| λΆμ¬ν μλ μΉ΄λ ID (λͺ©λ‘ μ‘°νλ‘ νλ) |
source | string | β | μΆμ² μλ³μ (κΈ°λ³Έκ° "cardTemplate") |
metadata | object | β | μΆκ° λ°μ΄ν° |
curl -X POST \
"https://growndcard.com/api/v1/classes/CLASS_ID/students/2/cards" \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_xxx" \
-d '{ "templateId": "abc123", "source": "QuizApp" }'{
"success": true,
"data": {
"recordId": "rec_xyz",
"studentId": "stu_abc",
"studentCode": 2,
"type": "reward",
"pointsAwarded": 5,
"bonusApplied": 1,
"totalPoints": 155,
"currentLevel": 5,
"leveledUp": false,
"createdAt": "2026-06-15T01:23:45.000Z",
"templateId": "abc123",
"categoryId": "cat_collab"
},
"message": "μλ μΉ΄λκ° μ±κ³΅μ μΌλ‘ λΆμ¬λμμ΅λλ€."
}μν | μ½λ | μ€λͺ
|
400 | invalid_student_code | νμ λ²νΈ λλ½ |
400 | invalid_template_id | templateId λλ½ λλ νμ μ€λ₯ |
401 | unauthorized | API ν€ λλ½/λ¬΄ν¨ |
403 | insufficient_permissions | awardPoints κΆν μμ |
403 | forbidden | ν΄λΉ ν΄λμ€ μ κ·Ό κΆν μμ |
404 | card_not_found | ν΄λΉ μλ μΉ΄λ μμ |
404 | student_not_found | νμμ μ°Ύμ μ μμ |
429 | rate_limit_exceeded | νΈμΆ μ ν μ΄κ³Ό |
500 | invalid_card_template | μΉ΄λ ν
νλ¦Ώ λ°μ΄ν° μμ(type/points μ΄μ) |
500 | internal_error | μλ² λ΄λΆ μ€λ₯ |