Compliance API v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Mariana Tek's Compliance API exposes functionality required to comply with regulations and other critical operational guidelines.
Email: Support
Tracking Consent Logs
Record the tracking consent elections made by users of our services.
Create Tracking Consent Logs
Code samples
# You can also use wget
curl -X POST /api/compliance/v1/tracking-consent-record/generate_logs \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /api/compliance/v1/tracking-consent-record/generate_logs HTTP/1.1
Content-Type: application/json
Accept: application/json
const inputBody = '{
"device_id": "e29f359f-65bb-4f27-b7cc-f3b159bf0e34",
"version": "7dc05ff3-9fb6-445b-ab9d-8e57ffbdf068",
"tracking_choices": {
"essential": "opt-in",
"performance": "opt-out"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/compliance/v1/tracking-consent-record/generate_logs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post '/api/compliance/v1/tracking-consent-record/generate_logs',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('/api/compliance/v1/tracking-consent-record/generate_logs', headers = headers)
print(r.json())
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/compliance/v1/tracking-consent-record/generate_logs', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/compliance/v1/tracking-consent-record/generate_logs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/compliance/v1/tracking-consent-record/generate_logs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/compliance/v1/tracking-consent-record/generate_logs
Record a set of tracking consent elections made by a user.
Body parameter
{
"device_id": "e29f359f-65bb-4f27-b7cc-f3b159bf0e34",
"version": "7dc05ff3-9fb6-445b-ab9d-8e57ffbdf068",
"tracking_choices": {
"essential": "opt-in",
"performance": "opt-out"
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | any | true | The tracking_choices object is made up of key/value pairs of the tracking type and the action type. Tracking type options include essential and performance. Action types include opt-in and opt-out. |
Example responses
204 Response
{}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | TrackingConsentLog created successfully. | None |
| 422 | Unprocessable Entity | Request is invalid. | None |
| 429 | Too Many Requests | Too many requests. | None |
Response Schema
Tracking Consent Copy
Retrieve the copy that should be displayed to users interacting with the tracking consent modals in our products.
Retrieve Tracking Consent Copy for Application
Code samples
# You can also use wget
curl -X GET /api/compliance/v1/tracking-consent-copy/{app_name} \
-H 'Accept: application/vnd.api+json'
GET /api/compliance/v1/tracking-consent-copy/{app_name} HTTP/1.1
Accept: application/vnd.api+json
const headers = {
'Accept':'application/vnd.api+json'
};
fetch('/api/compliance/v1/tracking-consent-copy/{app_name}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/vnd.api+json'
}
result = RestClient.get '/api/compliance/v1/tracking-consent-copy/{app_name}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/vnd.api+json'
}
r = requests.get('/api/compliance/v1/tracking-consent-copy/{app_name}', headers = headers)
print(r.json())
'application/vnd.api+json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api/compliance/v1/tracking-consent-copy/{app_name}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/compliance/v1/tracking-consent-copy/{app_name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/compliance/v1/tracking-consent-copy/{app_name}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/compliance/v1/tracking-consent-copy/{app_name}
View copy for a particular app. Choices include admin, android, ios, web-integrations.
Example responses
200 Response
{
"data": {
"consent_copy": {
"banner": "banner copy",
"settings": "settings copy",
"essential": "essential copy",
"performance": "performance copy"
},
"performance_trackers": [
"Google Analytics"
],
"version": "7dc05ff3-9fb6-445b-ab9d-8e57ffbdf068"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success. | Inline |
| 404 | Not Found | The specified resource cannot be found. | None |
| 422 | Unprocessable Entity | Request is invalid. | None |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | TrackingConsentCopy | false | none | none |
| »» consent_copy | object | true | none | none |
| »»» banner | string | false | none | none |
| »»» settings | string | false | none | none |
| »»» essential | string | false | none | none |
| »»» performance | string | false | none | none |
| »» performance_trackers | [string] | true | none | Names of Performance Tracking Services. |
| »» version | string(uuid) | true | none | UUID for copy version. |
Schemas
TrackingConsentCopy
{
"consent_copy": {
"banner": "banner copy",
"settings": "settings copy",
"essential": "essential copy",
"performance": "performance copy"
},
"performance_trackers": [
"Google Analytics"
],
"version": "7dc05ff3-9fb6-445b-ab9d-8e57ffbdf068"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| consent_copy | object | true | none | none |
| » banner | string | false | none | none |
| » settings | string | false | none | none |
| » essential | string | false | none | none |
| » performance | string | false | none | none |
| performance_trackers | [string] | true | none | Names of Performance Tracking Services. |
| version | string(uuid) | true | none | UUID for copy version. |