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 |
|
Optional |
Includes:
Value |
Description |
---|---|
did_group |
|
did_group.stock_keeping_units |
Examples
GET /v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a 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/5265f3a0-0446-46f1-ae1a-f09946e80a9a -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": "5265f3a0-0446-46f1-ae1a-f09946e80a9a",
"type": "available_dids",
"attributes": {
"number": "19254349408"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a/did_group"
}
}
}
},
"meta": {
"api_version": "2017-09-18"
}
}
GET /v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d?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/80167e78-62a1-4720-bf00-229fa7e1935d?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": "80167e78-62a1-4720-bf00-229fa7e1935d",
"type": "available_dids",
"links": {
"self": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d"
},
"attributes": {
"number": "771232341231"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d/did_group"
},
"data": {
"type": "did_groups",
"id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683"
}
}
}
},
"included": [
{
"id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683",
"type": "did_groups",
"attributes": {
"prefix": "77",
"local_prefix": "",
"features": [
"voice",
"sms"
],
"is_metered": false,
"area_name": "National",
"allow_additional_channels": true
}
}
],
"meta": {
"api_version": "2017-09-18"
}
}
GET /v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b?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/1b8a6517-a4f5-4851-b534-4e3fddb15c2b?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": "1b8a6517-a4f5-4851-b534-4e3fddb15c2b",
"type": "available_dids",
"attributes": {
"number": "16362660758"
},
"relationships": {
"did_group": {
"links": {
"self": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/relationships/did_group",
"related": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/did_group"
},
"data": {
"type": "did_groups",
"id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db"
}
}
}
},
"included": [
{
"id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
"type": "did_groups",
"attributes": {
"prefix": "636",
"local_prefix": "",
"features": [
"voice"
],
"is_metered": false,
"area_name": "Washington",
"allow_additional_channels": true
},
"relationships": {
"country": {
"links": {
"self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/country",
"related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/country"
}
},
"city": {
"links": {
"self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/city",
"related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/city"
}
},
"did_group_type": {
"links": {
"self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/did_group_type",
"related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/did_group_type"
}
},
"region": {
"links": {
"self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/region",
"related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/region"
}
},
"stock_keeping_units": {
"links": {
"self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/stock_keeping_units",
"related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/stock_keeping_units"
},
"data": [
{
"type": "stock_keeping_units",
"id": "eab604a5-d276-4233-aca3-da790cd8ac1e"
},
{
"type": "stock_keeping_units",
"id": "9da717e2-b235-43fd-ba12-9677fea6dea8"
}
]
}
},
"meta": {
"available_dids_enabled": true,
"needs_registration": false,
"is_available": true,
"total_count": 82,
"restrictions": null
}
},
{
"id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
"type": "stock_keeping_units",
"attributes": {
"setup_price": "0.0",
"monthly_price": "0.09",
"channels_included_count": 0
}
},
{
"id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
"type": "stock_keeping_units",
"attributes": {
"setup_price": "0.0",
"monthly_price": "0.19",
"channels_included_count": 2
}
}
],
"meta": {
"api_version": "2017-09-18"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
404 |
No |
|
401 |
No |