Consents

Access to user consents


Parameters

Name In Type Required Description
Accept-Language header string false Language and country in locale format (defined in RFC 5646, which rely on the ISO 639) used to
retrieve user consent texts. Not all values are available to all organizations.
If Locale text it is not defined, a default locale text will be provided.
Locale defined lists:
* es-ES - Spanish language, country Spain
* eu-ES - Basque language, country Spain
* en-ES - English language, country Spain
* de-ES - German language, country Spain
* ca-ES - Catalan language, country Spain
org_id path string true The string id related with one of Grupo Masmovil tenants/organizations
x-sector header RegulatedSector true The regulated sector where customer belongs to
view query array[string] false Filters the subset of Consents that are going to be showed. They can be combined with each other. If two views containing shared consents are selected, the largest grouping will be displayed.
Allowed values: MANDATORY, PORTFOLIO, SGDA, PRIVATE, WHATSAPP

Request example

1
2
3
4
5
6

curl -X GET https://consents.masstack.com/v2/orgs/masmovil/consents?view='PORTFOLIO' \
  -H "Accept: application/json" \
  -H "Accept-Language: es-ES" \
  -H "x-sector: telco"

Responses

Code Meaning Description Schema
200 OK Expected response for a non existing user consent GetConsentsResponse
400 Bad Request Request input is not valid ErrorsResponse
401 Unauthorized The user is not authorized ErrorsResponse
404 Not Found The specified resource was not found ErrorsResponse
500 Internal Server Error The request failed to be processed by the server ErrorsResponse

Parameters

Name In Type Required Description
org_id path string true The string id related with one of Grupo Masmovil tenants/organizations
x-sector header RegulatedSector true The regulated sector where customer belongs to
customer_id path string true The consent’s owner customer_id at CRM

Request example

1
2
3
4
5

curl -X DELETE https://consents.masstack.com/v2/orgs/masmovil/customers/419024875567/consents \
  -H "Accept: application/json" \
  -H "x-sector: telco"

Responses

Code Meaning Description Schema
204 No Content Consents deleted successfully None
400 Bad Request Request input is not valid ErrorsResponse
401 Unauthorized The user is not authorized ErrorsResponse
404 Not Found The specified resource was not found ErrorsResponse
500 Internal Server Error The request failed to be processed by the server ErrorsResponse

Parameters

Name In Type Required Description
Accept-Language header string false Language and country in locale format (defined in RFC 5646, which rely on the ISO 639) used to
retrieve user consent texts. Not all values are available to all organizations.
If Locale text it is not defined, a default locale text will be provided.
Locale defined lists:
* es-ES - Spanish language, country Spain
* eu-ES - Basque language, country Spain
* en-ES - English language, country Spain
* de-ES - German language, country Spain
* ca-ES - Catalan language, country Spain
org_id path string true The string id related with one of Grupo Masmovil tenants/organizations
x-sector header RegulatedSector true The regulated sector where customer belongs to
customer_id path string true The consent’s owner customer_id at CRM
view query array[string] false Filters the subset of Consents that are going to be showed. They can be combined with each other. If two views containing shared consents are selected, the largest grouping will be displayed.
Allowed values: MANDATORY, PORTFOLIO, SGDA, PRIVATE, WHATSAPP
choice query string false Filter consents to be shown by existing choice. For example, if it is PENDING, only consents with choice in PENDING state will be showed. Can be combined together.
Allowed values: PENDING, REJECTED, ACCEPTED

Request example

1
2
3
4
5
6

curl -X GET https://consents.masstack.com/v2/orgs/masmovil/customers/419024875567/consents?view='PORTFOLIO'&choice='choice=PENDING' \
  -H "Accept: application/json" \
  -H "Accept-Language: es-ES" \
  -H "x-sector: telco"

Responses

Code Meaning Description Schema
200 OK Expected response for a non existing user consent GetConsentsResponse
202 Accepted Expected response when consent’s user exists GetConsentsResponse
400 Bad Request Request input is not valid ErrorsResponse
401 Unauthorized The user is not authorized ErrorsResponse
404 Not Found The specified resource was not found ErrorsResponse
500 Internal Server Error The request failed to be processed by the server ErrorsResponse

Parameters

Name In Type Required Description
x-key header string true Allow operation key
Accept-Language header string false Language and country in locale format (defined in RFC 5646, which rely on the ISO 639) used to
retrive user consent texts. Not all values are available to all organizations.
If Locale text it is not defined, a default locale text will be provided.
Locale defined lists:

* es-ES - Spanish language, country Spain

* eu-ES - Basque language, country Spain

* en-ES - English language, country Spain

* de-ES - German language, country Spain

* ca-ES - Catalan language, country Spain
org_id path string true The string id related with one of Grupo Masmovil tenants/organizations
x-sector header RegulatedSector true The regulated sector where customer belongs to
customer_id path string true The customer identifier at CRM
body body PostConsentsCustomerRequest true Consent’s user information and other metadata

Request body - instance of 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

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21

curl -X POST https://consents.masstack.com/v2/orgs/masmovil/customers/419024872342345/consents \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-key: 6b9c495a512cb4a7132a5afdd9f295f73dcfae7d70cd1aadc917625d392f8523" \
  -H "Accept-Language: es-ES" \
  -H "x-sector: telco" \
 --data-raw "{
  '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'
}" 

Responses

Code Meaning Description Schema
201 Created user consents created/updated. Expected response for a valid request PostConsentsResponse
400 Bad Request Request input is not valid ErrorsResponse
401 Unauthorized The user is not authorized ErrorsResponse
404 Not Found The specified resource was not found ErrorsResponse
500 Internal Server Error The request failed to be processed by the server ErrorsResponse

Parameters

Name In Type Required Description
org_id path string true The string id related with one of Grupo Masmovil tenants/organizations
x-sector header RegulatedSector true The regulated sector where user belongs to
customer_id path string true The customer identifier at CRM

Request example

1
2
3
4
5

curl -X GET https://consents.masstack.com/v2/orgs/masmovil/customers/143589532625 \
  -H "Accept: application/json" \
  -H "x-sector: telco"

Responses

Code Meaning Description Schema
200 OK Expected response for a existing consent user GetUserMetadataResponse
400 Bad Request Request input is not valid ErrorsResponse
401 Unauthorized The user is not authorized ErrorsResponse
404 Not Found The specified resource was not found ErrorsResponse
500 Internal Server Error The request failed to be processed by the server ErrorsResponse

Endpoints

Consents

    Securize