Get Available DID
Description
Returns a single Available DID from DIDWW inventory.
Note
Available DID request is not enabled by default. To enable this feature, please contact our Customer Service or Sales Departments.
Request
HTTP Method: GET
URI Path: /v3/available_dids/
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
id |
|
Yes |
Unique ID number of the Available DID. |
include |
|
No |
Includes:
Value |
Description |
---|---|
did_group |
|
did_group.stock_keeping_units |
|
nanpa_prefix |
Examples
GET /v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
curl -i -X GET https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "75a21935-acfd-4160-8485-9fb7d049f144",
"type": "available_dids",
"attributes": {
"number": "12124727604"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/did_group"
}
},
"nanpa_prefix": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/nanpa_prefix",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/nanpa_prefix"
}
}
}
},
"meta": {
"api_version": "2022-05-10"
}
}
GET /v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144?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 -i -X GET 'https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144?include=did_group' -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "75a21935-acfd-4160-8485-9fb7d049f144",
"type": "available_dids",
"attributes": {
"number": "12124727604"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/did_group"
},
"data": {
"type": "did_groups",
"id": "916c8f4d-2108-4d79-853b-7c545ee83f8c"
}
},
"nanpa_prefix": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/nanpa_prefix",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/nanpa_prefix"
}
}
}
},
"included": [
{
"id": "916c8f4d-2108-4d79-853b-7c545ee83f8c",
"type": "did_groups",
"attributes": {
"prefix": "212",
"features": [
"voice_in",
"t38"
],
"is_metered": false,
"area_name": "New York",
"allow_additional_channels": true
},
"relationships": {
"country": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/country",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/country"
}
},
"city": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/city",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/city"
}
},
"did_group_type": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/did_group_type",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/did_group_type"
}
},
"region": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/region",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/region"
}
},
"stock_keeping_units": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/stock_keeping_units",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/stock_keeping_units"
}
},
"requirement": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/requirement",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/requirement"
}
}
},
"meta": {
"available_dids_enabled": true,
"needs_registration": false,
"is_available": true,
"total_count": 8
}
}
],
"meta": {
"api_version": "2022-05-10"
}
}
GET /v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144?include=did_group.stock_keeping_units HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
curl -i -X GET 'https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144?include=did_group.stock_keeping_units' -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "75a21935-acfd-4160-8485-9fb7d049f144",
"type": "available_dids",
"attributes": {
"number": "12124727604"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/did_group"
},
"data": {
"type": "did_groups",
"id": "916c8f4d-2108-4d79-853b-7c545ee83f8c"
}
},
"nanpa_prefix": {
"links": {
"self": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/relationships/nanpa_prefix",
"related": "https://api.didww.com/v3/available_dids/75a21935-acfd-4160-8485-9fb7d049f144/nanpa_prefix"
}
}
}
},
"included": [
{
"id": "916c8f4d-2108-4d79-853b-7c545ee83f8c",
"type": "did_groups",
"attributes": {
"prefix": "212",
"features": [
"voice_in",
"t38"
],
"is_metered": false,
"area_name": "New York",
"allow_additional_channels": true
},
"relationships": {
"country": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/country",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/country"
}
},
"city": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/city",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/city"
}
},
"did_group_type": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/did_group_type",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/did_group_type"
}
},
"region": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/region",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/region"
}
},
"stock_keeping_units": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/stock_keeping_units",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/stock_keeping_units"
},
"data": [
{
"type": "stock_keeping_units",
"id": "af589936-3e8d-498c-b127-8054ef026dfa"
},
{
"type": "stock_keeping_units",
"id": "5dec9d3e-f25a-4ac3-a9b0-efcdd9ec744b"
},
{
"type": "stock_keeping_units",
"id": "e48e981f-ab6d-48a6-aaf6-e75539fc1011"
}
]
},
"requirement": {
"links": {
"self": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/relationships/requirement",
"related": "https://api.didww.com/v3/did_groups/916c8f4d-2108-4d79-853b-7c545ee83f8c/requirement"
}
}
},
"meta": {
"available_dids_enabled": true,
"needs_registration": false,
"is_available": true,
"total_count": 8
}
},
{
"id": "af589936-3e8d-498c-b127-8054ef026dfa",
"type": "stock_keeping_units",
"attributes": {
"setup_price": "0.0",
"monthly_price": "0.09",
"channels_included_count": 0
}
},
{
"id": "5dec9d3e-f25a-4ac3-a9b0-efcdd9ec744b",
"type": "stock_keeping_units",
"attributes": {
"setup_price": "0.0",
"monthly_price": "0.19",
"channels_included_count": 2
}
},
{
"id": "e48e981f-ab6d-48a6-aaf6-e75539fc1011",
"type": "stock_keeping_units",
"attributes": {
"setup_price": "4.42",
"monthly_price": "4.42",
"channels_included_count": 5
}
}
],
"meta": {
"api_version": "2022-05-10"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
404 |
No |
|
401 |
No |