Filipino
Filipino
Appearance
Filipino
Filipino
Appearance
Pamahalaan ang mga badge template — ang mga credential na ibinibigay ninyo sa mga tatanggap.
Lahat ng endpoint ay nangangailangan ng authentication sa pamamagitan ng X-Api-Key header. Tingnan ang Authentication.
Gumawa ng bagong badge sa ilalim ng verified issuer.
POST /badges| Parameter | Uri | Kailangan | Paglalarawan |
|---|---|---|---|
name | string | Oo | Pamagat ng badge |
description | string | Oo | Kung ano ang kinakatawan ng badge |
criteria | string | Oo | Kung ano ang ginawa ng tatanggap para makamit ang badge na ito |
image | string | Oo | Base64-encoded na larawan (PNG o JPG) |
issuerId | string | Oo | Ang ID ng verified issuer |
curl -X POST https://api.badges.ninja/badges \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"name": "JavaScript Fundamentals",
"description": "Demonstrates proficiency in core JavaScript concepts",
"criteria": "Completed the JavaScript Fundamentals course with a score of 80% or higher",
"image": "data:image/png;base64,iVBORw0KGgo...",
"issuerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}'{
"statusCode": 200,
"info": {
"badgeId": "https://api.badges.ninja/certify-badge/badge/b1c2d3e4-f5a6-7890-bcde-f12345678901"
}
}Kunin ang lahat ng badge na ginawa ninyo.
GET /badgescurl -X GET https://api.badges.ninja/badges \
-H "X-Api-Key: bws_your_api_key_here"{
"statusCode": 200,
"info": {
"badges": [
{
"id": "https://api.badges.ninja/certify-badge/badge/b1c2d3e4-...",
"name": "JavaScript Fundamentals",
"description": "Demonstrates proficiency in core JavaScript concepts",
"criteria": { "narrative": "Completed the JavaScript Fundamentals course..." },
"image": "https://ipfs.ninja/ipfs/Qm...",
"issuer": "https://api.badges.ninja/certify-badge/issuer/a1b2c3d4-...",
"timestamp": "2025-01-15T10:30:00.000Z"
}
]
}
}I-update ang isang umiiral na badge. Ang mga field lang na ibibigay ninyo ang mababago.
PUT /badges/{badgeId}| Parameter | Uri | Kailangan | Paglalarawan |
|---|---|---|---|
badgeId | string | Oo | Ang badge ID (path parameter) |
name | string | Hindi | Bagong pamagat ng badge |
description | string | Hindi | Bagong paglalarawan |
criteria | string | Hindi | Bagong criteria |
image | string | Hindi | Bagong base64-encoded na larawan |
curl -X PUT https://api.badges.ninja/badges/b1c2d3e4-f5a6-7890-bcde-f12345678901 \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"badgeId": "b1c2d3e4-f5a6-7890-bcde-f12345678901",
"name": "JavaScript Fundamentals v2",
"description": "Updated description for the JS badge"
}
}'{
"statusCode": 200,
"info": {
"badgeId": "https://api.badges.ninja/certify-badge/badge/b1c2d3e4-...",
"updated": true
}
}Itakda ang custom text na ipapakita kapag ibinahagi ng mga tatanggap ang badge na ito sa social media.
PUT /badges/{badgeId}/share-text| Parameter | Uri | Kailangan | Paglalarawan |
|---|---|---|---|
badgeId | string | Oo | Ang badge ID (path parameter) |
text | string | Oo | Share text (walang HTML na pinapayagan) |
curl -X PUT https://api.badges.ninja/badges/b1c2d3e4-f5a6-7890-bcde-f12345678901/share-text \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"badgeId": "b1c2d3e4-f5a6-7890-bcde-f12345678901",
"text": "I just earned the JavaScript Fundamentals badge! Check it out:"
}
}'{
"statusCode": 200,
"info": {
"updated": true
}
}Burahin ang isang badge. Ang badge ay hindi dapat may mga award.
DELETE /badges/{badgeId}curl -X DELETE https://api.badges.ninja/badges/b1c2d3e4-f5a6-7890-bcde-f12345678901 \
-H "X-Api-Key: bws_your_api_key_here"{
"statusCode": 200,
"info": {
"deleted": true
}
}400 — may mga award ang badge at hindi mabubura404 — hindi nahanap ang badge