# Deactivate Connection

This endpoint allows you to deactivate the connection for a specific property on a connected channel by providing the property’s hotel ID and channel-specific hotel ID.

### <mark style="color:yellow;">Endpoint</mark>

<mark style="color:green;background-color:green;">**`POST`**</mark>&#x20;

<div align="left"><figure><img src="https://958347541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9bn2UcBkeqtqixkl5eF%2Fuploads%2FpsybX0n39kUB8Z8WOk4X%2FSandbox%20image.png?alt=media&#x26;token=4ae73d0f-0d1a-4d73-a4e2-673dbc081d6a" alt="" width="56"><figcaption></figcaption></figure></div>

{% code overflow="wrap" %}
```url
https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/connection/deactivateConnection
```
{% endcode %}

***

#### <mark style="color:yellow;">Header</mark>

```xml
-app-id: YOUR_APP_ID
Authorization: YOUR_API_KEY
Content-Type:application/json
```

<table><thead><tr><th width="185">Header</th><th width="85">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>app-id</code></td><td>string</td><td>Yes</td><td>Your application ID. Required for authentication.</td></tr><tr><td><code>Authorization</code></td><td>string</td><td>Yes</td><td>Your API key required for authorization. </td></tr><tr><td><code>Content-Type</code></td><td>string</td><td>Yes</td><td>Must be set to <code>application/json</code>.</td></tr></tbody></table>

***

#### <mark style="color:yellow;">Attributes</mark>

`hotel_id` <mark style="color:orange;">**string (Required)**</mark>

Specifies the hotel ID for the property.

***

`channel_hotel_id` <mark style="color:orange;">**string (Required)**</mark>

Specifies the channel-specific hotel ID for the property.

***

### <mark style="color:yellow;">**Sample Request**</mark>

```json
{
  "hotel_id": "new1",
  "channel_hotel_id": "12915670"
}
```

***

### <mark style="color:yellow;">Response</mark>

#### <mark style="color:yellow;">Attributes</mark>

`Status` <mark style="color:orange;">**string**</mark>

Indicates the result of the API call.&#x20;

{% hint style="info" %}
For example, `Success` or `Fail`.
{% endhint %}

***

`Data` <mark style="color:orange;">**object**</mark>

Contains the main response data, such as property connection details.

{% hint style="info" %}
An empty array if no data is found.
{% endhint %}

***

`Message` <mark style="color:orange;">**string**</mark>

Descriptive message summarizing the API operation's outcome.

{% hint style="info" %}
**For example:**&#x20;

`Connection Deactivated Successfully`, `No Data Found`
{% endhint %}

***

`Ruid` <mark style="color:orange;">**string**</mark>

Unique request identifier for tracking, debugging, and logging.

***

#### <mark style="color:green;">**Sample Success Response**</mark>

```json
{ 
   "Status": "Success", 
   "Data": [], 
   "Message": "Connection Deactivated Successfully", 
   "Ruid": "f4ef89ae-9de1-4eaa-bf74-10c05459b1f5" 
} 
```

***

#### <mark style="color:red;">Error</mark>

#### <mark style="color:red;">**Sample Error Response 1**</mark>&#x20;

{% code overflow="wrap" %}
```json
{
  "Errors": [
    {
      "Code": "400",
      "ShortText": "HotelCode: Invalid HotelCode ('NT711')"
    }
  ],
  "Status": "Fail"
}
```
{% endcode %}

***

#### <mark style="color:red;">**Sample Error Response 2**</mark>

{% code overflow="wrap" %}
```json
{
  "Errors": [
    {
      "Code": "573",
      "ShortText": "channel-mapping not found for this property!"
    }
  ],
  "Status": "Fail"
}
```
{% endcode %}

***

#### <mark style="color:red;">**Sample Error Response 3**</mark>

#### When error was thrown from booking.com

{% code overflow="wrap" %}
```json
{ 
   "Status": "Fail", 
   "Errors": [], 
   "Message": "Data not found: Connection not found", 
   "Ruid": "89c357b8-26e7-471b-9e13-fa9e8532a224" 
}
```
{% endcode %}

***

<mark style="color:red;">**Error Response Body Elements**</mark>

`Status` <mark style="color:orange;">**string**</mark>

Indicates the result of the API call, which will be always `"Fail"` in case of an error response.

***

`Error` <mark style="color:orange;">**array**</mark>

Array that contains details about any errors that occurred during the API call. Each object in the `Errors` array contains the following properties:



`Code` <mark style="color:orange;">**string**</mark>

Specific error code that helps identify the type of error.



`ShortText` <mark style="color:orange;">**string**</mark>

A short description of the error.

***

`Message` <mark style="color:orange;">**string**</mark>

A message providing more information about the error.

***

`Ruid` <mark style="color:orange;">**string**</mark>

A unique identifier for tracking the request.
