# Consent point

## Get All Consent Point

<mark style="color:blue;">`GET`</mark> `https://api.domain.com​/api​/services​/app​/ConsentPoints​/GetAll`

ใช้สำหรับแสดงข้อมูลจุดเก็บความยินยอม(consent point)ทั้งหมดที่ user ที่ทำงานอยู่มีสิทธิ์มองเห็น

#### Query Parameters

| Name   | Type   | Description                                                            |
| ------ | ------ | ---------------------------------------------------------------------- |
| Filter | string | ข้อมูลที่ต้องการ filter โดยจะค้นหาในชื่อและรายละเอียดของ consent point |

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | ฺBearer tokenของคุณ |

{% tabs %}
{% tab title="200 successfully retrieved." %}

```
{
    "result": {
    "totalCount": 0,
    "items": [
      {
        "consentPoint": {
          "name": "string",
          "description": "string",
          "userOwnerKey": "string",
          "consentPointUrl": "string",
          "identifierType": "string",
          "isEnableEvent": true,
          "version": 0,
          "status": "string",
          "consentPopup_Title": "string",
          "consentPopup_Intro": "string",
          "consentPopup_Submit": "string",
          "consentPopup_Cancel": "string",
          "consentPopup_Footer": "string",
          "purposesConsentPoint": "string",
          "isRequireOtp": true,
          "purposes": [
            {
              "name": "string",
              "description": "string",
              "status": "string",
              "version": 0,
              "expireTime": "2021-03-06T15:07:47.368Z",
              "isSetExpire": true,
              "purposeCategoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "organizationUnitId": 0,
              "applicationLanguageId": 0,
              "purposeStatusId": 0,
              "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            }
          ],
          "otpType": 0,
          "organizationUnitId": 0,
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        },
        "organizationUnitDisplayName": "string"
      }
    ]
  },
  "targetUrl": null,
  "success": true,
  "error": null,
  "unAuthorizedRequest": false,
  "__abp": true
}
```

{% endtab %}
{% endtabs %}

## Get consent point by ID

<mark style="color:blue;">`GET`</mark> `https://api.domain.com/api/services/app/ConsentPoints/GetConsentPointForView`

ใช้สำหรับแสดงรายละเอียดจุดเก็บความยินยอม(consent point) ตาม ID ที่ระบุมา

#### Query Parameters

| Name | Type   | Description          |
| ---- | ------ | -------------------- |
| ID   | string | ID ของ consent point |

#### Headers

| Name          | Type   | Description        |
| ------------- | ------ | ------------------ |
| Authorization | string | Bearer tokenของคุณ |

{% tabs %}
{% tab title="200 " %}

```
{
  "result": {},
  "targetUrl": null,
  "success": true,
  "error": null,
  "unAuthorizedRequest": false,
  "__abp": true
}
```

{% 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.reddot.co.th/consent-management-api/consent-point.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.
