# Remove the connection

`DELETE /businesses/{bid}/ita`

Requires the `businesses` scope.

Deletes the stored authorization. From then on, documents that need a מספר הקצאה issue without one (or are refused, when the business requires one) until the owner connects again. `ita.disconnected` fires when there was a connection to remove. Owner only.

## Path parameters

| Name | Type | | Description |
|---|---|---|---|
| `bid` | string | **required** | Business id, from `POST /businesses`. |

## Response

`200`: `{ "ok": true, … }`

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean | **required** |  |
| `ita` | ItaConnection | **required** | A business's connection to רשות המסים (חשבוניות ישראל): whether BillOS may request מספרי הקצאה for it, and until when. Never a token: those stay in BillOS. |
| `removed` | boolean |  | False when there was nothing to remove. |

Errors: `400`, `401`, `403`, `404`, `429`. Every failure answers `{ "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }`: branch on `reason`, and read `hint` for what to change (https://docs.billos.co.il/errors.md).

## Examples

### cURL

```bash
curl -X DELETE "$BASE/businesses/$BID/ita" \
  -H "X-Api-Key: $KEY"
```
### Node

```node
const res = await fetch(`${BASE}/businesses/${BID}/ita`, {
  method: 'DELETE',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
```
### Python

```python
import requests
res = requests.delete(
    f"{BASE}/businesses/{BID}/ita",
    headers={"X-Api-Key": KEY},
)
data = res.json()
```