Quickstart for Business Voice & Cloud Voice

In this Quickstart, you’ll learn how to make your first authenticated Business Voice & Cloud Voice API request and examine the response data.

1

Access

The Business Voice & Cloud Voice APIs are considered secured controlled services, so AT&T will work with you, the client, provide authorization credentials for system-to-system authentication.

2

Security credentials

Upon registering for the Business Voice & Cloud Voice APIs with AT&T, you will be provided with security/authorization credentials to request access to a secure token from the authorization server.

Any API requests should include these credentials within the request, auth JSON section to authorize your requests' access. You will see the structure of API auth section, in the example below. Please note the token below is fake.

This is an example:
1
2
3
4
5
6
7
8
9
                "auth": {
                    "type": "bearer",
                    "bearer": [
                        "key": "token",
                        "value": "ohvfciosdiochwejkcshsbvicwiiciwuiecwiuwcibwuicwiiviuiwcbsuigciskjdbcuiwvobiwbvuicdbdisbsdcbsduicwsvb",
                        "type": "string"
                    ]
                }
3

Sample request

The Service Qualification API's checkServiceQualification request retrieves details about the qualification of specified numbers under a Billing Account Number. This example retrieves details about service qualification for TNs based on BAN or Billing Account Number.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
    "instantSyncQualification": true,
    "provideUnavailabilityReason": true,
    "externalId": "GUID",
    "relatedParty": [
        {
            "id": "12345678910",
            "name": "BAN"
        },
        {
            "id": "service_id",
            "name": "ServiceProviderAccountId"
        }
    ],
    "serviceQualificationItem": [
        {
            "id": "+13333333333",
            "service": {
                "serviceType": "ACV-Mobile"
            }
        },
        {
            "id": "+19999999999",
            "service": {
                "serviceType": "ACV-Mobile"
            }
        },
        {
            "id": "+15555555555",
            "service": {
                "serviceType": "ACV-Mobile"
            }
        }
    ]
}
4

Examine the response

The response contains an array of service qualification items with their details. This is an example of a response showing three different TNs and their possible unavailability reasons:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  "instantSyncQualification": true,
  "provideUnavailabilityReason": true,
  "externalId": "GUID",
  "relatedParty": [
    {
      "id": "12345678910",
      "name": "BAN"
    },
    {
      "id": "service_id",
      "name": "ServiceProviderAccountId"
    }
  ],
  "serviceQualificationItem": [
    {
      "id": "+13333333333",
      "service": {
        "serviceType": "ACV-Mobile"
      },
      "qualificationResult": "qualified"
    },
    {
      "id": "+19999999999",
      "service": {
        "serviceType": "ACV-Mobile"
      },
      "qualificationResult": "unqualified",
      "eligibilityUnavailabilityReason": [
        {
          "code": "4000",
          "label": "Ineligible - not meeting qualification rules"
        }
      ]
    },
    {
            "id": "+15555555555",
            "service": {
                "serviceType": "ACV-Mobile"
            },
            "qualificationResult": "unqualified",
            "eligibilityUnavailabilityReason": [
                {
                    "code": "4009",
                    "label": "Ineligible – BAN does not match"
                }
            ]
    }
  ]
}