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 (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 |
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": [
{
"id": "216a37a4-4a79-411f-811d-05d1b561d230",
"allow_duplicate_badges": true,
"cost": null,
"description": "Dynamically deliver go forward e-tailers",
"global_activity_url": "https://www.example.com/foo",
"level": null,
"lock_badge_state": false,
"name": "Badge Template 1",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-1",
"record_to_blockchain": null,
"time_to_earn": null,
"type_category": null,
"printing_disabled": false,
"visibility": "public",
"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,
"image": {
"id": "73218b56-0713-4eeb-bdaa-939e010c1701",
"url": "https://cdn.example.com/path/to/image.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.youracclaim.com/org/organization-4/badge/badge-template-1",
"owner": {
"type": "Organization",
"id": "896bcba9-ff7a-46c5-a226-9dc0ab0d9a1a",
"name": "Organization 4",
"enable_blockchain": false,
"url": "https://api.youracclaim.com/v1/organizations/896bcba9-ff7a-46c5-a226-9dc0ab0d9a1a",
"vanity_url": "https://www.youracclaim.com/org/organization-4",
"vanity_slug": "organization-4",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "7189030d-48c9-4171-a5c8-1452b59536e7",
"name": "Alignment 7",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "f110095f-d0d2-4a4b-ba79-241476c2cb1e",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "307425d1-f3bd-4d7e-8503-4c0960d1d829",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
},
{
"id": "638db9f4-e891-4eb8-bf00-87c8a61f0159",
"title": "Badge Template 2",
"activity_type": "Badge",
"activity_url": null,
"required_badge_template_id": "f0766662-ff40-4537-9f80-bd9f0a0af2dc",
"required_badge_template_name": "Badge Template 2",
"required_badge_template_url": "http://www.youracclaim.com/org/organization-4/badge/badge-template-2"
}
],
"skills": [
"Skill 7"
],
"reporting_tags": [
"expert",
"retail"
]
},
{
"id": "f0766662-ff40-4537-9f80-bd9f0a0af2dc",
"allow_duplicate_badges": true,
"cost": null,
"description": "Dynamically deliver go forward e-tailers",
"global_activity_url": "https://www.example.com/foo",
"level": null,
"lock_badge_state": false,
"name": "Badge Template 2",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-2",
"record_to_blockchain": null,
"time_to_earn": null,
"type_category": null,
"printing_disabled": false,
"visibility": "public",
"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,
"image": {
"id": "313ab318-d30d-4dae-86cc-f35e4c08c1f0",
"url": "https://cdn.example.com/path/to/image.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.youracclaim.com/org/organization-4/badge/badge-template-2",
"owner": {
"type": "Organization",
"id": "896bcba9-ff7a-46c5-a226-9dc0ab0d9a1a",
"name": "Organization 4",
"enable_blockchain": false,
"url": "https://api.youracclaim.com/v1/organizations/896bcba9-ff7a-46c5-a226-9dc0ab0d9a1a",
"vanity_url": "https://www.youracclaim.com/org/organization-4",
"vanity_slug": "organization-4",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "85e64534-11ef-4524-a910-f5bd2c857770",
"name": "Alignment 8",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "ea2d8428-06dc-49a2-be1e-52f9bb2b628d",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "7ecdb3d7-7d2a-415b-9525-465fc984a231",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
}
],
"skills": [
"Skill 8"
],
"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": {
"id": "823a5e0c-1d8d-4801-a5c8-bd4e3a776a4c",
"allow_duplicate_badges": true,
"cost": null,
"description": "Dynamically deliver go forward e-tailers",
"global_activity_url": "https://www.example.com/foo",
"level": null,
"lock_badge_state": false,
"name": "Badge Template 7",
"state": "active",
"public": true,
"badges_count": 0,
"recipient_type": "User",
"send_expiring_badge_notifications": false,
"show_badge_lmi": false,
"show_lmi_jobs": false,
"show_skill_tag_links": true,
"vanity_slug": "badge-template-7",
"record_to_blockchain": null,
"time_to_earn": null,
"type_category": null,
"printing_disabled": false,
"visibility": "public",
"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,
"image": {
"id": "f032be87-358b-4ec0-a644-1b08427085db",
"url": "https://cdn.example.com/path/to/image.png"
},
"image_url": "https://cdn.example.com/path/to/image.png",
"url": "https://www.youracclaim.com/org/organization-5/badge/badge-template-7",
"owner": {
"type": "Organization",
"id": "b4deef45-9e00-4809-be6b-a6835a8f350e",
"name": "Organization 5",
"enable_blockchain": false,
"url": "https://api.youracclaim.com/v1/organizations/b4deef45-9e00-4809-be6b-a6835a8f350e",
"vanity_url": "https://www.youracclaim.com/org/organization-5",
"vanity_slug": "organization-5",
"verified": true,
"viewable": true
},
"alignments": [
{
"id": "d78412c2-8fce-4426-9b75-a95e3940e21a",
"name": "Alignment 9",
"url": "http://www.example.com/alignment",
"description": "Self-enabling cohesive task-force"
}
],
"recommendations": [
{
"id": "1708042b-f4cd-4825-ba72-54e6bc1e5ab0",
"title": "Recommendation Title",
"type": "information",
"activity_url": "http://www.example.com/recommendation"
}
],
"required_badge_templates": [
],
"badge_template_activities": [
{
"id": "ba50438c-5f3e-46bc-a32a-2f66c1d3059d",
"title": "Kickboxing Activity",
"activity_type": "Schedule / Registration",
"activity_url": "http://www.example.com/awesomepage",
"required_badge_template_id": null
}
],
"skills": [
"Skill 9"
],
"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.youracclaim.com/org/organization-477/badge/badge-template-254"
}
],
}
}