Short URL Consent Requests

For a full version, please see the board here.
Consent Requests with Short URL
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.
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
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
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
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
, andaddress
) 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:
Verification Method (
verificationType
)Recipient's Communication Address (
recipient
)Communication Channel (
types
)Recipient Type (
recipientType
)Approval Type (
title
)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:
Verification Method (
verificationType
)Recipient's Communication Address (
recipient
)Recipient's Full Name (
name
)Recipient's National ID Number (
recipientIdNumber
)Recipient's Address Information (
address
)Approval Type (
title
)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?