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 },
20 "meta": {
21 "api_version": "2017-09-18"
22 }
23 }
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 "meta": {
45 "api_version": "2017-09-18"
46 }
47}
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 "id": "1b8a6517-a4f5-4851-b534-4e3fddb15c2b",
7 "type": "available_dids",
8 "attributes": {
9 "number": "16362660758"
10 },
11 "relationships": {
12 "did_group": {
13 "links": {
14 "self": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/relationships/did_group",
15 "related": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/did_group"
16 },
17 "data": {
18 "type": "did_groups",
19 "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db"
20 }
21 }
22 }
23 },
24 "included": [
25 {
26 "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
27 "type": "did_groups",
28 "attributes": {
29 "prefix": "636",
30 "local_prefix": "",
31 "features": [
32 "voice"
33 ],
34 "is_metered": false,
35 "area_name": "Washington",
36 "allow_additional_channels": true
37 },
38 "relationships": {
39 "country": {
40 "links": {
41 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/country",
42 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/country"
43 }
44 },
45 "city": {
46 "links": {
47 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/city",
48 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/city"
49 }
50 },
51 "did_group_type": {
52 "links": {
53 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/did_group_type",
54 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/did_group_type"
55 }
56 },
57 "region": {
58 "links": {
59 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/region",
60 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/region"
61 }
62 },
63 "stock_keeping_units": {
64 "links": {
65 "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/stock_keeping_units",
66 "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/stock_keeping_units"
67 },
68 "data": [
69 {
70 "type": "stock_keeping_units",
71 "id": "eab604a5-d276-4233-aca3-da790cd8ac1e"
72 },
73 {
74 "type": "stock_keeping_units",
75 "id": "9da717e2-b235-43fd-ba12-9677fea6dea8"
76 }
77 ]
78 }
79 },
80 "meta": {
81 "available_dids_enabled": true,
82 "needs_registration": false,
83 "is_available": true,
84 "total_count": 82,
85 "restrictions": null
86 }
87 },
88 {
89 "id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
90 "type": "stock_keeping_units",
91 "attributes": {
92 "setup_price": "0.0",
93 "monthly_price": "0.09",
94 "channels_included_count": 0
95 }
96 },
97 {
98 "id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
99 "type": "stock_keeping_units",
100 "attributes": {
101 "setup_price": "0.0",
102 "monthly_price": "0.19",
103 "channels_included_count": 2
104 }
105 }
106 ],
107 "meta": {
108 "api_version": "2017-09-18"
109 }
110}
Other Responses
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
401 |
No |