> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DeleteAttendance # Package: bookings # Namespace: AttendanceService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/delete-attendance.md ## Permission Scopes: Manage Bookings: SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS ## Introduction Deletes an attendance record. This permanently removes the attendance information for a booking session. To recreate the attendance information, call [Set Attendance](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/set-attendance.md). To delete multiple attendance records in a single call, call [Bulk Delete Attendances](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/bulk-delete-attendances.md). --- ## REST API ### Schema ``` Method: deleteAttendance Description: Deletes an attendance record. This permanently removes the attendance information for a booking session. To recreate the attendance information, call [Set Attendance](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/set-attendance.md). To delete multiple attendance records in a single call, call [Bulk Delete Attendances](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/bulk-delete-attendances.md). URL: https://www.wixapis.com/bookings/attendance/v2/attendance/{attendanceId} Method: DELETE # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: attendanceId Method parameters: param name: attendanceId | type: none | required: true Return type: DeleteAttendanceResponse EMPTY-OBJECT {} Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ATTENDANCE_NOT_FOUND | Description: Couldn't find the attendance record. ``` ### Examples ### Delete an attendance record Delete an attendance record by attendance ID. ```curl curl -X DELETE \ 'https://www.wixapis.com/bookings/v2/attendance/9fc7a1cc-55ba-4943-afac-5849f1a3cdd9' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.bookings.AttendanceService.deleteAttendance(attendanceId) Description: Deletes an attendance record. This permanently removes the attendance information for a booking session. To recreate the attendance information, call [Set Attendance](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/set-attendance.md). To delete multiple attendance records in a single call, call [Bulk Delete Attendances](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/attendance/bulk-delete-attendances.md). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: attendanceId Method parameters: param name: attendanceId | type: string | description: GUID of the attendance record to delete. | required: true Return type: PROMISE EMPTY-OBJECT {} Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: ATTENDANCE_NOT_FOUND | Description: Couldn't find the attendance record. ``` ### Examples ### deleteAttendance ```javascript import { attendance } from '@wix/bookings'; async function deleteAttendance(attendanceId) { const response = await attendance.deleteAttendance(attendanceId); }; ``` ### deleteAttendance (with elevated permissions) ```javascript import { attendance } from '@wix/bookings'; import { auth } from '@wix/essentials'; async function myDeleteAttendanceMethod(attendanceId) { const elevatedDeleteAttendance = auth.elevate(attendance.deleteAttendance); const response = await elevatedDeleteAttendance(attendanceId); } ``` ### deleteAttendance (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { attendance } from '@wix/bookings'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { attendance }, // Include the auth strategy and host as relevant }); async function deleteAttendance(attendanceId) { const response = await myWixClient.attendance.deleteAttendance(attendanceId); }; ``` ---