Update Capacity Pool

Description

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

Optional

Inclusion

Request Body Object Attributes:

Name

Type

Nullable

Description

total_channels_count

integer

False

Total number of channels in the Capacity Pool.

Examples

http

PATCH /v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "id": "b8db1d7c-f415-4530-a340-c774bcc1c55f",
    "type": "capacity_pools",
    "attributes": {
      "total_channels_count": 8
    }
  }
}

curl

curl -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

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "b8db1d7c-f415-4530-a340-c774bcc1c55f",
    "type": "capacity_pools",
    "attributes": {
      "name": "Extended",
      "renew_date": "2018-07-21",
      "total_channels_count": 8,
      "assigned_channels_count": 7,
      "minimum_limit": 5,
      "minimum_qty_per_order": 1,
      "setup_price": "25.0",
      "monthly_price": "25.0",
      "metered_rate": "0.02"
    },
    "relationships": {
      "countries": {
        "links": {
          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/countries",
          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/countries"
        }
      },
      "shared_capacity_groups": {
        "links": {
          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/shared_capacity_groups",
          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/shared_capacity_groups"
        }
      },
      "qty_based_pricings": {
        "links": {
          "self": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/relationships/qty_based_pricings",
          "related": "https://api.didww.com/v3/capacity_pools/b8db1d7c-f415-4530-a340-c774bcc1c55f/qty_based_pricings"
        }
      }
    }
  },
  "meta": {
    "api_version": "2017-09-18"
  }
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized