The Adara Data API 2.0 allows data onboarding using a secure REST API. This API is designed to reduce the effort required for the onboarding process. Our data ingestion pipelines are designed to be configurable by an ADARA technical consultant, so we can accept different types of data for different industries. The main requirement is that the data must be in a JSON format.
The Data API 2.0 can be implemented as a standalone integration or in conjunction with the Web SDK. The ADARA API can be used for the following use cases:
The API documentation for the endpoint is detailed here: Data APIAPI
An Adara Technical Consultant will provision the following to you access the production endpoint:
You will need a credential for the production endpoint:
Here is an example cURL command for acquiring the access token. However, you can use any REST API client to access the endpoint.
xxxxxxxxxx
curl -X POST \
-H 'content-type: application/json' \
-d '{"client_id":"REPLACE_CLIENT_ID","client_secret":"REPLACE_CLIENT_SECRET","audience":"https://api.adara.com","grant_type":"client_credentials"}' \
https://auth-prod.adara.com/api/v1.0/oauth/token
Here is an example of the response with your access token. Note the expiry time for the access token.
xxxxxxxxxx
{
"access_token": "YOUR_ACCESS_TOKEN",
"expires_in": 56712,
"scope": "get:status get:subscriptions get:schemas post:events post:validate post:process post:files post:reports post:partners get:partners post:testsJobs get:jobs post:send get:send",
"token_type": "Bearer"
}
Send a HTTPS POST request to the following endpoint and path to onboard data:
POST /send/{pipeline_id}
Here is an example cURL command to onboard data. However, you can use any REST API client to access the endpoint.
xxxxxxxxxx
curl -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer REPLACE_ACCESS_TOKEN' \
-d @myfile.json \
https://onboarding.adara.com/v2/send/{pipeline_id}
In the above example, we are using a data file named myfile.json
. We recommend that the contents of the file be JSON-formatted as in this example for a product definition file. Our pipeline configuration allows our technical consultants to configure the data ingestion process to flexibly parse any JSON object so you are not restricted to a prescribed format.
xxxxxxxxxx
{
'sku': '00062333',
'product description': 'Product A',
'unit price': 39.99,
'colors': ['black','red','white']'
}
{
'sku': '00033408',
'product description': 'Product B',
'unit price': '29.99',
'colors': ['gold','purple','white']'
}
Here is a sample response. There will be a response for each JSON record.
xxxxxxxxxx
{
"active": true,
"response": {
"payload": {
},
"success": true,
"created": 1590102151
}
}