Get DID Groups
GET https://{{host}}/v3/did_groups?include=stock_keeping_units&filter[is_available]=true&filter[country.id]={{country.id}}&filter[city.id]={{city.id}}&filter[did_group_type.id]={{did_group_type.id}}
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 Params
Key | Datatype | Required | Description |
---|---|---|---|
include | string | Comma-separated values of include parameter. | |
The response will include a top-level object relationships with associated data under the appropriate resource key. | |||
Details in Inclusion of Related Resources Article. |
Allowed values:
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 Object
*** |
| filter[is_available]
| boolean | | boolean
- Filters by the is_available field.
-
Allow blank - No.
-
Allow array - No. | |
filter[country.id]
| string | |string
- Filters by the country.id field. -
Allow blank - Yes.
-
Allow array - Yes. | |
filter[city.id]
| string | |string
- Filters by the city.id field. -
Allow blank - Yes.
-
Allow array - Yes. | |
filter[did_group_type.id]
| string | |string
- Filters by the did_group_type.id field. -
Allow blank - Yes.
-
Allow array - Yes. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string | ||
Api-Key | string |
RESPONSES
status: OK
"{\n \"data\": [\n {\n \"id\": \"fc271bcc-1f9c-4c19-8174-28b7c55a208a\",\n \"type\": \"did_groups\",\n \"attributes\": {\n \"prefix\": \"20\",\n \"local_prefix\": \"\",\n \"features\": [\n \"voice\",\n \"voice_out\",\n \"t38\"\n ],\n \"is_metered\": false,\n \"area_name\": \"London\",\n \"allow_additional_channels\": true\n },\n \"relationships\": {\n \"country\": {\n \"links\": {\n \"self\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/country\",\n \"related\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/country\"\n }\n },\n \"city\": {\n \"links\": {\n \"self\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/city\",\n \"related\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/city\"\n }\n },\n \"did_group_type\": {\n \"links\": {\n \"self\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/did_group_type\",\n \"related\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/did_group_type\"\n }\n },\n \"region\": {\n \"links\": {\n \"self\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/region\",\n \"related\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/region\"\n }\n },\n \"stock_keeping_units\": {\n \"links\": {\n \"self\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/relationships/stock_keeping_units\",\n \"related\": \"https://api.didww.com/v3/did_groups/fc271bcc-1f9c-4c19-8174-28b7c55a208a/stock_keeping_units\"\n },\n \"data\": [\n {\n \"type\": \"stock_keeping_units\",\n \"id\": \"0ba87a94-7143-48cb-a0f6-d50a6a0c8cfa\"\n },\n {\n \"type\": \"stock_keeping_units\",\n \"id\": \"1a86de53-3131-491f-9e4b-3392da45d441\"\n }\n ]\n }\n },\n \"meta\": {\n \"available_dids_enabled\": true,\n \"needs_registration\": false,\n \"is_available\": true,\n \"total_count\": 932,\n \"restrictions\": null\n }\n }\n ],\n \"included\": [\n {\n \"id\": \"0ba87a94-7143-48cb-a0f6-d50a6a0c8cfa\",\n \"type\": \"stock_keeping_units\",\n \"attributes\": {\n \"setup_price\": \"0.0\",\n \"monthly_price\": \"0.3\",\n \"channels_included_count\": 0\n }\n },\n {\n \"id\": \"1a86de53-3131-491f-9e4b-3392da45d441\",\n \"type\": \"stock_keeping_units\",\n \"attributes\": {\n \"setup_price\": \"0.0\",\n \"monthly_price\": \"0.8\",\n \"channels_included_count\": 2\n }\n }\n ],\n \"meta\": {\n \"total_records\": 1\n },\n \"links\": {\n \"first\": \"https://api.didww.com/v3/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0\u0026filter%5Bprefix%5D=20\u0026include=stock_keeping_units\u0026page%5Bnumber%5D=1\u0026page%5Bsize%5D=50\",\n \"last\": \"https://api.didww.com/v3/did_groups?filter%5Bcity.id%5D=e696dec7-9c65-4e99-aab7-55a1f98154f0\u0026filter%5Bprefix%5D=20\u0026include=stock_keeping_units\u0026page%5Bnumber%5D=1\u0026page%5Bsize%5D=50\""