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

string

Yes

Unique ID number of the Available DID.

includes

string

Optional

Inclusion

Includes:

Value

Description

did_group

DID Group Object

did_group.stock_keeping_units

Stock Keeping Unit Object

Examples

http

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

curl -i 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

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"
             }
         }
     }
 }

http

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

curl -i '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

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
      }
    }
  ]
}

http

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

curl -i '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

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
          "data": {
    "attributes": {
      "number": "16362660758"
    },
    "id": "1b8a6517-a4f5-4851-b534-4e3fddb15c2b",
    "relationships": {
      "did_group": {
        "data": {
          "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
          "type": "did_groups"
        },
        "links": {
          "related": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/did_group",
          "self": "https://api.didww.com/v3/available_dids/1b8a6517-a4f5-4851-b534-4e3fddb15c2b/relationships/did_group"
        }
      }
    },
    "type": "available_dids"
  },
  "included": [
    {
      "attributes": {
        "allow_additional_channels": true,
        "area_name": "Washington",
        "features": [
          "voice"
        ],
        "is_metered": false,
        "local_prefix": "",
        "prefix": "636"
      },
      "id": "fe6cde1e-d68b-41e9-b1a0-8a617c65f3db",
      "meta": {
        "available_dids_enabled": true,
        "is_available": true,
        "needs_registration": false
      },
      "relationships": {
        "city": {
          "links": {
            "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/city",
            "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/city"
          }
        },
        "country": {
          "links": {
            "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/country",
            "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/country"
          }
        },
        "did_group_type": {
          "links": {
            "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/did_group_type",
            "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/did_group_type"
          }
        },
        "region": {
          "links": {
            "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/region",
            "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/region"
          }
        },
        "stock_keeping_units": {
          "data": [
            {
              "id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
              "type": "stock_keeping_units"
            },
            {
              "id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
              "type": "stock_keeping_units"
            }
          ],
          "links": {
            "related": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/stock_keeping_units",
            "self": "https://api.didww.com/v3/did_groups/fe6cde1e-d68b-41e9-b1a0-8a617c65f3db/relationships/stock_keeping_units"
          }
        }
      },
      "type": "did_groups"
    },
    {
      "attributes": {
        "channels_included_count": 0,
        "monthly_price": "0.09",
        "setup_price": "0.0"
      },
      "id": "eab604a5-d276-4233-aca3-da790cd8ac1e",
      "type": "stock_keeping_units"
    },
    {
      "attributes": {
        "channels_included_count": 2,
        "monthly_price": "0.19",
        "setup_price": "0.0"
      },
      "id": "9da717e2-b235-43fd-ba12-9677fea6dea8",
      "type": "stock_keeping_units"
    }
  ]
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized