Developer Function: API: Table Operation: Bulk Delete Record
## Overview
You can delete records using the API.
## Preparation
Please [Create an API Key](/manual/api-key) before performing API operations.
## Notes
This function deletes records and information.
Please pay close attention to the records to be deleted and the deletion conditions.
We recommend that you follow the steps below to delete records.
(1) [Retrieve Records Scheduled for Deletion](/manual/api-record-get-multi)
(2) Transcribe delete records and delete items from retrieved records and create a bulk delete API request.
([Check here if you want to use view items](/manual/api-view))
(3) Check the PhysicalDelete option (if set to true, the deletion records will be deleted from the _deleted and _history tables for due date tables, and they will no longer be able to be restored)
## Request
Please send json data in the following format.
|Setting item|Value|
|:--|:--|
|HTTP Method|POST|
|Content-Type |application/json|
|Character Code|UTF-8|
|URL|http://{server name}/pleasanter/api/items/{site ID}/bulkdelete (*1)|
(*1) Edit the "http://{server name}/pleasanter" part to suit your environment as appropriate, and replace "{site ID}" with the ID of the site where the record you want to delete is registered.
(For pleasanter.net, https://pleasanter.net/fs/api/items/{site ID}/bulkdelete)
#### When physically deleting records narrowed down by item conditions
##### JSON
```
{
"ApiVersion": 1.1,
"ApiKey": "XXXXX...",
"view": {
"ColumnFilterHash": {
"Status": "[100,910]"
}
},
"PhysicalDelete": true
}
```
#### When selecting and deleting multiple records (delete the record with record ID 135,376)
##### JSON
```
{
"ApiVersion": 1.1,
"ApiKey": "XXXXX...",
"Selected": [
135,
376
]
}
```
#### When deleting all records in the target table
##### JSON
```
{
"ApiVersion": 1.1,
"ApiKey": "XXXXX...",
"All": true
}
```
## Response
The following json data will be returned.
#### When deleting (moving to trash) a record registered in the table with site ID 46010
##### JSON
```
{
"Id": 46010,
"StatusCode": 200,
"Message": "3 items deleted."
}
```
#### When physically deleting a record registered in a table with site ID 46010
##### JSON
```
{
"Id": 46010,
"StatusCode": 200,
"Message": "2 items physically deleted."
}
```
## Confirmation Items in Case of Error
[・Precautions when using the API and things to check if an error occurs](/manual/faq-api)
[・FAQ: What to check if modified configuration files or API requests (JSON format) are not recognized correctly](/manual/faq-json-format)