> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://rockwell.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://rockwell.ferndocs.com/_mcp/server.

# Deactivate Customer

POST https://connect.plex.com/mdm/v1/customers/{id}/deactivate

Deactivate a customer record.

Reference: https://rockwell.ferndocs.com/api-reference/customers-api/deactivate-customer

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Success - Customer Deactivated (200 OK)

- `success` (boolean, optional)
- `message` (string, optional)
- `data` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaData, optional)

## Errors

### 400 Bad Request Error

Bad Request - Invalid ID Format (400)

- `success` (boolean, optional)
- `error` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaError, optional)
- `timestamp` (datetime, optional)
- `requestId` (string, optional)

### 403 Forbidden Error

Forbidden - Insufficient Permissions (403)

- `success` (boolean, optional)
- `error` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaError, optional)
- `timestamp` (datetime, optional)
- `requestId` (string, optional)

### 404 Not Found Error

Not Found - Customer Does Not Exist (404)

- `success` (boolean, optional)
- `error` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaError, optional)
- `timestamp` (datetime, optional)
- `requestId` (string, optional)

### 409 Conflict Error

Conflict - Customer Has Active Orders (409)

- `success` (boolean, optional)
- `error` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaError, optional)
- `timestamp` (datetime, optional)
- `requestId` (string, optional)

## Types

### MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaData

- `customerId` (string, optional)
- `customerName` (string, optional)
- `status` (string, optional)
- `deactivatedAt` (datetime, optional)
- `deactivatedBy` (string, optional)
- `previousStatus` (string, optional)

### MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaError

- `code` (string, optional)
- `message` (string, optional)
- `details` (string, optional)
- `conflictingResources` (MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaErrorConflictingResources, optional)
- `resolution` (string, optional)

### MdmV1CustomersIdDeactivatePostResponsesContentApplicationJsonSchemaErrorConflictingResources

- `activeOrders` (integer, optional)
- `orderIds` (list of string, optional)
- `totalOutstandingAmount` (double, optional)
- `currency` (string, optional)

## Examples

**Response**

```json
{
  "success": true,
  "message": "Customer successfully deactivated",
  "data": {
    "customerId": "CUST-12345",
    "customerName": "Acme Manufacturing Corp",
    "status": "Deactivated",
    "deactivatedAt": "2024-01-15T14:32:18Z",
    "deactivatedBy": "user@company.com",
    "previousStatus": "Active"
  }
}
```

**SDK Code**

```python deactivateCustomer_example
import requests

url = "https://connect.plex.com/mdm/v1/customers/id/deactivate"

response = requests.post(url)

print(response.json())
```

```javascript deactivateCustomer_example
const url = 'https://connect.plex.com/mdm/v1/customers/id/deactivate';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go deactivateCustomer_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://connect.plex.com/mdm/v1/customers/id/deactivate"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby deactivateCustomer_example
require 'uri'
require 'net/http'

url = URI("https://connect.plex.com/mdm/v1/customers/id/deactivate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java deactivateCustomer_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://connect.plex.com/mdm/v1/customers/id/deactivate")
  .asString();
```

```php deactivateCustomer_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://connect.plex.com/mdm/v1/customers/id/deactivate');

echo $response->getBody();
```

```csharp deactivateCustomer_example
using RestSharp;

var client = new RestClient("https://connect.plex.com/mdm/v1/customers/id/deactivate");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift deactivateCustomer_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.plex.com/mdm/v1/customers/id/deactivate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```