Short URL Consent Requests

For a full version, please see the board here.

1

Prepare a Short URL consent form using your IYS Panel. Once the form is ready, submit it to IYS for approval.

2

Obtain IYS Approval

After IYS approves the form, it will be available for use in API calls. The form ID provided by IYS will serve as the formId value in your requests.

3

Send the consent form link to your users via email or SMS. Use the API endpoint https://restapi.netmera.com/via/consent to share the link with your users.

4

When the user receives the link, they can open the form, select their SMS or email permissions, and submit their approval.

5

Confirmation Information Sent to the User

After the user submits their consent, they will receive a confirmation via email or SMS informing them of the permissions they selected and their submission status.

6

Netmera saves the user permissions in the Netmera Panel. This synchronization occurs every 10 minutes to ensure the latest user preferences are reflected.

1

The consent method initiates the process of obtaining ETK (Electronic Communication Permission) and/or KVKK (Personal Data Protection Law) consent. A short URL linking to a webpage where recipients can complete the approval process, along with an explanation text, is sent to the recipient. The method returns a requestId value as a response.

2

The recipient clicks on the short URL, which redirects them to a webpage where they can provide their ETK and/or KVKK consent.

3

Once the recipient provides consent:

  • ETK consent is recorded on behalf of the brand(s).

  • KVKK consent is recorded on behalf of the service provider.

4

After consent is received, recipient's ETK consent (EMAIL/SMS notification preferences) is saved in the Netmera system in every 10 minutes.

ETK Short URL Parameters

Below are the required parameters for requesting ETK using short URL verification methods, either through SMS or email.

Fields in the Request Body

Field
Type
Description
Required
Notes

consentTypes

Array of Objects

Details of the consent request.

Yes

Each object must include title, types, and recipientType.

title

String

The type of consent being requested.

Yes

Example value: "ETK"

types

Array of Strings

Communication channels for which consent is being requested.

Yes

Possible values: ["ARAMA"], ["MESAJ"], ["ARAMA", "MESAJ"], ["MESAJ", "ARAMA"], ["EPOSTA"].

recipientType

String

Specifies the type of recipient.

Yes

Accepted values: "BİREYSEL" (Individual), "TACIR" (Trader).

formId

String

The ID of the consent form to be delivered to the recipient.

Yes

Retrieve this ID from the IYS Web VIA Management interface.

recipient

String

Contact information of the recipient. Either a phone number or email address.

Yes

Ensure proper format for phone numbers or email addresses. "+90536......."

verificationType

String

Method of obtaining consent via VIA.

Yes

Possible values: SMS_SHORTURL (via SMS short link) or EPOSTA_SHORTURL (via email short link).

referenceID

String

Identifies the users in Netmera system. This identifier is used to create or update user records for VIA.

Yes

Example value: "user1234"

Sample ETK Requests

Notes:

  • Replace your_rest_api_key with your actual REST API key.

  • Ensure formId corresponds to a valid form ID from the IYS Web VIA Management portal.

  • Modify recipient with the actual recipient’s email or phone number based on your use case.

ETK Request SMS Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["MESAJ", "EPOSTA"],
      "recipientType": "BİREYSEL"
    }
  ],
  "formId": "12345abcde",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Successful Response (HTTP 200)

{
    "requestId": "requestid"
}

ETK Request Email Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["EPOSTA"],
      "recipientType": "BIREYSEL"
    }
  ],
  "formId": "your_formId",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Successful Response (HTTP 200)

{
    "requestId": "requestid"
}

Invalid ETK Requests

Invalid SMS Short URL

Case: An invalid combination where verificationType is SMS_SHORTURL but the types field contains "EPOSTA".

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["EPOSTA", "SMS", "ARAMA"],
      "recipientType": "BIREYSEL"
    }
  ],
  "formId": "your_formId",
  "recipient": "+9053........",
  "verificationType": "SMS_SHORTURL",
  "referenceId": "user1234"
}'

Error Response (HTTP 400)

{
    "message": "Girdiğiniz 'EPOSTA' izin tipi, doğrulama tipi 'SMS_SHORTURL' ile uyuşmamaktadır. Uyuşan geçerli değerler: [SMS_FATURA, MESAJ, E_FATURA, AYDINLATMA_METNI, ACIK_RIZA_METNI, YURTDISI_AKTARIM, UYELIK_ONAYI, ARAMA]",
    "code": "H1085"
}

Invalid Email Short URL

Case: An invalid value for the verificationType field is provided. Instead of EPOSTA_SHORTURL, EPOSTA_SHORTLINK is used.

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["EPOSTA"],
      "recipientType": "BIREYSEL"
    }
  ],
  "formId": "your_formId",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTLINK",
  "referenceId": "user1234"
}'

Error Response (HTTP 400)

{
    "message": "verificationType alanı için gereken değerler: [SMS_OTP, EPOSTA_OTP, SMS_SHORTURL, EPOSTA_SHORTURL, SMS_APPROVALURL, EPOSTA_APPROVALURL, SMS_CEVAP, SMS_RED, URL_RED] olmalıdır.",
    "code": "H1012",
    "value": "EPOSTA_SHORTLINK"
}

KVK Short URL Parameters

Below are the required parameters for requesting KVK using short URL verification methods, either through SMS or email.

Fields in the Request Body

Field Name
Type
Required
Description

consentTypes

Array of Objects

Yes

Contains details about the type of consent requested.

title

String

Yes

Type of form sent to the recipient. For KVK consent, this field must be set as "KVK".

types

Array of Strings

Yes

Consent types for KVK. Possible values: "AYDINLATMA_METNI", "ACIK_RIZA_METNI", "YURTDISI_AKTARIM".

formId

String

Yes

ID of the form sent to the recipient. The corresponding consent form will be sent to the recipient based on this ID. Obtainable via the İYS Web.

verificationType

String

Yes

Method of obtaining consent via ViA. Use "SMS_SHORTURL" for SMS-based short link verification or "EPOSTA_SHORTURL" for email-based short link verification.

recipient

String

Yes

Contact information of the recipient. Either a phone number or email address where the consent request will be sent.

referenceID

String

Yes

Identifies the users in Netmera system. This identifier is used to create or update user records for VIA.

personData

Object

Yes (personal data)

Contains recipient details if KVK consent requires personal information.

name

String

Yes (personal data)

Recipient's full name.

recipientIdNumber

String

Yes (personal data)

Recipient's Turkish ID number.

address

String

Yes (personal data)

Recipient's address information.

Additional Information

  • Fields in personData (e.g., name, recipientIdNumber, and address) become mandatory if required by the KVK process.

  • The formId uniquely identifies the consent form and ensures it is correctly delivered to the recipient.

Sample KVK Requests

KVK Request SMS Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "KVK",
      "types": ["AYDINLATMA_METNI"],
      "personData": {
        "name": "username",
        "recipientIdNumber": "134........",
        "address": "null"
      }
    }
  ],
  "formId": "your_formId",
  "recipient": "+90536.......",
  "verificationType": "SMS_SHORTURL",
  "referenceId": "user1234"
}'

Successful Response (HTTP 200):

{
    "requestId": "requestid"
}

KVK Request Email Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "KVK",
      "types": ["AYDINLATMA_METNI", "ACIK_RIZA_METNI"],
      "personData": {
        "name": "username",
        "recipientIdNumber": "134........",
        "address": "null"
      }
    }
  ],
  "formId": "your_formId",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Successful Response (HTTP 200):

{
    "requestId": "requestid"
}

Invalid KVK Requests

In case of a failed request, the response will include the following fields:

  • message (String): The error message that describes the issue with the request.

  • code (String): The error code from the IYS system indicating the specific issue.

  • value (String) (This field may return the invalid value depending on the type of error, or it may be omitted): The invalid value that caused the error.

Invalid SMS Short URL Request

Case: verificationType is set to SMS_SHORTURL but the types array contains an EPOSTA value, which is incompatible with SMS verification.

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "KVK",
      "types": ["EPOSTA"],
      "recipientType": "BIREYSEL"
    }
  ],
  "formId": "your_formId",
  "recipient": "+9053........",
  "verificationType": "SMS_SHORTURL",
  "referenceId": "user1234"
}'

Sample Error Response (HTTP 400):

{
    "message": "Girdiğiniz 'EPOSTA' izin tipi, doğrulama tipi 'SMS_SHORTURL' ile uyuşmamaktadır. Uyuşan geçerli değerler: [SMS_FATURA, MESAJ, E_FATURA, AYDINLATMA_METNI, ACIK_RIZA_METNI, YURTDISI_AKTARIM, UYELIK_ONAYI, ARAMA]",
    "code": "H1085"
}

Invalid Email Short URL Request

Case: The recipientIdNumber field contains an incorrectly formatted identity number.

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "KVK",
      "types": ["AYDINLATMA_METNI", "ACIK_RIZA_METNI"],
      "personData": {
        "name": "name",
        "recipientIdNumber": "A23493434",
        "address": "address"
      }
    }
  ],
  "formId": "your_formid",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Error Response (HTTP Code: 400)

{
    "message": "Girdiğiniz TC kimlik numarası: '**' formata uygun değildir.",
    "code": "H1096"
}

KVK & ETK Parameters

For ETK approval: The request must include the following fields:

  1. Verification Method (verificationType)

  2. Recipient's Communication Address (recipient)

  3. Communication Channel (types)

  4. Recipient Type (recipientType)

  5. Approval Type (title)

  6. Form ID (formId) (The ID of the approval form to be sent to the recipient)

For KVK approval: The request must include the following fields:

  1. Verification Method (verificationType)

  2. Recipient's Communication Address (recipient)

  3. Recipient's Full Name (name)

  4. Recipient's National ID Number (recipientIdNumber)

  5. Recipient's Address Information (address)

  6. Approval Type (title)

  7. Form ID (formId) (The ID of the approval form to be sent to the recipient)

You may find the explanations of each field on Short URL Consent Requests and Short URL Consent Requests.

ETK & KVK Request SMS Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["MESAJ", "ARAMA"],
      "recipientType": "BIREYSEL"
    },
    {
      "title": "KVK",
      "types": [
        "AYDINLATMA_METNI"
      ],
      "personData": {
        "name": "name",
        "recipientIdNumber": "134........",
        "address": "address"
      }
    }
  ],
  "formId": "your_formid",
  "recipient": "+90536.......",
  "verificationType": "SMS_SHORTURL",
  "referenceId": "user1234"
}'

Success Response (HTTP 200)

{
    "requestId": "requestid"
}

ETK & KVK Request Email Short URL

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": [
        "EMAIL"
      ],
      "recipientType": "BIREYSEL"
    },
    {
      "title": "KVK",
      "types": [
        "AYDINLATMA_METNI"
      ],
      "personData": {
        "name": "name",
        "recipientIdNumber": "134........",
        "address": "address"
      }
    }
  ],
  "formId": "your_formid",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Success Response (HTTP 200)

{
    "requestId": "requestid"
}

Invalid ETK & KVK Requests

In case of a failed request, the response will include the following fields:

  • message (String): The error message that describes the issue with the request.

  • code (String): The error code from the IYS system indicating the specific issue.

  • value (String) (This field may return the invalid value depending on the type of error, or it may be omitted): The invalid value that caused the error.

Invalid ETK & KVK SMS Short URL Request

Case: The recipient field is provided in an invalid format when verificationType is SMS_SHORTURL.

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["MESAJ"],
      "recipientType": "BIREYSEL"
    },
    {
      "title": "KVK",
      "types": ["AYDINLATMA_METNI"],
      "personData": {
        "name" : "name",
        "recipientIdNumber": "123...",
        "address": "address"
      }
    }
  ],
  "formId": "your_formid",
  "recipient": "[email protected]",
  "verificationType": "SMS_SHORTURL",
  "referenceId": "user1234"
}'

Example Error Response (HTTP 400)

{
    "message": "Alıcı (recipient) için E164 uluslararası([+][country code][area code][local phone number]) formatına uygun bir telefon numarası girilmelidir. (örn. `+905992000000`)",
    "code": "H1026",
    "value": "[email protected]"
}

ETK & KVK Email Short URL Error Request

Case: The name field is not provided in the request.

curl --location 'https://restapi.netmera.com/via/consent' \
--header 'X-netmera-api-key: your_rest_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "consentTypes": [
    {
      "title": "ETK",
      "types": ["EPOSTA"],
      "recipientType": "BIREYSEL"
    },
    {
      "title": "KVK",
      "types": ["AYDINLATMA_METNI"],
      "personData": {
        "recipientIdNumber": "123....",
        "address": "address"
      }
    }
  ],
  "formId": "your_formid",
  "recipient": "[email protected]",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Example Error Response (HTTP 400)

{
    "message": "JSON verisinde eksik alanlar: name",
    "code": "H1090"
}

Last updated

Was this helpful?