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

# Deactivate Location

POST https://crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate
Content-Type: multipart/form-data

Deactivate a location to prevent new service orders while preserving historical data. Deactivated locations cannot be scheduled for new services but maintain all historical records. Deactivation is logged in the audit trail.

Reference: https://docs.itspropel.com/propel-biz/05-crm/customers/customer-location-management/deactivate-location

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: PropelBiz
  version: 1.0.0
paths:
  /crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate:
    post:
      operationId: deactivate-location
      summary: Deactivate Location
      description: >-
        Deactivate a location to prevent new service orders while preserving
        historical data. Deactivated locations cannot be scheduled for new
        services but maintain all historical records. Deactivation is logged in
        the audit trail.
      tags:
        - >-
          subpackage_05Crm.subpackage_05Crm/customers.subpackage_05Crm/customers/customerLocationManagement
      parameters:
        - name: '{{tenant_key_name}}'
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/05 CRM_Customers_Customer Location
                  Management_Deactivate Location_Response_200
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties: {}
servers:
  - url: https:/
components:
  schemas:
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAudit:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        created_by:
          type: integer
        deleted_at:
          description: Any type
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: integer
      required:
        - created_at
        - created_by
        - updated_at
        - updated_by
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAudit
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataFlags:
      type: object
      properties:
        is_billing_address:
          type: boolean
        is_primary_location:
          type: boolean
      required:
        - is_billing_address
        - is_primary_location
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataFlags
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAccess:
      type: object
      properties:
        gate_code:
          description: Any type
        instructions:
          type: string
        lockbox_code:
          description: Any type
        parking_instructions:
          type: string
      required:
        - instructions
        - parking_instructions
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAccess
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAddress:
      type: object
      properties:
        city:
          type: string
        state:
          type: string
        county:
          description: Any type
        line_1:
          type: string
        line_2:
          type: string
        country:
          type: string
        postal_code:
          type: string
      required:
        - city
        - state
        - line_1
        - line_2
        - country
        - postal_code
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAddress
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataService:
      type: object
      properties:
        area:
          description: Any type
        zone:
          description: Any type
        zone_id:
          description: Any type
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataService
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCustomer:
      type: object
      properties:
        id:
          type: integer
        display_name:
          type: string
        business_name:
          description: Any type
        customer_type:
          type: string
      required:
        - id
        - display_name
        - customer_type
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCustomer
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataProperty:
      type: object
      properties:
        type:
          description: Any type
        is_owned:
          type: boolean
        lot_size:
          description: Any type
        occupancy_type:
          type: string
        square_footage:
          description: Any type
      required:
        - is_owned
        - occupancy_type
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataProperty
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataSeasonal:
      type: object
      properties:
        end_date:
          description: Any type
        is_active:
          description: Any type
        start_date:
          description: Any type
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataSeasonal
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataConditions:
      type: object
      properties:
        dog_on_premises:
          type: boolean
        special_hazards:
          description: Any type
      required:
        - dog_on_premises
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataConditions
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCoordinates:
      type: object
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - latitude
        - longitude
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCoordinates
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCreatedByUser:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - email
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCreatedByUser
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataUpdatedByUser:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - email
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataUpdatedByUser
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        audit:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAudit
        flags:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataFlags
        access:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAccess
        status:
          type: string
        address:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataAddress
        service:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataService
        customer:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCustomer
        property:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataProperty
        seasonal:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataSeasonal
        conditions:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataConditions
        coordinates:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCoordinates
        customer_id:
          type: string
          format: uuid
        location_code:
          description: Any type
        location_name:
          description: Any type
        location_type:
          type: string
        created_by_user:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataCreatedByUser
        updated_by_user:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaDataUpdatedByUser
      required:
        - id
        - audit
        - flags
        - access
        - status
        - address
        - service
        - customer
        - property
        - seasonal
        - conditions
        - coordinates
        - customer_id
        - location_type
        - created_by_user
        - updated_by_user
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaData
    CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaMeta:
      type: object
      properties:
        type:
          type: string
        version:
          type: string
        generated_at:
          type: string
          format: date-time
      required:
        - type
        - version
        - generated_at
      title: >-
        CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaMeta
    05 CRM_Customers_Customer Location Management_Deactivate Location_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaData
        meta:
          $ref: >-
            #/components/schemas/CrmCustomers7BcustomerId7DLocations7BcustomerLocationId7DDeactivatePostResponsesContentApplicationJsonSchemaMeta
      required:
        - data
        - meta
      title: >-
        05 CRM_Customers_Customer Location Management_Deactivate
        Location_Response_200

```

## SDK Code Examples

```python 05 CRM_Customers_Customer Location Management_Deactivate Location_example
import requests

url = "https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate"

payload = "-----011000010111000001101001--\r\n"
headers = {
    "{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}",
    "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript 05 CRM_Customers_Customer Location Management_Deactivate Location_example
const url = 'https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate';
const form = new FormData();

const options = {
  method: 'POST',
  headers: {'{{tenant_key_name}}': '{{tenant_key_value1}}|{{tenant_key_value2}}'}
};

options.body = form;

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

```go 05 CRM_Customers_Customer Location Management_Deactivate Location_example
package main

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

func main() {

	url := "https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate"

	payload := strings.NewReader("-----011000010111000001101001--\r\n")

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

	req.Header.Add("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")

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

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

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

}
```

```ruby 05 CRM_Customers_Customer Location Management_Deactivate Location_example
require 'uri'
require 'net/http'

url = URI("https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate")

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

request = Net::HTTP::Post.new(url)
request["{{tenant_key_name}}"] = '{{tenant_key_value1}}|{{tenant_key_value2}}'
request.body = "-----011000010111000001101001--\r\n"

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

```java 05 CRM_Customers_Customer Location Management_Deactivate Location_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate")
  .header("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")
  .body("-----011000010111000001101001--\r\n")
  .asString();
```

```php 05 CRM_Customers_Customer Location Management_Deactivate Location_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate', [
  'headers' => [
    'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001',
    '{{tenant_key_name}}' => '{{tenant_key_value1}}|{{tenant_key_value2}}',
  ],
]);

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

```csharp 05 CRM_Customers_Customer Location Management_Deactivate Location_example
using RestSharp;

var client = new RestClient("https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate");
var request = new RestRequest(Method.POST);
request.AddHeader("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}");
request.AddHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("undefined", "-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 05 CRM_Customers_Customer Location Management_Deactivate Location_example
import Foundation

let headers = ["{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}"]
let parameters = []

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://https/crm/customers/%7Bcustomer_id%7D/locations/%7Bcustomer_location_id%7D/deactivate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```