# Test method

## To test the tag integration V2, use partner\_id 1 and key\_id 1, and check if you get this result after having given consent on the CMP :

{% tabs %}
{% tab title="Tag Response" %}

```javascript
sddanCallback({
    "segments": [111111, 222222],
    "contextual_categories": {
        "333333": 100
    },
    "shared_taxonomy": {
        "27446": {
            "segments": [444444, 555555],
            "contextual_categories": {
                "666666": 100
            }
        }
    }
})
```

{% endtab %}
{% endtabs %}

## To test both integration with valid credentials, proceed like below.

## 1) User ID creation

Go to <http://parasolchauffant.com/>, accept terms

## 2) Get encrypted user ID

Go to [https://partner-api.sddan.com/api/v1/public/user/partner/\[PARTNER\_ID\]/user](https://partner-api.sddan.com/api/v1/public/user/partner/23182/user)

![](https://1814921425-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvpRXNkeHv6jzRokkqc%2F-LzqlyIgCERzFNFC-x17%2F-Lzqmg0-jTBVHaDR1JDR%2Fimage.png?alt=media\&token=c24fbb27-ba84-4f70-9c75-6304577f77a1)

{% hint style="info" %}
**Copy** the encrypted **user ID** into your clipboard (e.g see JSON response)
{% endhint %}

## 3) Force user ID into segment id

## Force user ID

<mark style="color:green;">`POST`</mark> `https://partner-api.sddan.com/api/v1/public/user/partner/:partnerId/user/segment`

Force your **user ID** into a Sirdata **segment**.\
Request body is **JSON format**

#### Path Parameters

| Name      | Type   | Description           |
| --------- | ------ | --------------------- |
| partnerId | number | Your given partner id |

#### Query Parameters

| Name   | Type   | Description                           |
| ------ | ------ | ------------------------------------- |
| userId | string | Encrypted user id obtained in step 2) |

#### Request Body

| Name     | Type  | Description                                             |
| -------- | ----- | ------------------------------------------------------- |
| segments | array | List of segment ids you like to force your user ID into |

{% tabs %}
{% tab title="202 User ID is into segment ID 33 and 73" %}

```javascript
curl --request POST \
  --url 'https://partner-api.sddan.com/api/v1/public/user/partner/123/user/segment?userId=NThhOGZiZGE2OGFkNjQ1ZjU0ZWExOTU0u236m6%2BlAqZlUpo%2F1%2BQfCz8323YeNtOs4aV8PUduK3jCEXvsQQWnGgo4aUGW9Gcb0Y0ob5QrXXXX' \
  --header 'content-type: application/json' \
  --data '{
	"segments": [33,73]
}'
```

{% endtab %}

{% tab title="400 " %}

```
```

{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}
