Interacting with the D&B Data Exchange+ API Using Postman
Postman is a Google Chrome plug-in that allows you to make API calls and inspect responses from within a browser environment. The following Postman collection is available for making calls to these features.
Direct+ Postman collection for dataexchange |
---|
DeX.plus.dnb.com.json.postman_collection |
Quick Start for Using Postman
- Install the Postman Plug-in by opening the Google Chrome browser and visiting http://www.getpostman.com/ to download the component. Once installed, the Postman screen displays, composed of a left sidebar where you can access collections and a request builder where you can enter credentials and request details. Responses display on the bottom of the screen.
- Download the Postman Collection for this D&B Direct+ feature using the link in the preceding section. The collection contains the necessary URLs and requests for accessing and testing the D&B Direct+ API.
- Import the Postman Collection by clicking on the Import symbol towards the top of the Postman window. Drag and drop the collection in the Postman Import window that displays. You'll only need to do this once for each collection.
- Generate a Token by clicking on the Access Token feature within the collection. Then select Basic Auth and replace the username and password with your Consumer Key and Consumer Secret. Click Send. The token displays in the response on the bottom of the screen. Each token will expire after 24 hours.
- Select one of the features within the collection, and in the Bearer field, replace the details after the word, Bearer, with the token you just obtained. Adjust any parameters, then click Send. Response details display on the bottom of the screen.
NOTE: D&B Direct+ calls use access tokens with consumer key and consumer secret credentials that you have obtained from D&B. Refer to "Understanding the D&B Direct+ API Authentication Flow" for more details on the steps involved in authenticating. Please contact your D&B representative if you have not received D&B Direct+ credentials.
NOTE: For more detailed instructions and documentation for Postman, see http://www.getpostman.com/docs/blog_mentions and the project’s web site at http://www.getpostman.com/docs.
Once imported, you should see the collection listed on the left sidebar of the Postman screen.
Generate an Access Token Example
In order to make calls to the D&B Direct+ features, you will need to call the Authorization Server in order to generate an access token.
- Click on the Access Token feature within the collection in the left sidebar.
- Select Basic Auth as the Authorization.
- Replace the username value with your own Consumer Key and replace the password with your Consumer Secret. (You should have obtained your Consumer Key and Consumer Secret from your D&B rep.)
- Click the Send button.
- Copy the {access_token} value from the response (e.g., Z5ZzzIKcew0ujxOEk1dmjsgjXvxg) and save it somewhere. You will need the token for each API request you make within the next 24 hours.
Sample Request
Sample Response
Discover Available Partners Example
- Open Postman and select the feature within the collection (on left sidebar).
- If you have not made other feature requests within the last 24 hours, or if you have not retained your token, generate a new token following the instructions in the preceding section.
- Copy the {access_token} value into the clipboard.
- Paste the {access_token} value into the Authorization header following the word "Bearer" (e.g., "Bearer Z5OpwIKcew0ujxOEk1dmjsgjXvxg")
- This example is configured with test parameters that should yield a successful response. You may alter the parameters to perform additional tests.
- Click Save.
- Click the Send button.
NOTE: Request parameters are case-sensitive, and parameter values must be uuencoded when they contain special characters.