Call an API - Precisely Data Integrity Suite

Data Integrity Suite APIs

Product
Data_Integrity
Spatial_Analytics
Data_Enrichment
geo_addressing_1
Services
Spatial Analytics
Data Enrichment
Geo Addressing
ft:title
Data Integrity Suite APIs
ft:locale
en-US
PublicationType
pt_developer
copyrightfirst
2023
copyrightlast
2026

In this example, we will show how you can use a token to make API requests.

Bearer tokens covered by this topic are particularly useful for user based sessions on the web. They provide temporary access to resources. They enhance security with short lifespans and granular permissions and they reduce risk of credential exposure. They can carry user context and identity while they are easily revoked in case of suspicious activity.

We will use Postman and cURL to call the Address Verification API endpoint. The procedure is much the same for other endpoints.

Use Postman to call an API

  1. On the Collections panel, choose an DIS API POST method, such as Address Parser > POST Single Request.
    Note: The trial environment does not include permissions for all of the Data Integrity Suite APIs.
  2. On the Authorization tab, for Auth Type, choose Bearer Token.
  3. For Token, specify the global variable {{authToken}} defined in the key-secret authentication procedure.
  4. Click Send.
    If successful, this creates this response object in the response body:
    {
        "response": {
            "status": "OK",
            "address": {
                "addressNumber": "1700",
                "admin1": "ma",
                "city": "burlington",
                "street": "district ave",
                "unit": "#300"
            }
        }
    }
You can try other API endpoints in the DIS APIs collection. Refer to the API documentation for parameters, headers, and body content. Not all requests require token authentication. Data or functionality accessed by some of the APIs are not available in the trial. These return the 401 Unauthorized or the 403 Forbidden status code.

Use cURL to call an API

Here is the same request in cURL.

curl --location 'base-URL/v1/address/parse' \
--header 'accept: application/json' \
--header 'Authorization: Bearer authToken' \
--header 'Content-Type: application/json' \
--data '{ "address": "1700 district ave #300 burlington, ma"}'
curl --location 'https://api.cloud.precisely.com/v1/address/parse' \
--header 'accept: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJNcXY2RWNBR0JNUElKbEdnRG1LYkNISC1fZkpaam4y...' \
--header 'Content-Type: application/json' \
--data '{ "address": "1700 district ave #300 burlington, ma"}'
curl --location "base-URL/v1/address/parse" ^
--header "accept: application/json" ^
--header "Authorization: Bearer authToken" ^
--header "Content-Type: application/json" ^
--data "{ \"address\": \"1700 district ave #300 burlington, ma\"}"
curl --location "https://api.cloud.precisely.com/v1/address/parse" ^
--header "accept: application/json" ^
--header "Authorization: Bearer eyJraWQiOiJNcXY2RWNBR0JNUElKbEdnRG1LYkNISC1fZkpaam4y..." ^
--header "Content-Type: application/json" ^
--data "{ \"address\": \"1700 district ave #300 burlington, ma\"}"