Badge
Note: All endpoints require authentication and an
X-Tenantheader. See Authentication overview and How to get API information. Paths are relative to your intranet's API base URL. An Access line appears where an endpoint needs more than a signed-in user.
Endpoints on this page
GET /api/badge
Get all badges.
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit |
query | integer (int32) | No | |
offset |
query | integer (int32) | No | |
activeOnly |
query | boolean | No | |
searchTerm |
query | string | No | |
order |
query | string | No |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 | |
| 404 |
Response body
{
"Result": {
"Total": 0,
"Results": [
{
"Id": 0,
"AssetId": 0,
"Name": "string",
"Description": "string",
"Active": true,
"CreatedDateUtc": "2024-01-01T00:00:00Z",
"AssignedPersonCount": 0,
"AssetUrl": "string"
}
]
}
}| Field | Type |
|---|---|
Result | object |
GET /api/badge/organisation-search
Returns a list of Organisations that can be used to filter people assigned to a badge
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
searchTerm |
query | string | No | |
excludeTypes |
query | array of string | No |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 |
Response body
{
"Id": 0,
"Name": "string",
"Type": "string"
}| Field | Type |
|---|---|
Id | integer (int32) |
Name | string |
Type | string |
GET /api/badge/{badgeId}
Get a badge by Id
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
badgeId |
path | integer (int32) | Yes |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 | |
| 404 |
Response body
{
"Result": {
"Id": 0,
"AssetId": 0,
"Name": "string",
"Description": "string",
"Active": true,
"CreatedDateUtc": "2024-01-01T00:00:00Z",
"AssignedPersonCount": 0,
"AssetUrl": "string"
}
}| Field | Type |
|---|---|
Result | object |
GET /api/badge/{badgeId}/assigned
Get assigned users to a badge
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
badgeId |
path | integer (int32) | Yes | |
badgeAssigneeParams.badgeId |
query | integer (int32) | No | |
badgeAssigneeParams.limit |
query | integer (int32) | No | |
badgeAssigneeParams.offset |
query | integer (int32) | No | |
badgeAssigneeParams.orderByColumn |
query | string | No | |
badgeAssigneeParams.orderDirection |
query | string | No | |
badgeAssigneeParams.searchTerm |
query | string | No | |
badgeAssigneeParams.organisationIds |
query | array of integer | No |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 |
Response body
{
"Result": {
"Total": 0,
"Badge": {
"Id": 0,
"Name": "string"
},
"Results": [
{
"PersonId": 0,
"AssetId": 0,
"Firstname": "string",
"Surname": "string",
"Fullname": "string",
"Email": "string",
"PrimaryLocationTitle": "string",
"PrimaryCompanyTitle": "string",
"PrimaryDepartmentTitle": "string",
"ManagerFirstname": "string",
"ManagerSurname": "string",
"ManagerFullname": "string"
}
]
}
}| Field | Type |
|---|---|
Result | object |
POST /api/badge/assign
Assign badges.
🔒Access — Site admin
Request body
{
"PersonBadges": [
{
"PersonId": 0,
"BadgeId": 0
}
],
"SendNotifications": true
}| Field | Type |
|---|---|
PersonBadges | array of object |
SendNotifications | boolean |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 500 |
Response body
{
"Result": [
{
"PersonId": 0,
"BadgeId": 0,
"BadgeName": "string",
"PersonName": "string",
"AssignSuccess": true,
"MissingPerson": true,
"MissingBadge": true,
"AlreadyAssigned": true
}
]
}| Field | Type |
|---|---|
Result | array of object |
POST /api/badge/create
Create a new badge
🔒Access — Site admin
Request body
{
"Title": "string",
"Description": "string",
"Active": true,
"AssetId": 0
}| Field | Type |
|---|---|
Title | string |
Description | string |
Active | boolean |
AssetId | integer (int32) |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 |
Response body
{
"Result": {
"BadgeId": 0,
"HasFailed": true
}
}| Field | Type |
|---|---|
Result | object |
PUT /api/badge/{badgeId}/edit
Edit a badge's details
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
badgeId |
path | integer (int32) | Yes |
Request body
{
"Id": 0,
"Title": "string",
"Description": "string",
"Active": true,
"AssetId": 0
}| Field | Type |
|---|---|
Id | integer (int32) |
Title | string |
Description | string |
Active | boolean |
AssetId | integer (int32) |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 |
Response body
{
"Result": {
"Success": true
}
}| Field | Type |
|---|---|
Result | object |
DELETE /api/badge/{badgeId}/unassign
Unassign users from a badge
🔒Access — Site admin
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
badgeId |
path | integer (int32) | Yes |
Request body
{
"PersonIds": [
0
]
}| Field | Type |
|---|---|
PersonIds | array of integer |
Responses
| Status | Body |
|---|---|
| 200 | See below |
Response body
{
"Results": [
{
"PersonId": 0,
"PersonName": "string",
"BadgeId": 0,
"UnassignSuccess": true,
"MissingPerson": true,
"NotAssigned": true,
"MissingBadge": true
}
]
}| Field | Type |
|---|---|
Results | array of object |
GET /api/people/{personId}/badge
Get a list of badges assigned to the specified user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
personId |
path | integer (int32) | Yes | |
limit |
query | integer (int32) | No | |
offset |
query | integer (int32) | No | |
includePaging |
query | boolean | No |
Responses
| Status | Body |
|---|---|
| 200 | See below |
| 400 | |
| 404 |
Response body
{
"Total": 0,
"AssignedBadges": [
{
"Id": 0,
"AssetId": 0,
"Name": "string",
"Description": "string",
"AssignedDateUtc": "2024-01-01T00:00:00Z",
"AssetUrl": "string"
}
]
}| Field | Type |
|---|---|
Total | integer (int32) |
AssignedBadges | array of object |
GET /api/people/{personId}/badge/{badgeId}
Get a specific badge assigned to the specified user.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
personId |
path | integer (int32) | Yes | |
badgeId |
path | integer (int32) | Yes |
Responses
| Status | Body |
|---|---|
| 200 | object |
| 404 |