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
  • Request Body Parameters
  • Error Responses
  • Example Successful Request
  • Example Failed Request

Was this helpful?

  1. Integrated Modules
  2. VIA Integration

VIA Email Rejection Link Generation

This method allows service providers to generate unique rejection links for email addresses that are approved in the IYS (Electronic Commercial Message Management System). Service providers can include these links in their emails to offer recipients the option to opt out. A maximum of 100 REJECT links can be created simultaneously for recipients whose permission status is APPROVED in IYS.

Important Notes:

  1. The request must include the recipient's email address (recipient) and recipient type (recipientType).

  2. If the request is successful, the response will contain a generated rejection link (URL) along with the recipient's email address.

Successful Rejection Process:

  • If the recipient's (recipient) permission status is APPROVED, it is updated to REJECT upon execution.

Note: The generated email links can be embedded within customer emails. Users can click on these links to opt out of receiving email notifications. Once a rejection is made, it is reflected in IYS. Netmera monitors and updates user permissions nightly based on IYS task results.

Request Body Parameters

curl --location 'https://restapi.netmera.com/via/generate-reject-mail-link' \
--header 'X-netmera-api-key: your_rest_apikey' \
--header 'Content-Type: application/json' \
--data-raw '{
  "recipients": [
    {
      "recipient": "String", // Email address to be unsubscribed [Required]
      "recipientType": "String" // Type of the email address. Accepted values: BIREYSEL (Individual) or TACIR (Corporate) [Required]
    }
  ]
}

Response Body (HTTP Code: 200)

[
  {
    "url": "String", // Generated rejection link
    "recipient": "String", // Corresponding email address
    "code": "String", // Error code (if applicable) [Optional]
    "message": "String" // Error message (if applicable) [Optional]
  }
]

Error Responses

HTTP Code: 400

{
  "errors": [
    {
      "message": "String", // Description of the error
      "code": "String", // Error code
      "value": "String", // Incorrect value sent in the request
      "location": ["String"] // Fields in the request that contain errors
    }
  ]
}

HTTP Code: 500

{
  "message": "Error while parsing the data."
}

Example Successful Request

curl --location 'https://restapi.netmera.com/via/generate-reject-mail-link' \
--header 'X-netmera-api-key: your_rest_apikey' \
--header 'Content-Type: application/json' \
--data-raw '{
    "recipients": [
        {
            "recipient": "..x@gmail.com",
            "recipientType": "BIREYSEL"
        },
        {
            "recipient": "..y@gmail.com",
            "recipientType": "BIREYSEL"
        }
    ]
}'

Example Successful Response (HTTP Code: 200)

[
    {
        "url": "generated_rejection_link",
        "recipient": "..x@gmail.com"
    },
    {
        "recipient": "..y@gmail.com",
        "code": "H568",
        "message": "Sadece ONAY durumunda olan izinler için link üretilmelidir."
    }
]

Example Failed Request

Case: An invalid recipientType value is sent.

curl --location 'https://restapi.netmera.com/via/generate-reject-mail-link' \
--header 'X-netmera-api-key: your_rest_apikey' \
--header 'Content-Type: application/json' \
--data-raw '{
    "recipients": [
        {
            "recipient": "x@gmail.com",
            "recipientType": "test"
        },
        {
            "recipient": "y@gmail.com",
            "recipientType": "BIREYSEL"
        }
    ]
}'

Example Error Response (HTTP Code: 400)

{
    "errors": [
        {
            "message": "Alıcı tipi (recipientType) için uygun değerler: BIREYSEL, TACIR",
            "code": "H116",
            "value": "test",
            "location": [
                "recipientType"
            ]
        }
    ]
}
PreviousOTP Confirmation CompletionNextETK Rejection via SMS

Last updated 3 months ago

Was this helpful?