v1

latestOpenAPI 3.1.02026-07-26549156879.0 KB
Trainings > TrainingMembership

Bulk destroys a Training membership

Deletes training memberships in bulk

post/api/2026-07-01/resources/trainings/training_memberships/bulk_destroy

Request body

idsstring[] required

IDs of training memberships to delete. When 'all' is true, these IDs are excluded from deletion.

training_idstring

Training ID. Required when 'all' is true to identify which training's memberships to delete.

allboolean

When true, deletes all memberships for the given training_id, excluding those in the 'ids' array.

Example request

{
  "ids": [
    "1",
    "2"
  ],
  "training_id": "1"
}

Response

OK

idstring required

Unique identifier for the training membership.

access_idstring required

Access_id associated to the employee, refers to employees/employees endpoint.

employee_idstring required

Employee_id associated to the employee, refers to employees/employees endpoint.

training_idstring required

This field is used to filter those trainings memberships that belongs to this training.

status'notassigned' | 'notstarted' | 'missing' | 'started' | 'partiallycompleted' | 'completed' required

This field is used to filter those trainings memberships whose attendance status is the given.

training_due_datestring

This field is used for those trainings with an expiry date.

training_completed_atstring

This field is used to record the date a training was completed for trainings that have an expiry date.

Example response

[
  {
    "id": "1",
    "access_id": "20",
    "employee_id": "20",
    "training_id": "1",
    "status": "notstarted",
    "training_due_date": "2022-01-01",
    "training_completed_at": "2022-01-01"
  }
]