Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Csrs, Disconnects #702

Merged
merged 8 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 0 additions & 260 deletions site/docs/numbers/csrLookupTool.mdx

This file was deleted.

33 changes: 13 additions & 20 deletions site/docs/numbers/disconnectNumbers.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: disconnectNumbers
title: Disconnecting Numbers
title: How to disconnect phone numbers
slug: /numbers/guides/disconnectNumbers
description: How to disconnect numbers from account using the Bandwidth API
keywords:
Expand All @@ -10,9 +10,6 @@ keywords:
image: '@site/static/img/bw-icon.svg'
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

export const accountId = "{accountId}";
export const orderId = "{orderId}";
export const disconnectId = "{disconnectId}";
Expand All @@ -29,22 +26,14 @@ export const Highlight = ({children, color}) => (
</span>
);

Disconnecting a phone number leaves it in all applicable inventories, but makes it available for activation with a new subscriber.
To remove a number from your account, disconnect it using the /disconnects endpoint.

## Create a Disconnect Order
To create a disconnect order, you must make a <Highlight color="#079CEE">POST</Highlight> request to our [/disconnects API](/apis/numbers/#operation/CreateDisconnectOrder) endpoint.

### Request URL
<Highlight color="#079CEE">POST</Highlight> <code>https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects</code>

### Request Parameters

| Parameter | Required | Description |
|:----------------------|:---------|:----------------------------------------------------------------------------------------------------------------------------------|
| `Name` | Yes | The name of the order. Max length restricted to 50 characters |
| `TelephoneNumberList` | Yes | A list of telephone numbers to disconnect. |
| `DisconnectMode` | No | The severity of disconnect order. Typically `Normal`. |
| `Protected` | No | Change protected status of telephones during disconnection. Possible values: `TRUE`, `FALSE`, `UNCHANGED`. Typically `UNCHANGED`. |

### Example
> Request

Expand Down Expand Up @@ -89,14 +78,12 @@ Location: https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/d
</DisconnectTelephoneNumberOrderResponse>
```

## Fetching Disconnect Order Status {#get-disconnect-info}
A GET Request to an existing disconnect will return it's status as well as any information originally used to create the disconnect.
## Checking Disconnect Order Status {#get-disconnect-info}

### Request URL
<Highlight color="#00bf8c">GET</Highlight> <code>https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/{disconnectId}</code>
Disconnects are asynchronous which means the orders are processed and the order status is updated at a later time. As times can vary, Bandwidth recommends configuring your account with a subscription instead of polling the order resource for `<OrderStatus>`. Please follow the [How to setup Notification Webhook](/docs/numbers/webhooks/orderWebhook) guide.
If you want to poll, you can still use a [GET /disconnects/{disconnectId} request](/apis/numbers/#operation/ReadDisconnectOrder).

### Example
> Request
<Highlight color="#00bf8c">GET</Highlight> <code>https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/{disconnectId}</code>

```http
GET https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/df2gc2e2-653d-466c-945d-8f292f09ce55 HTTP/1.1
Expand Down Expand Up @@ -132,3 +119,9 @@ Content-Type: application/xml; charset=utf-8
</DisconnectTelephoneNumberOrderResponse>

```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a section at the bottom and link them to "How to search and order a number"

## Where to next?
Now that you have learned how to disconnect numbers, check out some of the other available actions in our guides:
- [How to search and order a number](/docs/numbers/guides/searchingForNumbers)


Loading