Get DID Groups

Description

Returns a list of DID Groups, which is essentially a list of the current DIDWW coverage. DID Groups are phone numbers that share a common city or area code.

Request

HTTP Method: GET

URI Path: /v3/did_groups

URI Query Parameters:

Name

Type

Is Required?

Description

filter[<filter_name>]

string

Optional

Filtering

includes

string

Optional

Inclusion

sort

string

Optional

Sorting

Includes:

Value

Description

country

Country Object

region

Region Object

city

City Object

did_group_type

DID Group Type Object

stock_keeping_units

A list of Stock Keeping Unit Objects

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

Group id field.

prefix

string

Yes

Yes

The city prefix field.

local_prefix

string

Yes

Yes

The local_prefix field.

area_name

string

Yes

Yes

The area_name field (for example London).

is_metered

boolean

No

No

The is_metered field.

allow_additional_channels

boolean

No

No

The allow_additional_channels field.

available_dids_enabled

boolean

No

No

The available_dids_enabled field.

features

string

No

Yes

The features field. Can be one/several/all of “voice”, “voice_out”, “t38”, “sms”, “sms_out”. example: “voice,sms”

needs_registration

boolean

No

No

The needs_registration field.

is_available

boolean

No

No

The is_available field.

country.id

string

Yes

Yes

The country.id field.

region.id

string

Yes

Yes

The region.id field.

city.id

string

Yes

Yes

The city.id field.

did_group_type.id

string

Yes

Yes

The did_group_type.id field.

meta.total_count_gteq

Integer

Yes

No

A filter on the list based on the meta.total_count_gteq field, where gteq stands for greater-equal.

Sorting:

Value

Sorts by:

country.name

The country.name field.

did_group_type.name

The did_group_type.name field.

prefix

City prefix field.

local_prefix

The local_prefix field.

is_metered

The is_metered field.

area_name

The area_name field.

allow_additional_channels

The allow_additional_channels field.

Fielding:

Value

Returns:

prefix

City prefix attribute.

local_prefix

The local_prefix attribute.

is_metered

The is_metered attribute.

area_name

The area_name attribute.

allow_additional_channels

The allow_additional_channels attribute.

Examples

http

GET /v3/did_groups 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/did_groups -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": "ac160b14-e670-490f-b158-d3ba552c623f",
        "type": "did_groups",
        "attributes": {
            "prefix": "241",
            "local_prefix": "",
            "features": [
                "voice",
                "voice_out",
                "t38"
            ],
            "is_metered": false,
            "area_name": "Aachen",
            "allow_additional_channels": true
        },
        "relationships": {
            "country": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/country",
                    "related": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/country"
                }
            },
            "city": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/city",
                    "related": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/city"
                }
            },
            "did_group_type": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/did_group_type",
                    "related": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/did_group_type"
                }
            },
            "region": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/region",
                    "related": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/region"
                }
            },
            "stock_keeping_units": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/stock_keeping_units",
                    "related": "https://api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/stock_keeping_units"
                }
            },
            "requirement": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/relationships/requirement",
                    "related": "https://sandbox-api.didww.com/v3/did_groups/ac160b14-e670-490f-b158-d3ba552c623f/requirement"
                }
            }
        },
        "meta": {
            "available_dids_enabled": false,
            "needs_registration": true,
            "is_available": true,
            "total_count": 21
        }

    }],
    "meta": {
        "total_records": 1,
        "api_version": "2021-04-19"
    },
    "links": {
        "first": "https://api.didww.com/v3/did_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "last": "https://api.didww.com/v3/did_groups?page%5Bnumber%5D=32&page%5Bsize%5D=50"
    }
}

http

GET /v3/did_groups?filter%5Bcountry.id%5D=c8647639-fc9c-47b2-acec-7c9e14465c25&include=stock_keeping_units&filter%5Bdid_group_type.id%5D=0d51924c-e863-44ff-be59-10547c138955 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/did_groups?filter%5Bcountry.id%5D=c8647639-fc9c-47b2-acec-7c9e14465c25&include=stock_keeping_units&filter%5Bdid_group_type.id%5D=0d51924c-e863-44ff-be59-10547c138955' -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": "1d5aad75-b853-4125-9a1a-da3fedfc5674",
        "type": "did_groups",
        "attributes": {
            "prefix": "7",
            "local_prefix": "",
            "features": [
                "voice",
                "voice_out",
                "sms",
                "sms_out"
            ],
            "is_metered": false,
            "area_name": "Mobile",
            "allow_additional_channels": true
        },
        "relationships": {
            "country": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/country",
                    "related": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/country"
                }
            },
            "city": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/city",
                    "related": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/city"
                }
            },
            "did_group_type": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/did_group_type",
                    "related": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/did_group_type"
                }
            },
            "region": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/region",
                    "related": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/region"
                }
            },
            "stock_keeping_units": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/stock_keeping_units",
                    "related": "https://api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/stock_keeping_units"
                },
                "data": [{
                        "type": "stock_keeping_units",
                        "id": "cb17c069-098e-4be1-a7eb-eb4529e8c5f5"
                    },
                    {
                        "type": "stock_keeping_units",
                        "id": "e194165e-eda7-4718-9bbe-c5c583bd189a"
                    }
                ]
            },
            "requirement": {
                "links": {
                    "self": "https://sandbox-api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/relationships/requirement",
                    "related": "https://sandbox-api.didww.com/v3/did_groups/1d5aad75-b853-4125-9a1a-da3fedfc5674/requirement"
                }
            }
        },
        "meta": {
            "available_dids_enabled": true,
            "needs_registration": false,
            "is_available": true,
            "total_count": 99
        }
    }],
    "included": [{
            "id": "cb17c069-098e-4be1-a7eb-eb4529e8c5f5",
            "type": "stock_keeping_units",
            "attributes": {
                "setup_price": "0.0",
                "monthly_price": "0.3",
                "channels_included_count": 0
            }
        },
        {
            "id": "e194165e-eda7-4718-9bbe-c5c583bd189a",
            "type": "stock_keeping_units",
            "attributes": {
                "setup_price": "0.0",
                "monthly_price": "0.8",
                "channels_included_count": 2
            }
        }
    ],
    "meta": {
        "total_records": 1,
        "api_version": "2021-04-19"
    },
    "links": {
        "first": "https://api.didww.com/v3/did_groups?filter%5Bcountry.id%5D=c8647639-fc9c-47b2-acec-7c9e14465c25&filter%5Bdid_group_type.id%5D=0d51924c-e863-44ff-be59-10547c138955&include=stock_keeping_units&page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "last": "https://api.didww.com/v3/did_groups?filter%5Bcountry.id%5D=c8647639-fc9c-47b2-acec-7c9e14465c25&filter%5Bdid_group_type.id%5D=0d51924c-e863-44ff-be59-10547c138955&include=stock_keeping_units&page%5Bnumber%5D=1&page%5Bsize%5D=50"
    }
}

http

GET /v3/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0&include=stock_keeping_units&filter%5Bprefix%5D=20 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/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0&include=stock_keeping_units&filter%5Bprefix%5D=20' -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": "fc271bcc-1f9c-4c19-8174-28b7c55a208a",
        "type": "did_groups",
        "attributes": {
            "prefix": "20",
            "local_prefix": "",
            "features": [
                "voice",
                "voice_out",
                "t38"
            ],
            "is_metered": false,
            "area_name": "London",
            "allow_additional_channels": true
        },
        "relationships": {
            "country": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/country",
                    "related": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/country"
                }
            },
            "city": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/city",
                    "related": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/city"
                }
            },
            "did_group_type": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/did_group_type",
                    "related": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/did_group_type"
                }
            },
            "region": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/region",
                    "related": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/region"
                }
            },
            "stock_keeping_units": {
                "links": {
                    "self": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/stock_keeping_units",
                    "related": "https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/stock_keeping_units"
                },
                "data": [{
                        "type": "stock_keeping_units",
                        "id": "0ba87a94-7143-48cb-a0f6-d50a6a0c8cfa"
                    },
                    {
                        "type": "stock_keeping_units",
                        "id": "1a86de53-3131-491f-9e4b-3392da45d441"
                    }
                ]
            }
        },
        "meta": {
            "available_dids_enabled": true,
            "needs_registration": false,
            "is_available": true,
            "total_count": 932
        }
    }],
    "included": [{
            "id": "0ba87a94-7143-48cb-a0f6-d50a6a0c8cfa",
            "type": "stock_keeping_units",
            "attributes": {
                "setup_price": "0.0",
                "monthly_price": "0.3",
                "channels_included_count": 0
            }
        },
        {
            "id": "1a86de53-3131-491f-9e4b-3392da45d441",
            "type": "stock_keeping_units",
            "attributes": {
                "setup_price": "0.0",
                "monthly_price": "0.8",
                "channels_included_count": 2
            }
        }
    ],
    "meta": {
        "total_records": 1,
        "api_version": "2021-04-19"
    },
    "links": {
        "first": "https://api.didww.com/v3/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0&filter%5Bprefix%5D=20&include=stock_keeping_units&page%5Bnumber%5D=1&page%5Bsize%5D=50",
        "last": "https://api.didww.com/v3/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0&filter%5Bprefix%5D=20&include=stock_keeping_units&page%5Bnumber%5D=1&page%5Bsize%5D=50"
    }
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized