GDPR Consent

GDPR Consent

GDPR Consent

Introduction:


In this article, we talk about API requests related to the mandatory consents of the General Data Protection Regulation (GDPR in English), and how to manage it in our contacts.

- Create consents for a contact
- List and filter consents from one or more contacts

Consents refer to: permissions granted, accepted terms or communications, or other designations, where the guest decides whether to authorize the company to send communications.

At Fideltour, the following types of consents are considered:
  • Consent or acceptance of terms and conditions
  • Consent for commercial communications
  • Consent for personalized commercial communications


Use cases:


This endpoint is necessary to comply with the GDPR and to manage the different types of consent regarding contacts in Fideltour. The consent management endpoint requires the existence of contacts and allows us to query and add new consents to our contacts.
Important: A consent is always associated with a contact.

It is important to comply with the GDPR, therefore, whenever the information or data is available showing whether a contact accepts or not any of the mentioned consents, it is advisable to add the appropriate consent to the contact.

In this way, we ensure that the client is complying with the GDPR when using Fideltour and that communications are not being sent to contacts who have not authorized them. 


Available methods:

All the methods and filters available for working with contacts are available here.

In this article we focus on the following:


  1. GET: Query of data from one or more consent
  2. POST: Creating a newconsent


Parameter table:


Field

Type

Obl.

Description

contact contact contact

Integer

Yes

Contact ID in Fideltour

subscription_type

String

Yes

Type of consent:.

  • T= Terms and Conditions
  • C= Commercial communications
  • P=Com. custom commercial

change_type

Integer

Yes

Status of consent:

  • 0= Does not accept
  • 1= Accepts

source source

Integer

Yes

Origin of contact.

  • 1 = Web booking
  • 2 = Wifi form
  • 3 = Guest Portal
  • 5 = Pms
  • 6 = Import
  • 8 = Contact form

ip

String

No No

Ip

opt_in

String

No No

Type of opt in:

  • S= Simple opt in
  • D=Double opt in
  • P= Double opt in pending

double_opt_in_timestamp

Datetime

Yyy-mm-ddthh:mm:ss


No No

Date of double opt in

double_opt_in_ip

String

No No

Double opt-in IP



Examples:

Here are some examples of creating and listing consent.


Request (POST)):

Creating a consent to a Fideltour contact

Protocol: http/1.1

Method: post

Host/endpoint: https://app.hoteldatahub.io/api/v1/consents/

Headers:

  • Content-type: application/json
  • Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

BODY: An example is added below.

  1. { {
  2. "contact":1160282828,
  3. "subscription_type":"C",
  4. "change_type":1 1 1,
  5. "source":0
  6. }


Answer:

In case of a 200 or 201 response, the following JSON is received:


  1. { {
  2. "id":6069294,
  3. "timestamp":"2023-11-13T13:29:15.469910",
  4. "change_type":0,
  5. "subscription_type":"C",
  6. "unsubscribe_reason":null,
  7. "source":0,
  8. "ip":null,
  9. "opt_in":"S",
  10. "doble_opt_in_timestamp":null,
  11. "doble_opt_in_ip":null,
  12. "contact":1160282828
  13. }


Request (GET):

We list the consent of a contact

Protocol: http/1.1

Method: get

Host/endpoint: https://app.hoteldatahub.io/api/v1/consents?contact=1160282828

Headers:

  • Content-type: application/json
  • Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

QUERY: it is mandatory to send the contact ID via the "contact" attribute


Answer:

In case of a 200 or 201 response, the following JSON is received:


  1. { {
  2. "count":1 1 1,
  3. "next":null,
  4. "previous":null,
  5. "results":[ [ [
  6. { {
  7. "id":6069294,
  8. "timestamp":"2023-11-13T13:29:15.469910",
  9. "change_type":0,
  10. "subscription_type":"C",
  11. "unsubscribe_reason":null,
  12. "source":0,
  13. "ip":null,
  14. "opt_in":"S",
  15. "doble_opt_in_timestamp":null,
  16. "doble_opt_in_ip":null,
  17. "contact":1160282828
  18. }
  19. ],
  20. }


Request (GET):

We obtain a consent for your ID

Protocol: http/1.1

Method: get

Host/endpoint:https://app.hoteldatahub.io/api/v1/consents/

Headers:

  • Content-type: application/json
  • Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


Answer:

In the event of a 200 or 201 response, the following json is received:


  1. { {
  2. "id":6069294,
  3. "timestamp":"2023-11-13T13:29:15.469910",
  4. "change_type":0,
  5. "subscription_type":"C",
  6. "unsubscribe_reason":null,
  7. "source":0,
  8. "ip":null,
  9. "opt_in":"S",
  10. "doble_opt_in_timestamp":null,
  11. "doble_opt_in_ip":null,
  12. "contact":1160282828
  13. }
    • Related Articles

    • Other connections

      Other Introduction In the Hotel Data Hub API, several numeric values are required, which serve to identify an item or element in Fideltour's database. We can deduce that if an item does not exist in the database, it must first be created in order to ...
    • Loyalty

      Loyalty Introduction: In this article we talk about API requests related to the Fideltour Loyalty module. The sections of the Swagger which include this information are: https://app.hoteldatahub.io/swagger/#/contacts ...
    • Motion management

      Movements Table of Contents Introduction Use cases Available methods Table of parameters Examples Petition (POST) Answer (POST) Petition (GET) Answer (GET) Petition (PATCH) Answer (PATCH) Introduction: In this article we talk about API requests ...
    • Introduction

      Getting started Introduction: In this article, we show how to consult and use the HotelDataHub/Fideltour API through the Swagger platform. There, we find the different endpoints (URLs) and the information that must be provided for each one to use the ...
    • Contact management

      Contacts Introduction: In this article we talk about API requests related to Contacts. Create contact Update contact List and filter contacts The endpoint we use is:https://app.hoteldatahub.io/api/v1/contacts/and the Swagger section ...