© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 8 - Attendance V3 APIs (23/3/21)

Attendance Service V3 - Release version

Status: Live - Updated 23/3/21

There are some key changes for V3 release which are:

  1. Reference types have been updated and are different in many places.
  2. 'Null Marks' will exist and be returned.  These are placeholders for future marks to be recorded.  These may have nulls for most fields including present and absent.  As such class definitions for deserialization need to reflect this,
  3. Attendance Codes are currently one character but may may be up to 10 characters at a future time without the need to change the code or advanced notification.
  4. Present and absent are now read only and set based on the attendance code selected.
  5. Calls still need a date range filter.
  6. Calls to get attendance lookups and subsequent filtering of the response to get a list of attendance codes has changed in line with the reference types above. 

NB: There is nothing fundamentally different in the data returned by the new version of the call with the exception that future marks, holidays and weekend marks are returned. 

Attendance Service Metadata

{
  "@odata.context": "https://sest00apm01.azure-api.net/ssst06/Attendance/V3/$metadata",
  "value": [
    {
      "name": "AttendanceLookups",
      "kind": "EntitySet",
      "url": "AttendanceLookups"
    },
    {
      "name": "AttendanceRecords",
      "kind": "EntitySet",
      "url": "AttendanceRecords"
    },
    {
      "name": "AttendanceRecordHistorys",
      "kind": "EntitySet",
      "url": "AttendanceRecordHistorys"
    },
    {
      "name": "AttendanceSessions",
      "kind": "EntitySet",
      "url": "AttendanceSessions"
    }
  ]
}

Example Call

<Stem>/Attendance/V3/AttendanceRecords?$filter=AttendableEventStart gt 2018-01-04T00:00:00Z and AttendableEventStart lt 2018-01-04T23:00:00Z

Contract V3 - Release

    [JsonObject(MemberSerialization.OptIn)]
    public class TAttendanceRecord
    {
        [JsonProperty]
        public Guid ExternalID;
        [JsonProperty]
        public Nullable<bool> Present;
        [JsonProperty]
        public Nullable<bool> Absent;
        [JsonProperty]
        public TAttendanceRecorder RecordedBy;
        public Nullable<DateTime> RecordedOn;
        [JsonProperty]
        public string ChangeProcessName;
        [JsonProperty]
        public string AttendableEventStart;
        [JsonProperty]
        public TLearnerIdentifier Attendee;
        [JsonProperty]
        public TAttendanceStatutorySessions Event;
        [JsonProperty]
        public TAttendance_Code AttendanceCode;
        [JsonProperty]
        public TAttendanceQualifier Qualifier;
    }
    public class TAttendance_Code : TAttendanceLookups
    {
    }
    public class TAttendanceLookups
    {
        public Guid ExternalID;
        public string Code;
        public string Description;
        public string LookupType;
        public TResourceProvider ResourceProvider;
        public Nullable<int> DisplayOrder;
        public Nullable<bool> IsVisible;
    }
    public class TAttendanceStatutorySessions : TAttendableEvent
    {
    }
    public class TAttendableEvent
    {
        public Guid ExternalID;
        public string Name;
        public string Description;
        public Nullable<Guid> SessionType;
        public Nullable<DateTime> StartDateTime;
        public Nullable<DateTime> EndDateTime;
    }
    public class TAttendanceRecorder
    {
        public Guid ExternalID;
        public string Type;
   }
   public class TAttendanceQualifier
    {
        public Guid ExternalID;
        public Nullable<int> MinutesLate;
        public string Comments;
   }

 

Response (Attendance Record) V3 - Release

{
    "@odata.context": "https://sepr00apm01.azure-api.net/sspr01/Attendance/V3/$metadata#AttendanceRecords",
    "value": [
        {
            "ExternalID": "39c19e69-10d1-465b-88e8-00072668f66e",
            "Present": null,
            "Absent": null,
            "RecordedOn": "2018-01-04T13:55:16Z",
            "ChangeProcessName": "UI_Title_TakeRegister - 2GH - Mrs G Grosvenor & Mrs S Boston",
            "AttendableEventStart": "2018-01-04T13:00:00Z",
            "RecordedBy": {
                "ExternalID": "de692c52-c1ca-4bcc-a201-8f125c133a17",
                "Type": "AuthorisedUser.Personal"
            },
            "Attendee": {
                "ExternalID": "0a154121-3135-41eb-8ac9-1468c65c75b1",
                "Type": "Learner.Identifier"
            },
            "Event": {
                "ExternalID": "787a534a-9c17-409e-90c2-7b6fd8f16770",
                "Type": "Attendance.StatutoryAttendanceSession"
            },
            "AttendanceCode": {
                "ExternalID": "819e702f-458a-4ca3-a284-93304c63ede0",
                "Type": "Attendance.Lookup.AttendanceCode"
            },
            "Qualifier": {
                "MinutesLate": null,
                "Comment": null
            }
        },
        {
            "ExternalID": "cafa0dab-07a5-4e0c-bf64-0011e4c66d77",
            "Present": null,
            "Absent": null,
            "RecordedOn": null,
            "ChangeProcessName": null,
            "AttendableEventStart": "2018-01-04T13:00:00Z",
            "RecordedBy": null,
            "Attendee": {
                "ExternalID": "58026a39-22c6-4d70-a8b0-d111bfbca5be",
                "Type": "Learner.Identifier"
            },
            "Event": {
                "ExternalID": "787a534a-9c17-409e-90c2-7b6fd8f16770",
                "Type": "Attendance.StatutoryAttendanceSession"
            },
            "AttendanceCode": null,
            "Qualifier": {
                "MinutesLate": null,
                "Comment": null
            }
        },
        

For completeness, we include the previous versions of the calls.

 

Writing Attendance Marks Back - Single mark

Example call:  POST : https://seli00apm01.azure-api.net/ssli01/Attendance/V3/AttendanceRecords

Body

{
  "Attendee" : {
      "ExternalID":"3fe741a5-5256-4cee-a814-88fc388aa068",
      "Type":"Learner.Identifier"
  },
"Event" : {
      "ExternalID":"4f267b68-871d-4d75-a3fc-180f9b7fdb7d",
      "Type":"Attendance.StatutoryAttendanceSession"
  },
  "AttendanceCode" : {
      "ExternalID":"772830b1-fd8d-459c-913a-4124d1ed7c24",
      "Type":"Attendance.Lookup.AttendanceCode"
  },
  "Qualifier" : {
      "MinutesLate":null,
      "Comment":"AndyTest"
  }
}

Please note that the post is considerably less fields than the GET return. 

Note: Minutes late of zero is not accepted it must be passed as null.  Only late marks allow a non-null minutes late.  Comments must not include reserved characters in JSON.

Attendance Sessions

Call: GET https://seli00apm01.azure-api.net/ssli01/Attendance/V3/AttendanceSessions?$filter=(StartDateTime ge 2021-03-18T00:00:00Z) and (StartDateTime le 2021-03-19T00:01:00Z)

Will return

{
    "@odata.context": "https://seli00apm01.azure-api.net/ssli01/Attendance/V3/$metadata#AttendanceSessions",
    "value": [
        {
            "ExternalID": "c3daacf2-9ebf-4611-b27b-a84994aa06fa",
            "Name": "Thursday PM",
            "Description": "Attendance Sesion Thursday PM",
            "EventType": "StatutoryAttendanceSession",
            "StartDateTime": "2021-03-18T13:00:00Z",
            "EndDateTime": "2021-03-18T15:30:00Z",
            "Tags": [],
            "DefaultAttendanceCode": null,
            "AttendanceSessionType": {
                "ExternalID": "a8fe34d8-f76c-458f-905c-ae5078b89510",
                "Type": "Attendance.Lookup.AttendanceSessionType"
            },
            "Organiser": null
        },
        {
            "ExternalID": "7fe1249b-6f30-45c9-bdc0-d3f8c5ce6bb5",
            "Name": "Thursday AM",
            "Description": "Attendance Sesion Thursday AM",
            "EventType": "StatutoryAttendanceSession",
            "StartDateTime": "2021-03-18T09:00:00Z",
            "EndDateTime": "2021-03-18T12:30:00Z",
            "Tags": [],
            "DefaultAttendanceCode": null,
            "AttendanceSessionType": {
                "ExternalID": "98fd07b5-76ab-44ad-99b0-435e46caba0a",
                "Type": "Attendance.Lookup.AttendanceSessionType"
            },
            "Organiser": null
        }
    ]
}

Attendance Codes

Example: GET https://seli00apm01.azure-api.net/ssli01/Attendance/v3/AttendanceLookups?$filter=LookupType eq 'AttendanceCode'

{
    "@odata.context": "https://seli00apm01.azure-api.net/ssli01/Attendance/v3/$metadata#AttendanceLookups",
    "value": [
        {
            "@odata.type": "#ESS.Attendance.AttendanceCode",
            "ExternalID": "772830b1-fd8d-459c-913a-4124d1ed7c24",
            "LookupType": "AttendanceCode",
            "Code": "/",
            "Description": "Present (AM)",
            "DisplayOrder": 1,
            "IsVisible": true,
            "ResourceProvider": null,
            "StatutoryAttendanceCode": {
                "ExternalID": "9ae674df-1c3a-4508-a469-43552151bdc0",
                "Type": "Attendance.Lookup.StatutoryAttendanceCode"
            }
        },

Historical Examples - Do not use for information only.

V2 (Attendance Record) - Released

{
    "value": [
        {
            "ExternalID": "0003873f-eff7-4304-bd20-7275a5391651",
            "Present": true,
            "Absent": false,
            "SchoolAttendanceCode": "819e702f-458a-4ca3-a284-93304c63ede0",
            "AttendanceHistorys": [],
            "Learner": "c5133434-1dbd-4527-8024-8c02bf01251e",
            "AttendableEvent": "fde30e98-cf5a-4c65-8745-408537570f25",
            "MinutesLate": null,
            "Comment": null,
            "RecordedBy": "c4c23ce1-10dd-4eae-a28f-90a102645c6e",
            "RecordedOn": "2018-12-14T09:41:37.167Z",
            "ChangeProcessName": "Apply Mark Over Date Range Process",
            "AttendableEventStart": "2018-12-18T13:00:00Z"
        },

V3 (Attendance Record) - Beta

{
--- example of previous V3 beta call for information only
--- you would not be able to read/write in this format.

    "@odata.context": "https://seli00apm01.azure-api.net/ssli01/Attendance/V3/$metadata#AttendanceRecords",
    "value": [
        {
            "ExternalID": "58008a9b-7ae1-40a8-9576-5a8f3f549ddf",
            "Present": null,
            "Absent": null,
            "RecordedOn": null,
            "ChangeProcessName": null,
            "AttendableEventStart": "2018-01-04T09:00:00Z",
            "RecordedBy": null,
            "Attendee": {
                "ExternalID": "ad5e2a8d-b7fe-4668-96a5-00ea53194a30",
                "Type": "Learner.Identifier"
            },
            "Event": {
                "ExternalID": "e488b144-01e6-4ba7-ad10-1b0bc7a705d6",
                "Type": "Attendance.AttendanceSession"
            },
            "AttendanceCode": {
                "ExternalID": "00000000-0000-0000-0000-000000000000",
                "Type": "Attendance.Lookup"
            },
            "Qualifier": {
                "MinutesLate": null,
                "Comment": null
            }
        },