HomeREST APIBadge

Badge

Reference for the badge endpoints of the Interact REST API.

Note: All endpoints require authentication and an X-Tenant header. 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"
      }
    ]
  }
}
FieldType
Resultobject

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"
}
FieldType
Idinteger (int32)
Namestring
Typestring

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"
  }
}
FieldType
Resultobject

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"
      }
    ]
  }
}
FieldType
Resultobject

POST /api/badge/assign

Assign badges.

🔒Access — Site admin

Request body

{
  "PersonBadges": [
    {
      "PersonId": 0,
      "BadgeId": 0
    }
  ],
  "SendNotifications": true
}
FieldType
PersonBadgesarray of object
SendNotificationsboolean

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
    }
  ]
}
FieldType
Resultarray of object

POST /api/badge/create

Create a new badge

🔒Access — Site admin

Request body

{
  "Title": "string",
  "Description": "string",
  "Active": true,
  "AssetId": 0
}
FieldType
Titlestring
Descriptionstring
Activeboolean
AssetIdinteger (int32)

Responses

Status Body
200 See below
400

Response body

{
  "Result": {
    "BadgeId": 0,
    "HasFailed": true
  }
}
FieldType
Resultobject

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
}
FieldType
Idinteger (int32)
Titlestring
Descriptionstring
Activeboolean
AssetIdinteger (int32)

Responses

Status Body
200 See below
400

Response body

{
  "Result": {
    "Success": true
  }
}
FieldType
Resultobject

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
  ]
}
FieldType
PersonIdsarray 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
    }
  ]
}
FieldType
Resultsarray 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"
    }
  ]
}
FieldType
Totalinteger (int32)
AssignedBadgesarray 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
Section: REST API