Update Capacity Pool#

Allows to update the existing Capacity Pool. By using this endpoint it is possible to remove Unassigned Channels from the Capacity Pool.

Request#

HTTP Method: PATCH

URI Path: /v3/capacity_pools/

URI Query Parameters#

Name

Type

Is Required?

Description

id

string

Yes

Unique ID number allocated to this Capacity Pool.

include

string

No

Inclusion

Request Body Object Attributes#

Title

Type

Nullable

Description

total_channels_count

integer

False

Total number of channels in the Capacity Pool.

Examples#

http

 1PATCH /v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Api-Key: [API token]
 6
 7{
 8  "data": {
 9    "id": "b8db1d7c-f415-4530-a340-c774bcc1c55f",
10    "type": "capacity_pools",
11    "attributes": {
12      "total_channels_count": 8
13    }
14  }
15}

curl

1curl -i -X PATCH https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"total_channels_count": 8}, "id": "b8db1d7c-f415-4530-a340-c774bcc1c55f", "type": "capacity_pools"}}'

response

 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "b8db1d7c-f415-4530-a340-c774bcc1c55f",
 7    "type": "capacity_pools",
 8    "attributes": {
 9      "name": "Extended",
10      "renew_date": "2018-07-21",
11      "total_channels_count": 8,
12      "assigned_channels_count": 7,
13      "minimum_limit": 5,
14      "minimum_qty_per_order": 1,
15      "setup_price": "25.0",
16      "monthly_price": "25.0",
17      "metered_rate": "0.02"
18    },
19    "relationships": {
20      "countries": {
21        "links": {
22          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/countries",
23          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/countries"
24        }
25      },
26      "shared_capacity_groups": {
27        "links": {
28          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/shared_capacity_groups",
29          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/shared_capacity_groups"
30        }
31      },
32      "qty_based_pricings": {
33        "links": {
34          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/qty_based_pricings",
35          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/qty_based_pricings"
36        }
37      }
38    }
39  }
40}

Other Responses#

Code

Success

Description

404

No

Not Found

401

No

Unauthorized