Badges
Request Details
Item | Value |
Description | Returns the details of badges available within a program. |
Method | GET |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2.1/badges?page=[page_number] &page_size=[page_size]&api_key=[api_key] |
Request Query Parameters
Field Name | Sample Value | Required | Format | Description |
page | 1 | No | Integer |
Clients can send a request for a specific page number.
|
page_size | 15 | No | Integer | Size of the page returned in the response (max of 25). If no page_size is specified, we default with 10 badges in the response. |
api_key | QWERTYP | Yes | String |
Client-configured API key. |
Response
Field Name | Sample Value | Required | Format | Description |
paging | See Response - PAGING Object. | Yes | Object | Pagination of the API response. |
badges | See Response - BADGES Object. | Yes | Object | Badges. |
Field Name |
Sample Value |
Required |
Format |
Description |
---|---|---|---|---|
total |
100 |
Yes |
Integer |
The total number of badges. |
pages |
50 |
Yes |
Integer |
The total page numbers. |
next_page | HTTPS:// API[CLIENT_ID].CROWDTWIST.COM/V2.1/ BADGES?PAGE=1&API_KEY=[API_KEY] | No | String | The URL of the next page. |
prev_page | No | String | The URL of the previous page. |
Field Name |
Sample Value |
Required |
Format |
Description |
---|---|---|---|---|
id |
456 |
Yes |
Integer |
Unique identifier of the badge. |
name |
badge_001 |
Yes |
String |
Internal unique name of the badge. |
title | Game Attendance | Yes | String | Public name of the badge. |
date_start | 2019-01-01T00:00:00.000Z | Yes | Date (ISO-8601) | Date on which the badge earn starts. |
date_end | No | Date (ISO-8601) | Date on which the badge earn ends. | |
display_date_start | 2019-01-01T00:00:00.000Z | Yes | Date (ISO-8601) | Date on which the badge starts being displayed to a member. |
display_date_end | No | Date (ISO-8601) | Date on which the badge stops being displayed to a member. | |
is_enabled | 1 | Yes | Boolean | If the badge is enabled. |
badge_states | See BADGE STATES OBJECT. | Yes | Object | Details the available badge states. |
frequency | See FREQUENCY OBJECT. | Yes | Object | Details the frequency at which a member can earn the badge. |
tags | See TAGS OBJECT. | Yes | Object | Tags linked to the badge for organization. |
segment | See SEGMENT OBJECT. | Yes | Object | Linked segment or segment group. |
BADGE STATES OBJECT | ||||
state | earned | Yes | String | State (unearned, in progress, earned). |
order | 1 | Yes | Integer | Order of badge status state. |
description | You attended a game, way to go! | No | String | Public description of the state. |
image_url | http://www.imagestorage.com/image | No | String | URL of the badge state image. |
FREQUENCY OBJECT | ||||
freq_cap | 1 | No | Integer | The number of times a member can earn the badge within the freq_period. |
freq_period_id | 1 | No | Integer | The ID of the freq_period. |
freq_period_name | Week | No | String | The name of the freq_period. |
freq_max | 5 | No | Integer | The maximum number of times a member can earn the page. |
TAGS OBJECT | ||||
tag_name | Game | No | String | Name of the linked tag. |
tag_id | 1 | No | Integer | ID of the linked tag. |
badge_extra_data | Yes | JSON array | Extra Data configured at the badge level. | |
SEGMENT OBJECT | ||||
name | Canada Members | No | String | Name of the linked segment. |
subscription_id | 1043 | No | Integer | ID of the mapped segment. |
eligibility_type | inclusion | No | String | Inclusion or exclusion. |
Sample Response