Migrate updateClassroomSlotAttendance

This guide details how to replace PATCH updateClassroomSlotAttendance from API v1 with the Edit a classroom slot registration endpoint in API v2.

💡

Key changes

  • HTTP method: Both v1 and v2 use the PATCH method.
  • One user per request: v1 updated the attendance of several users in one request, identified by their user IDs. v2 updates the attendance of one user per request, identified by their classroom slot registration ID.
    • To find the registration ID of a user, use List all registrations with the classroomSlotId and userId filters.
  • Partial success: v1 returned a 207 status with a warning when some user IDs were invalid. v2 updates a single registration, and returns a 404 error if it does not exist.

Documentation links

Here are the links to the API reference for:

Endpoint mapping

Here's the direct correlation between the v1 and v2 endpoint URLs:

  • API v1: classrooms/slots/:classroomSlotId/attendance
  • API v2: classroom-slots/{classroomSlotId}/registrations/{slotRegistrationId}

Input changes

This section details the specific alterations to the input requirements between API versions.

API v1 input example

curl --location -g --request PATCH 'https://app.360learning.com/api/v1/classrooms/slots/1a2b3c4d5e6f7a8b9c8d7e6f/attendance?company={{company_id}}&apiKey={{api_key}}' \
--header 'Content-Type: application/json' \
--data '{
    "users": [
        {
            "userId": "5d19c86b73ae6c17981e80bd",
            "hasAttended": true
        },
        {
            "userId": "5d5ac6b32bcf8103d4cb07e3",
            "hasAttended": false
        }
    ]
}'

API v2 input example

curl --request PATCH \
     --url https://app.360learning.com/api/v2/classroom-slots/507f1f77bcf86cd799439011/registrations/507f1f77bcf86cd799439011 \
     --header '360-api-version: v2.0' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer access_token' \
     --header 'content-type: application/json' \
     --data '
{
  "hasAttended": true
}
'

Main input differences

Change typeAPI v1API v2
Removed
Body parameter
users (Required): Array of objects, each containing userId and hasAttended. Replaced by one request per user, with the slotRegistrationId path parameter and the hasAttended body parameter.
Added
Path parameter
slotRegistrationId (Required): The unique ID of the user's classroom slot registration.
Added
Body parameter
hasAttended (Optional): The attendance status for this registration. If true, the user is marked as present. If false, they are marked as absent. If not provided, their attendance is unchanged.

Output changes

This section details the specific alterations to the successful output returned between API versions.

API v1 output example

{
  "message": "X user(s) updated"
}

API v2 output example

{
  "_id": "507f1f77bcf86cd799439011",
  "userId": "507f1f77bcf86cd799439011",
  "status": "published",
  "hasAttended": true,
  "pathId": "507f1f77bcf86cd799439011",
  "createdAt": "2026-10-01T09:00:00.000Z",
  "modifiedAt": "2026-10-14T16:30:00.000Z",
  "rsvp": {
    "going": true,
    "lastUpdatedAt": "2026-10-02T10:15:00.000Z"
  }
}

Main output differences

API v2 returns the updated classroom slot registration, unlike v1, which returned a simple success message.

Change typeAPI v1API v2
Removed
Output property
message: A string indicating the number of users updated.
Modified
Success output
200 with a simple plain text message, or 207 with a warning listing the invalid user IDs.200 with a JSON object representing the updated classroom slot registration.
Added
Output property
_id (Required): The unique ID of the classroom slot registration.
Added
Output property
userId (Required): The unique ID of the registered user.
Added
Output property
status (Required): The status of the registration (archived, published).
Added
Output property
hasAttended: The attendance status of the registration.
Added
Output property
attendanceDuration: The reported duration of the attendance in milliseconds, if the classroom is set up through a webinar integration.
Added
Output property
pathId, createdAt, modifiedAt, archivedAt, rsvp: The path, dates, and RSVP of the registration.

Did this page help you?