Schemas

ConsentId

1
"C01"
Name Type Required Description
anonymous string false Consent definition unique identifier (normalized to uppercase without spaces and special characters)

ConsentType

1
"ACCEPTANCE"
Name Type Required Description
anonymous string false Consent statement choice type list:
* ACCEPTANCE - Text written in affirmative. May be in pending state
* OPPOSITION - Text written in negative. It cannot be in pending state and must be represented with a checkbox

ConsentChoice

1
0
Name Type Required Description
anonymous integer false Consent statement choice list:
* 0 - Consent accepted
* 1 - Consent choice unknown
* 2 - Consent rejected

Language

1
"es"
Name Type Required Description
anonymous string false Language in locale in RFC 5646 format (defined in RFC 5646, which rely on the ISO 639). Ex: es, ca, eu, en, fr

UserType

1
"customers, leads"
Name Type Required Description
anonymous string false Type of users the consent tree applies to

ConsentDetails

1
2
3
4
5
6
{
  "language": "es",
  "text": "Información comercial de servicios nuestros distintos a los contratados o de otras empresas del Grupo",
  "description": "Pertenecemos a un Grupo de empresas que prestan productos o servicios de diversa naturaleza, tales como energía, telecomunicaciones, tecnológicos, servicios y equipos para el hogar, financieros o servicios de valor añadido relacionados, por ejemplo, con la salud o seguros o autoconsumo, habitualmente con descuentos o condiciones especiales para clientes del Grupo.",
  "short_text": "Información de otros servicios contratados"
}
Name Type Required Description
language Language true Language in locale in RFC 5646 format (defined in RFC 5646, which rely on the ISO 639). Ex: es, ca, eu, en, fr
text string true Full text of the consent
description string true Detailed description of the consent
short_text string true Shortened version of the consent text

SellChannel

1
"ecare"
Name Type Required Description
anonymous string false Starting point of the user consent acquisition
Sell channel list:
* app - App portfolio client
* appPopup - App portfolio client popup
* ecare - Private client area
* ecarePopup - Private client area popup
* eshop - Online web store acquisition client
* lpemail - Email campaign landing page
* lpsms - Sms campaign landing page
* mycrm - Post sales portal, non presential phone sale
* mycrmPopup - Post sales portal, non presential phone sales for portfolio clients
* myventa - Sales portal, non presential phone sale
* pos - Presential sale, seles portal in store
* renuevo - Existing client, hiring another terminal
* televenta - Sales portal, non presential phone sale
* topUps - Presential sale, prepaid recharge machine in store
* vista - CRM postsale
* vistaPopup - CRM popup postsale
* webdealer - Sales portal, presential, sale in store

UserSegment

1
"string"
Name Type Required Description
anonymous string false Regulated sector where user belongs to.
Allowed values: telco, energy

GetConsentsResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "statements": [
    {
      "id": "C01",
      "choice": 0,
      "choice_type": "ACCEPTANCE",
      "text": "Publicidad productos y servicios del grupo",
      "description": "Descripción detallada de Publicidad productos y servicios del grupo",
      "child_statements": [
        {}
      ]
    }
  ],
  "locale": "es_ES"
}
Name Type Required Description
statements [GetConsentStatement] true Tree structure for consents and default choices where keys are identifiers
locale string true Locale. If text is not found, locale will be the organization default locale

PostConsentsResponse

1
2
3
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}
Name Type Required Description
id string(uuid) true User consents unique identifier at Mas Consents

GetConsentStatement

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
  "id": "C01",
  "choice": 0,
  "choice_type": "ACCEPTANCE",
  "text": "Publicidad productos y servicios del grupo",
  "description": "Descripción detallada de Publicidad productos y servicios del grupo",
  "child_statements": [
    {
      "id": "C01",
      "choice": 0,
      "choice_type": "ACCEPTANCE",
      "text": "Publicidad productos y servicios del grupo",
      "description": "Descripción detallada de Publicidad productos y servicios del grupo",
      "child_statements": []
    }
  ]
}
Name Type Required Description
id ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
choice integer true Consent statement choice list:
* 0 - Consent accepted
* 1 - Consent choice unknown
* 2 - Consent rejected
choice_type ConsentType true Consent statement choice type list:
* ACCEPTANCE - Text written in affirmative. May be in pending state
* OPPOSITION - Text written in negative. It cannot be in pending state and must be represented with a checkbox
text string true Consent statement text
description string true Consent text description
child_statements [GetConsentStatement] true Nested user consent statements

PostConsentsCustomerRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "actor_id": "YC004315",
  "selections": [
    {
      "id": "C01",
      "choice": 0
    }
  ],
  "ip": "84.44.81.103",
  "sell_channel": "ecare",
  "trace_id": "12C148A",
  "capture_date": "2017-07-21T17:32:28Z"
}
Name Type Required Description
actor_id string true Information about what agent/system/user is setting consents
selections [UserConsentSelection] true User cosents choices, in array format, chosen by the user
ip string true IP address of the actor who modifies the user consents
When the actor is, directly, the client who modifies their consents, it is important that ip is client ip address and not any kind of middleware system ip
sell_channel SellChannel true Starting point of the user consent acquisition
Sell channel list:
* app - App portfolio client
* appPopup - App portfolio client popup
* ecare - Private client area
* ecarePopup - Private client area popup
* eshop - Online web store acquisition client
* lpemail - Email campaign landing page
* lpsms - Sms campaign landing page
* mycrm - Post sales portal, non presential phone sale
* mycrmPopup - Post sales portal, non presential phone sales for portfolio clients
* myventa - Sales portal, non presential phone sale
* pos - Presential sale, seles portal in store
* renuevo - Existing client, hiring another terminal
* televenta - Sales portal, non presential phone sale
* topUps - Presential sale, prepaid recharge machine in store
* vista - CRM postsale
* vistaPopup - CRM popup postsale
* webdealer - Sales portal, presential, sale in store
trace_id string true Trazability info
capture_date string(date-time) true none

GetUserMetadataResponse

1
2
3
4
{
  "customer_id": "439885739840",
  "impact": true
}
Name Type Required Description
customer_id string true The customer identifier at CRM
impact boolean true Define if user it is an impactable user. This is the field that will be taken into account for the launch of campaigns or popups for the capture of consents

UserConsentSelection

1
2
3
4
{
  "id": "C01",
  "choice": 0
}
Name Type Required Description
id ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
choice ConsentChoice true Consent statement choice list:
* 0 - Consent accepted
* 1 - Consent choice unknown
* 2 - Consent rejected

CreateConsentRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "id": "C01",
  "type": "ACCEPTANCE",
  "consent": [
    {
      "language": "es",
      "text": "Información comercial de servicios nuestros distintos a los contratados o de otras empresas del Grupo",
      "description": "Pertenecemos a un Grupo de empresas que prestan productos o servicios de diversa naturaleza, tales como energía, telecomunicaciones, tecnológicos, servicios y equipos para el hogar, financieros o servicios de valor añadido relacionados, por ejemplo, con la salud o seguros o autoconsumo, habitualmente con descuentos o condiciones especiales para clientes del Grupo.",
      "short_text": "Información de otros servicios contratados"
    }
  ]
}
Name Type Required Description
id ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
type ConsentType true Consent statement choice type list:
* ACCEPTANCE - Text written in affirmative. May be in pending state
* OPPOSITION - Text written in negative. It cannot be in pending state and must be represented with a checkbox
consent [ConsentDetails] true Array of consent details for different locales

SavedConsentResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "id": "C01",
  "languages": [
    "es",
    "ca",
    "eu",
    "ga",
    "en"
  ]
}
Name Type Required Description
id ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
languages [string] true List of languages supported by the consent

UpdateConsentRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "consent": [
    {
      "language": "es",
      "text": "Información comercial de servicios nuestros distintos a los contratados o de otras empresas del Grupo",
      "description": "Pertenecemos a un Grupo de empresas que prestan productos o servicios de diversa naturaleza, tales como energía, telecomunicaciones, tecnológicos, servicios y equipos para el hogar, financieros o servicios de valor añadido relacionados, por ejemplo, con la salud o seguros o autoconsumo, habitualmente con descuentos o condiciones especiales para clientes del Grupo.",
      "short_text": "Información de otros servicios contratados"
    }
  ],
  "changes_description": "Added new language"
}
Name Type Required Description
consent [ConsentDetails] true none
changes_description string false Optional description of the changes made

CreateConsentTreeRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  "description": "Default Telco Configuration",
  "default_language": "es-ES",
  "allowed_languages": [
    "es",
    "eu",
    "en"
  ],
  "consents_order": [
    "C01"
  ],
  "priority_consent_ids": [
    "C01"
  ],
  "views": [
    {
      "view": "MANDATORY",
      "consents": [
        "C01"
      ]
    }
  ],
  "dependencies": [
    {
      "father": "C01",
      "child": [
        "C01"
      ]
    }
  ],
  "channels": [
    "crm",
    "agents",
    "web",
    "whatsapp",
    "landing_web",
    "landing_mobile"
  ],
  "users_type": "customers, leads"
}
Name Type Required Description
description string true Description of the consent tree
default_language string true Default locale for the consent tree
allowed_languages [Language] true List of allowed languages to ask text for
consents_order [ConsentId] true Order of consents in the tree when visualized by user
priority_consent_ids [ConsentId] true List of priority consent IDs
views [ConsentTreeView] true Different views (group of consents) for the consent tree
dependencies [ConsentDependency] false (Optional) Dependencies between consents
channels [string] true Channels where the consent tree is applicable to be captured
users_type UserType true Type of users the consent tree applies to

ConsentTreeView

1
2
3
4
5
6
{
  "view": "MANDATORY",
  "consents": [
    "C01"
  ]
}
Name Type Required Description
view string true Name of the view
consents [ConsentId] true Consents included in the view

ConsentDependency

1
2
3
4
5
6
{
  "father": "C01",
  "child": [
    "C01"
  ]
}
Name Type Required Description
father ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
child [ConsentId] true consent_id of the child consents dependent on the father

UpdateConsentTreeRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  "description": "Default Telco Configuration",
  "default_language": "es-ES",
  "allowed_languages": [
    "es",
    "eu",
    "en"
  ],
  "consents_order": [
    "C01"
  ],
  "priority_consent_ids": [
    "C01"
  ],
  "change_log": "Added new consent",
  "views": [
    {
      "view": "MANDATORY",
      "consents": [
        "C01"
      ]
    }
  ],
  "dependencies": [
    {
      "father": "C01",
      "child": [
        "C01"
      ]
    }
  ],
  "channels": [
    "crm",
    "agents",
    "web",
    "whatsapp",
    "landing"
  ],
  "users_type": "customers, leads"
}
Name Type Required Description
description string false Description of the consent tree
default_language string false Default locale for the consent tree
allowed_languages [Language] false List of allowed languages to ask text for
consents_order [ConsentId] false Order of consents in the tree when visualized by user
priority_consent_ids [ConsentId] false List of priority consent IDs
change_log string false Description of the changes made in this update
views [ConsentTreeView] false Different views (group of consents) for the consent tree
dependencies [ConsentDependency] false (Optional) Dependencies between consents
channels [string] false Channels where the consent tree is applicable to be captured
users_type UserType false Type of users the consent tree applies to

GetConsentsDefinitionsResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "consents": [
    {
      "id": "C01",
      "choice_type": "ACCEPTANCE",
      "consent": [
        {
          "language": "es",
          "text": "Información comercial de servicios nuestros distintos a los contratados o de otras empresas del Grupo",
          "description": "Pertenecemos a un Grupo de empresas que prestan productos o servicios de diversa naturaleza, tales como energía, telecomunicaciones, tecnológicos, servicios y equipos para el hogar, financieros o servicios de valor añadido relacionados, por ejemplo, con la salud o seguros o autoconsumo, habitualmente con descuentos o condiciones especiales para clientes del Grupo.",
          "short_text": "Información de otros servicios contratados"
        }
      ],
      "subject": "john@company.com",
      "creation_date": "2023-12-15T08:23:13.000Z"
    }
  ]
}
Name Type Required Description
consents [object] true none
» id ConsentId true Consent definition unique identifier (normalized to uppercase without spaces and special characters)
» choice_type ConsentType true Consent statement choice type list:
* ACCEPTANCE - Text written in affirmative. May be in pending state
* OPPOSITION - Text written in negative. It cannot be in pending state and must be represented with a checkbox
» consent [ConsentDetails] true none
» subject string false Email or identifier of the user who created/updated the consent (captured from ‘x-auth-subject’ header)
» creation_date string(date-time) true Date and time when the consent was created

ErrorsResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "MCONS_CODE",
      "title": "ERROR_TITLE",
      "ref": "https://developers.masstack.com/en/docs/apis_consents_doc_swagger/2/schemas/#schemaerror",
      "details": "Details of the error"
    }
  ]
}
Name Type Required Description
errors Errors false List of errors

Errors

1
2
3
4
5
6
7
8
[
  {
    "code": "MCONS_CODE",
    "title": "ERROR_TITLE",
    "ref": "https://developers.masstack.com/en/docs/apis_consents_doc_swagger/2/schemas/#schemaerror",
    "details": "Details of the error"
  }
]
Name Type Required Description
anonymous [Error] false List of errors

Error

1
2
3
4
5
6
{
  "code": "MCONS_CODE",
  "title": "ERROR_TITLE",
  "ref": "https://developers.masstack.com/en/docs/apis_consents_doc_swagger/2/schemas/#schemaerror",
  "details": "Details of the error"
}
Name Type Required Description
code string true Error codes:
* MCONS-000 - Internal server error
* MCONS-001 - Bad request. Parameter is required but it’s missing
* MCONS-002 - Bad request. Error during parsing
* MCONS-003 - Bad request. Illegal or inappropriate argument
* MCONS-004 - Bad request. Model validation
* MCONS-005 - Unauthorized
* MCONS-006 - Resource not found
* MCONS-007 - Unauthorized
* MCONS-008 - Unauthorized
* MCONS-009 - Unauthorized
* MCONS-010 - Conflict
title string true Error titles:
* PARAMETER_ERROR - Bad request. Parameter is required but it’s missing
* BODY_ERROR - Bad request. Error during parsing
* ILLEGAL_ARGUMENT_ERROR - Bad request. Illegal or inappropriate argument
* NOT_VALID_MODEL_ERROR - Bad request. Model validation
* INVALID_HEADER_ERROR - Unauthorized
* RESOURCE_NOT_FOUND - Resource not found
* INVALID_AUTHN_HEADER_ERROR - Unauthorized
* NOT_VALID_AUTHN_TOKEN_ERROR - Unauthorized
ref string true Url of the error details in developer portal
details string true Message and details of the error

SecurizeRequestBody

1
2
3
4
{
  "customer_id": "string",
  "actor_id": "string"
}
Name Type Required Description
customer_id string true none
actor_id string true none

SecurizeResponse

1
2
3
{
  "web_component_token": "string"
}
Name Type Required Description
web_component_token string true none