In this chapter, you will learn how to execute API calls to get all the segments a specified user belongs to.

There are 2 versions of the API available. They only differ in the output of possible error messages: Version 2 supports additional information (see Error codes). Thus, it helps to better understand the type of error.


URI Syntax

Version 2 (recommended)

Using the Ever-ID

https://r.mateti.net/segments/v2/{trackId}/{placementId}?everId={everId}


Using the Customer-ID

https://r.mateti.net/segments/v2/{trackId}/{placementId}?customerId={customerId}

Version 1

Using the Ever-ID

https://r.mateti.net/segments/v1/{trackId}/{placementId}?everId={everId}


Using the Customer-ID

https://r.mateti.net/segments/v1/{trackId}/{placementId}?customerId={customerId}



Example: Version 2 with Customer-ID

https://r.mateti.net/segments/v2/1234567891234/23232323/?customerId=04ee2ab263eeb5f0ca1139d7110f 93c8



Query Parameters

ParameterTypeDescription

trackId


String

Mandatory. The trackId of the Marketing Automation account.

 How to get the account ID  

placementIdLong

Mandatory. In the chapter Calling the API Information it is described how to find the desired placement ID.

everIdString

Mandatory. This ID is used to identify the user for whom you want to retrieve information. Alternatively, you can use the customer ID.

The everId is the Webtrekk device ever ID. Depending on your tracking setup you can get this ID from the first-party or third-party cookie.

customerIdString

Mandatory. This ID is used to identify the user for whom you want to retrieve information. Alternatively, you can use the ever ID.

The customer ID must contain the same value that you use for the customer ID in your tracking.