# 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)

![](/files/-Lzqmg0-jTBVHaDR1JDR)

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sirdata.net/ads-api/test-procedure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
