Programmes
This article documents how to perform actions via the API relating to programmes. Ensure that the appropriate authentication headers are configured when sending these requests.
Service location
The endpoint you need to use is based on which environment is hosting your PACE system. You can find this out by checking your normal login link. Make your selection below and all examples will be tailored to your environment.
Schema
Programme records will be returned in the following format
{
"UserGuid": Guid,
"UserId": string,
"FirstName": string,
"LastName": string,
"FullName": string,
"IsLocked": boolean,
"UserStatus": string, // Active | Archived | Suspended | Long term absent
"ParentOrganisation": string,
"Organisation": string,
"OverallCompliance": string, // Compliant | Non Compliant
"ProgrammeCount": integer,
"Programmes": [
{
"ProgrammeName": string,
"ProgrammeCompliance": string ,
"CompletedDate": nullable DateTime
}
// Array of enabled programmes and statuses
]
}
Retrieve all programmes
get api/programmes
This action will return all assessment instances within your PACE Administration system. This action also supports the Pagination of records functionality.
Example request
Send a GET
request to https://online.cardinus.com/api/Programmes
. This will produce a result object containing a
summary of the data and a collection of user instances from the database.
Example response
{
"PageNumber": 1,
"PageSize": 100,
"FirstPage": "https://online.cardinus.com/api/Programmes/Filter?pageNumber=1&pageSize=100",
"LastPage": "https://online.cardinus.com/api/Programmes/Filter?pageNumber=1&pageSize=100",
"TotalPages": 1,
"TotalRecords": 10,
"NextPage": null,
"PreviousPage": null,
"ItemsCount": 1,
"Items": [
{
"UserGuid": "1e8cced3-0b61-460e-aaaa-22e81fba89d3",
"UserId": "cnorwood",
"FirstName": "Charles",
"LastName": "Norwood",
"FullName": "Charles Norwood",
"Enabled": true,
"IsLocked": false,
"UserStatus": "Archived",
"ParentOrganisation": "N/A",
"Organisation": "Compliance Office",
"OverallCompliance": "Not Compliant",
"ProgrammeCount": 3,
"Programmes": [
{
"ProgrammeName": "Healthy Working",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
},
{
"ProgrammeName": "Fire Safety",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
},
{
"ProgrammeName": "Manual Handling",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
}
]
},
etc...
],
"Succeeded": true,
"Errors": null,
"Message": null
}
Retrieve programmes by user
get api/programmes/{userid}
This action will return programmes created for a specific user via the parameter passed in on the request. The parameter is the user's unique identifier in a GUID format.
Parameter | Description | Location |
---|---|---|
userid |
User ID in a GUID format | URL |
Example request
Send a GET
request to https://online.cardinus.com/api/Programmes/{userid}
. The resulting data will be a collection
of programmes restricted to the given user.
https://online.cardinus.com/api/Programmes/65467435-7ae9-e211-a494-00155d145c00
Example response
{
"PageNumber": 1,
"PageSize": 100,
"FirstPage": "https://online.cardinus.com/api/Programmes?pageNumber=1&pageSize=2",
"LastPage": "https://online.cardinus.com/api/Programmes?pageNumber=7705&pageSize=2",
"TotalPages": 1,
"TotalRecords": 1,
"NextPage": "https://online.cardinus.com/api/Programmes?pageNumber=2&pageSize=2",
"PreviousPage": null,
"ItemsCount": 1,
"Items": [
{
"UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
"UserId": "admin",
"FirstName": "Brad",
"LastName": "Storch",
"FullName": "Brad Storch",
"IsLocked": false,
"UserStatus": "Active",
"ParentOrganisation": "N/A",
"Organisation": "Edinburgh",
"OverallCompliance": "Not Compliant",
"ProgrammeCount": 2,
"Programmes": [
{
"ProgrammeName": "Healthy Working",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
},
{
"ProgrammeName": "Fire Safety",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
}
]
}
],
"Succeeded": true,
"Errors": null,
"Message": null
}
Filter programmes
post api/programmes/filter
This action will retrieve all programmes depending on the parameters passed in the body. The body is in JSON format and providing no parameters will default to all programmes.
Parameter | Description | Location |
---|---|---|
assessment details | The filtering query options to restrict the result set | Request body |
Important
The content-type
header must be included and set to application/json
.
Example request
Send a POST
request to https://online.cardinus.com/api/Programmes/Filter
with search criteria in the body as specified below. The
response will contain filtered results. Each property is applied using the AND logical operator.
The JSON schema including all the properties that can be used to filter data:
{
"UserId": string,
"FirstName": string,
"LastName": string,
"FullName": string,
"Islocked": boolean,
"UserStatus": string,
"OrganisationName": string,
"ProgrammeName": string,
"ProgrammeCompliance": string,
"ProgrammesCompletedYesterday": boolean,
"OnOrBeforeDate": DateTime, // yyyy-MM-dd e.g. "2024-01-01"
"OnOrAfterDate": DateTime // yyyy-MM-dd e.g. "2024-01-01"
}
For example, to retrieve only programmes associated with archived users you can use this filter:
{
"UserStatus": "archived"
}
Example response
{
"PageNumber": 1,
"PageSize": 100,
"FirstPage": "https://online.cardinus.com/api/Programmes/Filter?pageNumber=1&pageSize=100",
"LastPage": "https://online.cardinus.com/api/Programmes/Filter?pageNumber=1&pageSize=100",
"TotalPages": 1,
"TotalRecords": 10,
"NextPage": null,
"PreviousPage": null,
"ItemsCount": 1,
"Items": [
{
"UserGuid": "1e8cced3-0b61-460e-aaaa-22e81fba89d3",
"UserId": "cnorwood",
"FirstName": "Charles",
"LastName": "Norwood",
"FullName": "Charles Norwood",
"Enabled": true,
"IsLocked": false,
"UserStatus": "Archived",
"ParentOrganisation": "N/A",
"Organisation": "Compliance Office",
"OverallCompliance": "Not Compliant",
"ProgrammeCount": 3,
"Programmes": [
{
"ProgrammeName": "Healthy Working",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
},
{
"ProgrammeName": "Fire Safety",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
},
{
"ProgrammeName": "Manual Handling",
"ProgrammeCompliance": "Not Compliant",
"CompletedDate": null
}
]
}
],
"Succeeded": true,
"Errors": null,
"Message": null
}
Retrieve an overview of all programmes
get api/programmes/overview
This action will give an overview of relevant data for all programmes in the PACE Administration system.
Example request
Send a GET
request to https://online.cardinus.com/api/programmes/overview
with no parameters to get the overview of programme
data in your PACE system.
Example response
{
"Count": 15410
}