Get Badge Templates
Request
GET /organizations/<organization_id>/badge_templates
Query Param | Description |
---|---|
filter=<filter> |
Gets badge templates that match the specified filter |
sort=<sort> |
Sorts the results based on the sort parameter |
page=<page_number> |
Gets the specified page of badge templates |
Filtering
The filter
parameter has the following format: key::value
. You can combine keys for stricter searches, e.g. state::active|query::archery
.
Results can be filtered with the following keys:
Key | Description |
---|---|
query |
Partial matches on badge template name or description |
name |
Partial matches on badge template name or strict match by enclosing value in double-quotes |
public |
Matches badge templates that are public true or not false
|
reporting_tags |
Matches on reporting tags as a comma delimited list |
recommendation_ids |
Matches on recommendation ids as a comma delimited list |
skills |
Matches badge templates matching any of the skills specified as a comma delimited list |
state |
Matches badge templates in the specified state as a comma delimited list (active , archived , draft ) |
created_at_min |
Matches badge templates created on or after the specified date (YYYY-MM-DD) |
created_at_max |
Matches badge templates created on or before the specified date (YYYY-MM-DD) |
updated_at_min |
Matches badge templates where updated on or after the specified date (YYYY-MM-DD) |
updated_at_max |
Matches badge templates where updated on or before the specified date (YYYY-MM-DD) |
owner_id |
Matches badge templates owned by the given organization; allows multiple IDs delimited by comma |
collection_id |
Matches badge templates in the given collection; allows multiple IDs delimited by comma |
Sorting
The sort
parameter has the following format: key1|key2
. You can optionally include a -
to indicate descending order. e.g. -name
would return results in reverse-alphabetical order.
Results can be sorted with the following keys:
Key | Description |
---|---|
badges_count |
Number of times the badge template has been issued |
created_at |
Date when the badge template was created |
name |
Name of the badge template |
updated_at |
Date when the badge template was last updated |
Paging
At most 50 results are returned at a time. Include an optional page
parameter to fetch the next page of results.
Response
200 OK
{
"data": [
{
"primary_badge_template_id": null,
"variant_name": null,
"id": "f3d60253-ee6a-4965-be4e-1878aaf9706c",
"allow_duplicate_badges": true,
"description": "Dynamically deliver go forward e-tailers",
"default_expires_at": null,
"default_expires_at_date": null,
"default_expires_at_type": null,
"earn_this_badge_url": null,
"enable_earn_this_badge": false,
"enable_detail_attribute_visibility": true,
"global_activity_url": "https://www.example.com/foo",
"lock_badge_state": false,
"name": "Badge Template 1",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"settings_enable_related_badges": true,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-1",
"record_to_blockchain": null,
"translatable": false,
"printing_disabled": false,
"visibility": "public",
"variants_allowed": false,
"variant_type": null,
"allow_delete": true,
"allow_archive": false,
"available_locales": [
],
"only_one_skill_required": false,
"linkedin_share_default_message": "View my verified achievement from @Org_Name.",
"level": null,
"time_to_earn": null,
"cost": null,
"type_category": null,
"criteria_url_name": null,
"criteria_url": null,
"certification": true,
"state_updated_at": null,
"created_at": "2014-04-01T14:41:00.000Z",
"updated_at": "2014-04-01T14:41:00.000Z",
"show_template_settings": false,
"get_issue_count": 0,
"get_variants_issue_count": 0,
"image": {
"id": "83ee9a9d-e5d9-4c27-9387-5eba09ffb898",
"url": "/system/test/images/83ee9a9d-e5d9-4c27-9387-5eba09ffb898/fake-600x600.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.credly.com/org/organization-1/badge/badge-template-1",
"owner": {
"type": "Organization",
"id": "3978643a-fbf7-423c-865e-d011dd2428d8",
"name": "Organization 1",
"enable_blockchain": false,
"url": "https://api.credly.com/v1/organizations/3978643a-fbf7-423c-865e-d011dd2428d8",
"vanity_url": "https://www.credly.com/org/organization-1",
"vanity_slug": "organization-1",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "0e2705ac-7dae-4919-8657-88e1093f9839",
"name": "Alignment 2",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "bd2b6738-a30d-44db-b6b8-fa63d1efc4d6",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "b24165ec-be6c-433b-b3da-51b6f2fda88d",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
},
{
"id": "76633407-76f6-4f3c-a477-7d2b3671b83d",
"title": "Badge Template 2",
"activity_type": "Badge",
"activity_url": null,
"required_badge_template_id": "95f6f63a-538d-4f16-b86c-13c7f349b60a",
"required_badge_template_name": "Badge Template 2",
"required_badge_template_url": "https://www.credly.com/org/organization-1/badge/badge-template-2"
}
],
"skills": [
"Skill 1",
"Skill 2",
"Skill 3"
],
"endorsements": [
],
"reporting_tags": [
"expert",
"retail"
]
},
{
"primary_badge_template_id": null,
"variant_name": null,
"id": "95f6f63a-538d-4f16-b86c-13c7f349b60a",
"allow_duplicate_badges": true,
"description": "Dynamically deliver go forward e-tailers",
"default_expires_at": null,
"default_expires_at_date": null,
"default_expires_at_type": null,
"earn_this_badge_url": null,
"enable_earn_this_badge": false,
"enable_detail_attribute_visibility": true,
"global_activity_url": "https://www.example.com/foo",
"lock_badge_state": false,
"name": "Badge Template 2",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"settings_enable_related_badges": true,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-2",
"record_to_blockchain": null,
"translatable": false,
"printing_disabled": false,
"visibility": "public",
"variants_allowed": false,
"variant_type": null,
"allow_delete": true,
"allow_archive": false,
"available_locales": [
],
"only_one_skill_required": false,
"linkedin_share_default_message": "View my verified achievement from @Org_Name.",
"level": null,
"time_to_earn": null,
"cost": null,
"type_category": null,
"criteria_url_name": null,
"criteria_url": null,
"certification": true,
"state_updated_at": null,
"created_at": "2014-04-01T14:41:00.000Z",
"updated_at": "2014-04-01T14:41:00.000Z",
"show_template_settings": false,
"get_issue_count": 0,
"get_variants_issue_count": 0,
"image": {
"id": "1830e882-7a7f-4b2e-bb9b-a17edb79622f",
"url": "/system/test/images/1830e882-7a7f-4b2e-bb9b-a17edb79622f/fake-600x600.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.credly.com/org/organization-1/badge/badge-template-2",
"owner": {
"type": "Organization",
"id": "3978643a-fbf7-423c-865e-d011dd2428d8",
"name": "Organization 1",
"enable_blockchain": false,
"url": "https://api.credly.com/v1/organizations/3978643a-fbf7-423c-865e-d011dd2428d8",
"vanity_url": "https://www.credly.com/org/organization-1",
"vanity_slug": "organization-1",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "a5553c30-ada2-4b87-a4bd-8e8f3ca6c123",
"name": "Alignment 4",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "528bf9e3-8666-4b95-bde2-de1bb2a721be",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "c0bf2f96-7ae5-4df9-bbf3-f76e4ac8f628",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
}
],
"skills": [
"Skill 4",
"Skill 5",
"Skill 6"
],
"endorsements": [
],
"reporting_tags": [
"expert",
"retail"
]
}
],
"metadata": {
"count": 2,
"current_page": 1,
"total_count": 2,
"total_pages": 1,
"per": 50,
"previous_page_url": null,
"next_page_url": null
}
}
Get a Single Badge Template
Request
GET /organizations/<organization_id>/badge_templates/<badge_template_id>
Response
200 OK
{
"data": {
"primary_badge_template_id": null,
"variant_name": null,
"id": "5700d0ca-00af-4b55-88b0-281c73e6c920",
"allow_duplicate_badges": true,
"description": "Dynamically deliver go forward e-tailers",
"default_expires_at": null,
"default_expires_at_date": null,
"default_expires_at_type": null,
"earn_this_badge_url": null,
"enable_earn_this_badge": false,
"enable_detail_attribute_visibility": true,
"global_activity_url": "https://www.example.com/foo",
"lock_badge_state": false,
"name": "Badge Template 1",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"settings_enable_related_badges": true,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-1",
"record_to_blockchain": null,
"translatable": false,
"printing_disabled": false,
"visibility": "public",
"variants_allowed": false,
"variant_type": null,
"allow_delete": true,
"allow_archive": false,
"available_locales": [
],
"only_one_skill_required": false,
"linkedin_share_default_message": "View my verified achievement from @Org_Name.",
"level": null,
"time_to_earn": null,
"cost": null,
"type_category": null,
"criteria_url_name": null,
"criteria_url": null,
"certification": true,
"state_updated_at": null,
"created_at": "2014-04-01T14:41:00.000Z",
"updated_at": "2014-04-01T14:41:00.000Z",
"show_template_settings": true,
"get_issue_count": 0,
"get_variants_issue_count": 0,
"image": {
"id": "8a73b6b0-5b52-4eee-882e-caa9f12317ff",
"url": "/system/test/images/8a73b6b0-5b52-4eee-882e-caa9f12317ff/fake-600x600.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.credly.com/org/organization-4/badge/badge-template-1",
"owner": {
"type": "Organization",
"id": "4808bf50-cce5-403c-a876-69dad293384c",
"name": "Organization 4",
"enable_blockchain": false,
"url": "https://api.credly.com/v1/organizations/4808bf50-cce5-403c-a876-69dad293384c",
"vanity_url": "https://www.credly.com/org/organization-4",
"vanity_slug": "organization-4",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "bf459b1c-b71a-4833-a839-9805a12d7393",
"name": "Alignment 6",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "f1c9a556-d06f-4763-993b-148a89a207e7",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "7e158105-cac5-4e28-85db-fc092c76a7a0",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
}
],
"skills": [
"Skill 7",
"Skill 8",
"Skill 9"
],
"endorsements": [
],
"reporting_tags": [
"expert",
"retail"
],
"recommending_templates": [
],
"criterion_for": [
]
},
"metadata": {
}
}
Recommended Badge
When a recommendation is a Badge
, the response will contain
a recommendation type of badge
, and the related BadgeTemplate
info:
{
"data": {
"id": "d8d039fe-3f45-4590-acfb-52897e70ee6a",
"allow_duplicate_badges": true,
"description": "Dynamically deliver go forward e-tailers",
...
"recommendations": [
{
"id": "c7bebd8f-b5ab-49f9-8405-b2dc7aa4c59a",
"title": "Archery",
"type": "badge",
"recommended_badge_template_id": "aac88290-24ce-11e4-a985-b2227cce2b54",
"recommended_badge_template_name": "Archery",
"recommended_badg_template_url": "https://www.credly.com/org/organization-477/badge/badge-template-254"
}
],
}
}