API that delivers dnb JSON stream.
This API,
- respect REST rules of use
- is version controlled (not yet)
- have coherent return HTTP codes (40x,50x,20x)
- have fault handling
- have response caching
- is accessible from the 'URL (URL) by building URLs from the segments listed in this document.
A RESTful concept, a resource path is a uniform resource identifier (URI) that identifies the network path to a given resource.
The version of the developer-facing API interface.
For example, vwt.com/buffer/v1
.
- 200 OK - Everything worked as expected.
- 204 OK - Everything worked as expected. (No message Body)
- 400 Bad Request - Often missing a required parameter.
- 401 Unauthorized - No valid API key provided.
- 402 Request Failed - Parameters were valid but request failed.
- 404 Not Found - The requested item doesn't exist.
- 500, 502, 503, 504 Server errors - something went wrong on backend.
First your must declare your BUFFER url and your TOKEN
$ export BUFFER=https://l788b5qdxh.execute-api.eu-west-1.amazonaws.com/uat
$ export TOKEN=0DQpKCw5uHoWEqbbIu7B4r7FqTVpQE97R5K0vGBe
The with curl
and jq
for JSON formating you can test all the endpoints
To help you testing check for valid DUNS numbers here
Return pong
This route will return the lambda parameters only in dev
ou ppd
envs
$ curl -H 'Cache-Control: no-cache' -v $BUFFER/ping | jq
Return a DUNS profile with executives informations
Body Parameters:
- duns (Integer) (required) : DUNS number
$ curl -H 'Cache-Control: no-cache' -v -H "x-api-key: 0DQpKCw5uHoWEqbbIu7B4r7FqTVpQE97R5K0vGBe" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"duns":788138980}' $BUFFER/executives
Return a DUNS profile
Body Parameters:
- duns (Integer) (required) : DUNS number
$ curl -H 'Cache-Control: no-cache' -v -H "x-api-key: $TOKEN" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"duns":788138980}' $BUFFER/profile
Search matches for your given parameters
Body Parameters:
- duns (Integer) (optional) : DUNS number
All parameters can be found here https://docs.dnb.com/direct/plus/en-US/match/latest/index#FeatureRequest
$ curl -H 'Cache-Control: no-cache' -v -H "x-api-key: $TOKEN" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"duns":788138980}' $BUFFER/match
$ curl -H 'Cache-Control: no-cache' -v -H "x-api-key: $TOKEN" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{
"name": "D2SI",
"countryISOAlpha2Code": "FR"
}' $BUFFER/match
$ curl -H 'Cache-Control: no-cache' -v -H "x-api-key: $TOKEN" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{
"name": "AMR Corporation",
"StreetAddressLine1": "4333 Amon Carter Blvd.",
"addressRegion": "TX",
"postalCode": 76155,
"countryISOAlpha2Code": "US"
}' $BUFFER/match