Get DIDs

Description

Returns a list of DIDs owned by your account.

Request

HTTP Method: GET

URI Path: /v3/dids

URI Query Parameters:

Name

Type

Is Required?

Description

filter[<filter_name>]

integer, string, boolean

Optional

Filtering

includes

string

Optional

Inclusion

sort

string

Optional

Inclusion

Includes:

Value

Description

order

Order Object

voice_in_trunk

Trunk Object

voice_in_trunk.voice_in_trunk_group

Trunk Group Object

voice_in_trunk.pop

POP Object

voice_in_trunk_group

Trunk Group Object

capacity_pool

Capacity Pool Object

shared_capacity_group

Shared Capacity Group Object

did_group

DID Group Object

did_group.country

Country Object

did_group.city

City Object

did_group.region

Region Object

did_group.did_group_type

DID Group Type Object

did_group.stock_keeping_units

Stock Keeping Unit Object

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

number

string

Yes

Yes

The DID number field.

description

string

Yes

Yes

The description field.

terminated

boolean

No

No

The terminated field.

awaiting_registration

boolean

No

No

The awaiting_registration field.

did_group.id

integer

Yes

Yes

The ID field of did_group relationship.

country.id

integer

Yes

Yes

The ID field of country relationship.

region.id

integer

Yes

Yes

The ID field of region relationship.

city.id

integer

Yes

Yes

The ID field of city relationship.

order.id

integer

Yes

Yes

The ID field of order relationship.

voice_in_trunk.id

integer

Yes

Yes

The ID field of voice_in_trunk relationship.

voice_in_trunk_group.id

integer

Yes

Yes

The ID field of voice_in_trunk_group relationship.

shared_capacity_group.id

integer

Yes

Yes

The ID field of shared_capacity_group relationship.

capacity_pool.id

integer

Yes

Yes

The ID field of capacity_pool relationship.

order.reference

string

No

Yes

The reference field of order relationship.

did_group.features

string

No

Yes

DID Group features field.

Sorting:

Value

Sorts by:

blocked

The blocked field.

pending

The pending field.

awaiting_registration

The awaiting_registration field.

capacity_limit

The capacity_limit field.

description

The description field.

terminated

The terminated field.

number

The number field.

expires_at

The expires_at field.

channels_included_count

The channels_included_count field.

dedicated_channels_count

The dedicated_channels_count field.

created_at

The created_at field.

Fielding:

Value

Returns:

blocked

The blocked attribute.

pending

The pending attribute.

awaiting_registration

The awaiting_registration attribute.

capacity_limit

The capacity_limit attribute.

description

The description attribute.

terminated

The terminated attribute.

number

The number attribute.

expires_at

The expires_at attribute.

channels_included_count

The channels_included_count attribute.

dedicated_channels_count

The dedicated_channels_count attribute.

created_at

The created_at attribute.

Examples

http

GET /v3/dids HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

curl

curl -i https://api.didww.com/v3/dids -H 'Accept: application/vnd.api+json' -H 'Api-Key: [API token]' -H 'Content-Type: application/vnd.api+json'

response

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

        {
          "data": [
            {
              "id": "ac40fb08-ac14-4a6c-8f20-fe650870c266",
              "type": "dids",
              "attributes": {
                "blocked": false,
                "capacity_limit": 1,
                "description": "string",
                "terminated": false,
                "awaiting_registration": false,
                "number": "437xxxxxxxxx",
                "expires_at": "2017-06-25T08:21:41.795Z",
                "channels_included_count": 2,
                "created_at": "2017-06-25T08:21:41.795Z",
                "dedicated_channels_count": 0
              },
              "relationships": {
                "did_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/did_group",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/did_group"
                  }
                },
                "order": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/order",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/order"
                  }
                },
                "voice_in_trunk": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/voice_in_trunk",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/voice_in_trunk"
                  }
                },
                "voice_in_trunk_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/voice_in_trunk_group",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/voice_in_trunk_group"
                  }
                },
                "capacity_pool": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/capacity_pool",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/capacity_pool"
                  }
                },
                "shared_capacity_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/shared_capacity_group",
                    "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/shared_capacity_group"
                  }
                },
    "address_verification": {
      "links": {
        "self": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/relationships/address_verification",
        "related": "https://api.didww.com/v3/dids/ac40fb08-ac14-4a6c-8f20-fe650870c266/address_verification"
      }
    }
              }
            },
            {
              "id": "b37f0fcf-24d0-4799-8e81-a69bcc889f2e",
              "type": "dids",
              "attributes": {
                "blocked": false,
                "capacity_limit": 1,
                "description": "string",
                "terminated": false,
                "awaiting_registration": false,
                "number": "437xxxxxxxxx",
                "expires_at": "2017-06-25T08:21:41.795Z",
                "channels_included_count": 2,
                "created_at": "2017-06-25T08:21:41.795Z",
                "dedicated_channels_count": 0
              },
              "relationships": {
                "did_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/did_group",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/did_group"
                  }
                },
                "order": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/order",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/order"
                  }
                },
                "voice_in_trunk": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/voice_in_trunk",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/voice_in_trunk"
                  }
                },
                "voice_in_trunk_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/voice_in_trunk_group",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/voice_in_trunk_group"
                  }
                },
                "capacity_pool": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/capacity_pool",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/capacity_pool"
                  }
                },
                "shared_capacity_group": {
                  "links": {
                    "self": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/relationships/shared_capacity_group",
                    "related": "https://api.didww.com/v3/dids/b37f0fcf-24d0-4799-8e81-a69bcc889f2e/shared_capacity_group"
                  }
                }
              }
            }
          ],
          "meta": {
            "total_records": 2
          },
          "links": {
            "first": "https://api.didww.com/v3/dids&page%5Bnumber%5D=1&page%5Bsize%5D=50",
            "last": "https://api.didww.com/v3/dids&page%5Bnumber%5D=1&page%5Bsize%5D=50"
          }
        }

http

GET /v3/dids?include=did_group HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

curl

curl -i 'https://api.didww.com/v3/dids?include=did_group' -H 'Accept: application/vnd.api+json' -H 'Api-Key: [API token]' -H 'Content-Type: application/vnd.api+json'

response

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

{
  "data": {
    "id": "2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d",
    "type": "dids",
    "attributes": {
      "blocked": false,
      "capacity_limit": 1,
      "description": "string",
      "terminated": false,
      "awaiting_registration": false,
      "number": "437xxxxxxxxx",
      "expires_at": "2017-06-25T08:21:41.795Z",
      "channels_included_count": 2,
      "created_at": "2017-06-25T08:21:41.795Z",
      "dedicated_channels_count": 0
    },
    "relationships": {
      "did_group": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/did_group",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/did_group"
        },
        "data": {
          "type": "did_groups",
          "id": "d04b6466-3d98-4be1-aac5-93ee241f57ca"
        }
      },
      "order": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/order",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/order"
        }
      },
      "voice_in_trunk": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/voice_in_trunk",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/voice_in_trunk"
        }
      },
      "voice_in_trunk_group": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/voice_in_trunk_group",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/voice_in_trunk_group"
        }
      },
      "capacity_pool": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/capacity_pool",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/capacity_pool"
        }
      },
      "shared_capacity_group": {
        "links": {
          "self": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/relationships/shared_capacity_group",
          "related": "https://api.didww.com/v3/dids/2b1f91d7-8f7a-4933-b1e4-43bbe6aff89d/shared_capacity_group"
        }
      }
    }
  },
  "included": [
    {
      "id": "d04b6466-3d98-4be1-aac5-93ee241f57ca",
      "type": "did_groups",
      "links": {
        "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca"
      },
      "attributes": {
        "prefix": "721",
        "local_prefix": "",
        "features": [
          "voice"
        ],
        "is_metered": false,
        "area_name": "National",
        "allow_additional_channels": true
      },
      "relationships": {
        "country": {
          "links": {
            "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/relationships/country",
            "related": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/country"
          }
        },
        "city": {
          "links": {
            "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/relationships/city",
            "related": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/city"
          }
        },
        "did_group_type": {
          "links": {
            "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/relationships/did_group_type",
            "related": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/did_group_type"
          }
        },
        "region": {
          "links": {
            "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/relationships/region",
            "related": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/region"
          }
        },
        "stock_keeping_units": {
          "links": {
            "self": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/relationships/stock_keeping_units",
            "related": "https://api.didww.com/v3/did_groups/d04b6466-3d98-4be1-aac5-93ee241f57ca/stock_keeping_units"
          }
        }
      }
    }
  ]
}

Other Responses

Code

Success

Description

401

No

Unauthorized