Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Custom FCM and HMS Implementations
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
        • Custom FCM and HMS Implementations
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Consent Requests with Short URL
  • ETK Short URL Parameters
  • Sample ETK Requests
  • ETK Request SMS Short URL
  • ETK Request Email Short URL
  • Invalid ETK Requests
  • Invalid SMS Short URL
  • Invalid Email Short URL
  • KVK Short URL Parameters
  • Sample KVK Requests
  • KVK Request SMS Short URL
  • KVK Request Email Short URL
  • Invalid KVK Requests
  • Invalid SMS Short URL Request
  • Invalid Email Short URL Request
  • KVK & ETK Parameters
  • ETK & KVK Request SMS Short URL
  • ETK & KVK Request Email Short URL
  • Invalid ETK & KVK Requests
  • Invalid ETK & KVK SMS Short URL Request

Was this helpful?

  1. Integrated Modules
  2. VIA Integration

Short URL Consent Requests

PreviousVIA IntegrationNextOTP Consent Requests

Last updated 3 months ago

Was this helpful?

For a full version, please see the board .

1

Prepare the Short URL Consent Form

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 to the User

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

User Submits Their Consent

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

Consent Data Saved in Netmera

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

Consent Requests with Short URL

1

Start Consent Process

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

Access Consent Form

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

3

Consent Given

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

Netmera Consent Update

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

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": "recipient@example.com",
  "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": "....@gmail.com",
  "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": "...@gmail.com",
  "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

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": "....@gmail.com",
  "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": "...@gmail.com",
  "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 #parameters-for-etk and #parameters-for-kvk.

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": "...@gmail.com",
  "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": "...@gmail.com",
  "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": "...@google.com"
}

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": "...@gmail.com",
  "verificationType": "EPOSTA_SHORTURL",
  "referenceId": "user1234"
}'

Example Error Response (HTTP 400)

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

Retrieve this ID from the VIA Management interface.

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 .

IYS Web
İYS Web
here