> For the complete documentation index, see [llms.txt](https://markefan.gitbook.io/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://markefan.gitbook.io/documents/index/customerdelete.md).

# リードを削除する

リードを削除します。

## HTTP種類 : DELETE

## URL : \[BASE URL]/SpringRest/customer/delete

## HTTP戻り値 : JSON

## パラメータ

|      名 前      | 型                          |  必 須 |
| :-----------: | -------------------------- | :--: |
| access\_token | String                     | True |
|   customerId  | Integer\[] (複数の場合はカンマで区切る) | True |

## JSON戻り値 例：

```javascript
{
    "code": 200,
    "message": "deleteCustomers deleted successfully : 1",
    "status": "OK",
    "generatedId": null,
    "generatedIds": null,
    "statusObject": "OK"
}
```

## サンプルコード

このメソッドはリードを削除します。このメソッドを使用するには、リードIDとアクセストークンを渡します。複数のリードを削除したい場合は、リードIDをカンマで区切って指定してください。\
削除に成功すると、true の戻り値を返します。

```java
private boolean deleteCustomer(String accessToken , String customerId) {
        try {
            HttpClient client = new DefaultHttpClient();
            HttpDelete httpDelete = new HttpDelete("<API_BASE_URL>/SpringRest/customer/delete?access_token="
                    + accessToken + "&customerId=" + customerId);

            HTTP戻り値 response = client.execute(httpDelete);

            if (response.getStatusLine().getStatusCode() == 200) {
                return true;
            } else {
                return false;
            }
        } catch (ClientProtocolException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return false;
    }
```

## 呼び出し方法

```java
boolean delete = deleteCustomer(“98d9a7ea-8669-45e6-b141-f663c8cb35b8”, "82");
boolean delete = deleteCustomer(“98d9a7ea-8669-45e6-b141-f663c8cb35b8”, "82,81"); //複数リードの指定の場合
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://markefan.gitbook.io/documents/index/customerdelete.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
