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#
http
1GET /v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -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"
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "5265f3a0-0446-46f1-ae1a-f09946e80a9a",
7 "type": "available_dids",
8 "attributes": {
9 "number": "19254349408"
10 },
11 "relationships": {
12 "did_group": {
13 "links": {
14 "self": "https://api.didww.com/v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a/relationships/did_group",
15 "related": "https://api.didww.com/v3/available_dids/5265f3a0-0446-46f1-ae1a-f09946e80a9a/did_group"
16 }
17 }
18 }
19 }
http
1GET /v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d?include=did_group HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -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"
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4 {
5 "data": {
6 "id": "80167e78-62a1-4720-bf00-229fa7e1935d",
7 "type": "available_dids",
8 "links": {
9 "self": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d"
10 },
11 "attributes": {
12 "number": "771232341231"
13 },
14 "relationships": {
15 "did_group": {
16 "links": {
17 "self": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d/relationships/did_group",
18 "related": "https://api.didww.com/v3/available_dids/80167e78-62a1-4720-bf00-229fa7e1935d/did_group"
19 },
20 "data": {
21 "type": "did_groups",
22 "id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683"
23 }
24 }
25 }
26 },
27 "included": [
28 {
29 "id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683",
30 "type": "did_groups",
31 "attributes": {
32 "prefix": "77",
33 "local_prefix": "",
34 "features": [
35 "voice",
36 "sms"
37 ],
38 "is_metered": false,
39 "area_name": "National",
40 "allow_additional_channels": true
41 }
42 }
43 ]
44}
http
1GET /v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b?include=did_group.stock_keeping_units HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -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"
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "attributes": {
7 "number": "16362660758"
8 },
9 "id": "1b8a6517-a4f5-4851-b534-4e3fddb15c2b",
10 "relationships": {
11 "did_group": {
12 "data": {
13 "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
14 "type": "did_groups"
15 },
16 "links": {
17 "related": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/did_group",
18 "self": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/relationships/did_group"
19 }
20 }
21 },
22 "type": "available_dids"
23 },
24 "included": [
25 {
26 "attributes": {
27 "allow_additional_channels": true,
28 "area_name": "Washington",
29 "features": [
30 "voice"
31 ],
32 "is_metered": false,
33 "local_prefix": "",
34 "prefix": "636"
35 },
36 "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
37 "meta": {
38 "available_dids_enabled": true,
39 "is_available": true,
40 "needs_registration": false
41 },
42 "relationships": {
43 "city": {
44 "links": {
45 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/city",
46 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/city"
47 }
48 },
49 "country": {
50 "links": {
51 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/country",
52 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/country"
53 }
54 },
55 "did_group_type": {
56 "links": {
57 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/did_group_type",
58 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/did_group_type"
59 }
60 },
61 "region": {
62 "links": {
63 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/region",
64 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/region"
65 }
66 },
67 "stock_keeping_units": {
68 "data": [
69 {
70 "id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
71 "type": "stock_keeping_units"
72 },
73 {
74 "id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
75 "type": "stock_keeping_units"
76 }
77 ],
78 "links": {
79 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/stock_keeping_units",
80 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/stock_keeping_units"
81 }
82 }
83 },
84 "type": "did_groups"
85 },
86 {
87 "attributes": {
88 "channels_included_count": 0,
89 "monthly_price": "0.09",
90 "setup_price": "0.0"
91 },
92 "id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
93 "type": "stock_keeping_units"
94 },
95 {
96 "attributes": {
97 "channels_included_count": 2,
98 "monthly_price": "0.19",
99 "setup_price": "0.0"
100 },
101 "id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
102 "type": "stock_keeping_units"
103 }
104 ]
105}
Other Responses
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
401 |
No |