Datatalks API: Using the API

Before starting to use the API you need to provide some information to us:

  • What data are you going to send to us?
  • What integrations do you want to use?
  • How do you want this data to be mapped?

After providing that information, you are going to receive the following from us:

  • Credentials to authenticate against our API
  • A group key that must be part of every request

What data are you going to send us?

We expect a flat data containing everything you want to forward to the enabled integrations. The API contract looks like this:

{
	"data": {
    	// your data here
	},
	"group_key": "abc123"
}

Inside the data object, you can add as many attributes as you want as long as they remain flat, i.e. no nested objects are supported inside it. Here is an example:

{
	"data": {
		"epost": "john.doe@example.com",
		"namn": "John Doe",
		"something_else": "some value",
		"some_tags": ["TAG1", "TAG2"]
	},
	"group_key": "abc123"
}

What integrations do you want to use?

You need to specify which integrations do you want to use. Depending on the integration, you might need to provide us with credentials so we can integrate with your account.

The list of available integrations could be found here.

How do you want this data to be mapped?

Each integration provides a certain set a fields that can be used. We need you to specify how the attributes in your data will be mapped to the fields of the integration, i.e. which field corresponds to which field in the integration. After you specify the mapping we will configure it on our side. If you ever need to change it, let us know so we can re-configure it for you.

For more information about mappings, read here.

Credentials to authenticate against our API

After requesting access to our API, we will give you credentials - ACCESS_KEY_ID and SECRET_ACCESS_KEY. You will use them to authenticate against the API via AWS Signature Version 4. For more information, read out article on authentication.

A group key that must be part of every request

A group key is our internal way to group your integrations. This is useful if you have multiple brands or markets and have different accounts in the integration systems and you want to sent separate API requests to them. In case you don't have such, you will have only one group_key to work with. Make sure that the group_key is sent in every request.