The API provides REST based access to D&B Connect. All requests must be made over HTTPS. All request and response body data is in JSON format.
Important information about D&B Connect API:
Key and secret were emailed to your Administrator with the subject line D&B Connect - Private API Key
D&B Connect API calls utilize access tokens, generated from a consumer key/secret combination, for authentication (based on the Client Credentials Grant flow of the OAuth 2 specification).
For details on generating an Access Token, please see the Authentication Guide.
The D&B Connect API is based on REST principles: data resources are accessed via standard HTTPS requests in UTF-8 format to an API endpoint. Where possible, the API strives to use appropriate HTTP verbs for each action:
VERB | DESCRIPTION |
---|---|
POST | Used for creating an Access Token |
GET | Used for retrieving content |
The purpose of the Connect API is to match your input data with an entity so it can be further enriched by Dun & Bradstreet data.
Match TypesConnect API supports four different match types
Providing more data than the minimum is encouraged since it will provide more accurate match results.
ParametersConnect API accepts up to 12 parameters. Depending on the match type various ones are required.
Parameter | Description | Example |
---|---|---|
duns | The 9 digit D-U-N-S value for the entity (leading zeros are optional) | 804735132 |
name | The name of the entity | Gorman Manufacturing |
streetAddressLine1 | The first line of the street address | 7700 W. Parmer Ln |
streetAddressLine2 | The second line of the street address | Building A |
addressLocality | The city or town | Austin |
addressRegion | The state or province | Texas |
postalCode | The postal or ZIP code | 78729 |
country | The country or region. Can be ful name or ISO abbreviation | US |
telephoneNumber | The telephoneNumber number | +1 (512) 827-4532 |
registrationNumber | A registration number for the entity. Can be tax id or similar | 48-4958224 |
url | url or domain of the entity (protocol part not required) | www.dnb.com |
Email address at the entity | charles@bnb.com |
Parameter | Match Type | |||
---|---|---|---|---|
D-U-N-S Match | Name & Location Match | Registration Number Match | Domain (email or URL) Match | |
duns | required | |||
name | required | |||
streetAddressLine1 | ||||
streetAddressLine2 | ||||
addressLocality | ||||
addressRegion | ||||
postalCode | ||||
country | required | required | ||
telephoneNumber | ||||
registrationNumber | required | |||
url | required | |||
required |
A D-U-N-S match for Source_drcjq1kc (source values found in Connect web interface)
GET https://plus.dnb.com/v1/connect/matchEnrich/v1/Source_drcjq1kc?duns=804735132
A Name and Location match with the minimum required data
GET https://plus.dnb.com/v1/connect/matchEnrich/v1/Source_drcjq1kc?name=Gorman
All data is received as a JSON object. The response contains four main sections:
Example of successful D-U-N-S match response:
{
{
"inquiryDetail": {
"name": "GORMAN",
"country": "US"
},
"matchCandidates": [
{
"organization": {
"duns": "802707141",
"dunsControlStatus": {
"operatingStatus": {
"description": "Active"
}
},
"primaryName": "GORMAN COMPANY",
"primaryAddress": {
"addressCountry": {
"isoAlpha2Code": "US"
}
}
},
"matchQualityInformation": {
"confidenceCode": 6,
"matchGrade": "AZZZZZZZFZZ",
"matchDataProfile": "0099999999999999000000980098",
"nameMatchScore": 100.0
}
}
],
"candidatesMatchedQuantity": 1,
"matchDataCriteria": "Name and Address Lookup",
"matchStatus": "success",
"embeddedProduct": {
"organization": {
"duns": "802707141",
"primaryName": "Gorman Company",
"assignmentModel": {
"salesReliability": {
"dnbCode": 33392
},
"physicalLocation": {
"employeeCount": 3,
"salesAmount": 1332326.0
},
"domesticUltimate": {
"employeeCount": 8,
"familyTreeMembersCount": 2
}
},
"countryISOAlpha2Code": "US",
"primaryAddress": {
"addressLocality": {
"name": "Phoenix"
},
"addressRegion": {
"name": "Arizona",
"abbreviatedName": "AZ"
}
}
}
},
"cleanseAndStandardizeInformation": {},
"transactionDetail": {
"transactionID": "rrt-0b7918993e371e8cc-c-ea-26329-212763782-20",
"transactionTimestamp": "2022-03-30 12:56:02+0000",
"serviceVersion": "1",
"inLanguage": "en-US"
}
}
D&B Connect applies rate limits on a subscriber basis (based on Consumer Key), regardless of how many users are using the API.
If you get status code 429, it means there were too many requests to be processed. Additional information is under Adhere to rate limiting guidelines.
D&B Connect limits the number of requests based on contract. Quotas based on UTC time; Quota counters are reset based on the term as follows:
Each API call counts towards the quota regardless of product or feature used; it is the total number of calls for the API.
Please see the Data Transport Security section in FAQ for more details.
Non-breaking changes tend to be additive: adding new fields or nested resources to your resource representations, adding new endpoints such as a PUT or PATCH that was previously unavailable. API consumers should build client code that is resilient to these kinds of non-breaking changes.
Breaking changes include:
We strongly recommend that you design your integration with the following guidelines in mind:
In order to prevent abuse and undue stress, API clients have restrictions for transactions per second (tps) and transactions quota per week, month, or year based on the customer contract.
If tps is exceeded, the system responds with a 429 HTTP status code, along with one of the following as part of the JSON response body:
"error": {
"errorCode": 0045,
"errorMessage": "Too Many Requests."
}
"error": {
"errorCode": 0046,
"errorMessage": "Too Many Requests."
}
In addition, Connect uses a Spike Arrest for each API to handle traffic spikes and avoid lag and downtime.
If Spike Arrest limit is exceeded, the system responds with a 429 HTTP status code, along with one of the following as part of the JSON response body:
"error": {
"errorCode": 0047,
"errorMessage": "Too Many Requests."
}
Handle "Too Many Requests" error
We recommend that you design your integration to gracefully handle the tps limit error. One way of doing that would be to have your integration sleep for 60 seconds when this error is encountered, and then subsequently retry the request. Alternatively, you might choose to implement exponential backoff (an error handling strategy whereby you periodically retry a failed request with progressively longer wait times between retries, until either the request succeeds or the certain number of retry attempts is reached).
A successful error handling strategy requires that your integration recognize the difference between errors that can potentially be resolved by retrying the request and errors that should never be retried automatically. The HTTP status code that is returned with each response is your first indication as to the outcome of the request.
HTTP status code | Meaning | Retry? |
---|---|---|
2xx | Request was successful. | n/a |
4xx | A problem with the request prevented it from being executed successfully. | Never automatically retry the request. |
5xx | The request was properly formatted, but the operation failed on the D&B side. | In some scenarios, requests could be automatically retried using exponential
backoff. In other cases, requests should not be retried. |
A list of error codes and recommendations for handing are available under Resources: Error and Information Codes.
We strongly recommend that you design your integration such that it is capable of logging API requests and responses. Having access to the raw requests and responses (including detailed error codes and error messages) when API issues emerge will streamline troubleshooting and accelerate time to resolution.
The following examples show the type of information that your application should log for API requests and responses.
Request: verb, URI, header(s), request body
GET https://plus.dnb.com/v1/data/duns/2376389?productId=cmpelk&versionId=v1Authorization: Bearer MY_TOKEN Content-Type: application/json
Response: HTTP status code, response body
HTTP status: 400 Bad Request
{
"transactionDetail": {
"transactionID": "rrt-e39b70d3-b-ea-4947-10833556-1",
"transactionTimestamp": "2017-03-24T21:24:46.545Z",
"inLanguage": "en-US",
"productID": null,
"productVersion": null
},
"inquiryDetail": {
"duns": "2376389",
"productID": "cmpelk",
"productVersion": "v1"
},
"error": {
"errorCode": "10003",
"errorMessage": "Supplied DUNS number format is invalid"
}
}
Should you encounter issues with the API while building an integration using a particular programming language (e.g., Java, C#, PHP, Python), keep the following troubleshooting techniques in mind:
A Connect API Tutorial using Postman is available here.
Postman collections are provided for each API: Postman Collections.