Download OpenAPI specification:Download
Use the long format with timezone for passing ISO-8601 dates. The following formats are accepted:
Errors are always returned as an array of objects in the top-level "errors" property.
For bulk operations you may have "errors" and "data" properties at the same time since some objects may have errors while others may not. Bulk errors are aggregated which means there won't be an error for each instance of an error but one error for each type of error with the number of occurrences and some examples of line numbers or ids.
{
"errors": [
{
"code": "YOU_CAN_CHECK_THIS_IN_CODE",
"detail": "This explains the error",
"meta": {
"context_property_example": "value_example",
"error_count": 3,
"line_numbers": [34, 45],
"ids": [
"c9017b85-8016-4f13-88b4-18d57c67b866",
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
]
}
}
]
"data": {
"accepted_object_count": 4,
"rejected_object_count": 3
}
}
Error objects have the following properties
Property | Type | Required | Description |
---|---|---|---|
code | string | true | Always present and contains error code that can be checked programmatically |
detail | string | true | Human readable message that explains the problem. You should not check the value of this property programmatically because it may change |
meta | object | false | Error specific object that contains details about what generated the error |
This authenticate user to use the API You MUST send the token for each request in the Authorization header. The token MUST be preceeded by Bearer.
GET https://api.commander1.com/v2/{siteId}/users HTTP/1.1
Host: api.commander1.com
Authorization: Bearer {mySecretToken}
You should replace "{mySecretToken}" in example with your Token.
You should replace "{siteId}" in example with your Site ID.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
Bearer format | "JWT" |
This authenticate Data Account to use the API The API uses Token to authenticate its user. You MUST send the token for each request in the Authorization header. The token MUST be preceeded by Bearer.
GET https://api.commander1.com/v2/{siteId}/users HTTP/1.1
Host: api.commander1.com
Authorization: Bearer {mySecretToken}
You should replace "{mySecretToken}" in example with your Token.
You should replace "{siteId}" in example with your Site ID.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
Bearer format | "JWT" |
http GET https://api.commander1.com/v2/REPLACE_SITEID/source-categories \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "source-category",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}, - "relationships": {
- "templates": {
- "data": {
- "type": "integration-templates",
- "id": "1"
}
}
}
}
}
List Catalog Sources
include | Array of strings Items Value: "categories" Example: include=categories
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/source-catalog?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "source-template",
- "attributes": {
- "label": "Javascript SDK",
- "icon": "//staticplatform.commandersact.com//bundles/data/connectors/icons/js.png",
- "template": "javascript",
- "trigger_type": "web"
}, - "relationships": {
- "categories": {
- "data": {
- "type": "integration-categories",
- "id": "1"
}
}
}, - "included": [
- {
- "type": "integration-category",
- "id": "6",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}
}
]
}
}
List Sources
include | Array of strings Items Enum: "connector" "environment" "health" Example: include=connector,environment,health
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/sources?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
]
}
Create Source
object |
{- "data": {
- "type": "platform/integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connected_integrations": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
}
{- "data": {
- "type": "platform/integrations",
- "attributes": {
- "label": "container body",
- "integration_type": "sources",
- "environment": "prod",
- "version": "2.00",
- "has_undeployed_changes": true,
- "last_run": null,
- "last_deployment": 1643828424745,
- "health": 90,
- "status": "active",
- "trend": [
- {
- "timestamp": 1111,
- "value": 90
}, - {
- "timestamp": 1112,
- "value": 80
}, - {
- "timestamp": 1113,
- "value": 85
}
]
}, - "relationships": {
- "connected_integrations": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}, - "id": 1
}
}
Update Source
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "platform/integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connected_integrations": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
}
{- "data": {
- "type": "platform/integrations",
- "attributes": {
- "label": "container body",
- "integration_type": "sources",
- "environment": "prod",
- "version": "2.00",
- "has_undeployed_changes": true,
- "last_run": null,
- "last_deployment": 1643828424745,
- "health": 90,
- "status": "active",
- "trend": [
- {
- "timestamp": 1111,
- "value": 90
}, - {
- "timestamp": 1112,
- "value": 80
}, - {
- "timestamp": 1113,
- "value": 85
}
]
}, - "relationships": {
- "connected_integrations": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}, - "id": 1
}
}
Get Source
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/sources/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "data": {
- "type": "tms/sources",
- "id": 1
}
}
}
}
Destroy sources
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/sources/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/destination-categories \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "destination-category",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}, - "relationships": {
- "templates": {
- "data": {
- "type": "integration-templates",
- "id": "1"
}
}
}, - "id": "1"
}
}
List Catalog Destinations
include | Array of strings Items Value: "categories" Example: include=categories
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/destination-catalog?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "destination-catalog",
- "attributes": {
- "label": "Facebook - Conversions API",
- "icon": "//staticplatform.commandersact.com//bundles/data/connectors/icons/facebook.png",
- "guide_url": null,
- "template": "facebook_events",
- "trigger_type": "event"
}, - "relationships": {
- "categories": {
- "data": {
- "type": "integration-categories",
- "id": "1"
}
}
}, - "included": [
- {
- "type": "integration-category",
- "id": "6",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}
}
]
}
}
List Destinations
include | Array of strings Items Enum: "connector" "environment" "health" Example: include=connector,environment,health
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/destinations?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
]
}
Create Destination
object |
{- "data": {
- "type": "integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
{- "data": {
- "id": 1,
- "type": "platform/integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
Update Destination
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
{- "data": {
- "id": 1,
- "type": "platform/integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
Get Destination
id required | integer Example: 1 Resource ID |
include | Array of strings Items Enum: "connector" "environment" "health" Example: include=connector,environment,health
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/destinations/REPLACE_ID?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Facebook Conversions API",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": "all",
- "data_last": "1d",
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": "2021-09-10T08:56:35+02:00",
- "updated": "2021-09-23T15:12:36+02:00",
- "cron": null,
- "deleted_at": null,
- "parameters": {
- "facebook": {
- "pixel_id": "123456789",
- "access_token": "EAADZBlHvlvJMBAMI38lrqsjdflnqeiuzfnezfnqjnfqSFsqfZEfere454fqf49ezfezjfnlqjfnqzflxX8WRlD1P10kZCHnGNRh6i21dae47uXC0eiwBxoffdl7FEDWx2PGHdsgiDTZBmMhnR0pxbDMAkY2grUZAP8e81t8zxi21u"
}, - "gdpr_purpose": "1"
}, - "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
}
Destroy destinations
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/destinations/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/cleansing-transformations \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "integrations/cleansing-transformations",
- "id": 1,
- "attributes": [
- {
- "event_count": 10,
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}
], - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}
}, - {
- "type": "integrations/cleansing-transformations",
- "id": 2,
- "attributes": [
- {
- "event_count": 0,
- "label": "Transformation 2",
- "description": "Description transformation 2",
- "operation": "modify_properties",
- "parameters": {
- "filter": {
- "type": ">",
- "operands": [
- {
- "name": "properties.value",
- "type": "property"
}, - {
- "type": "constant",
- "value": 10
}
]
}, - "transformations": [
- {
- "action": "set",
- "property": "properties.product_name",
- "expression": {
- "type": "constant",
- "value": "hello"
}
}, - {
- "action": "rename",
- "property": "properties.quantity",
- "expression": "properties.nb"
}, - {
- "action": "delete",
- "property": "properties.price"
}
]
}, - "order": 2,
- "status": "inactive"
}
], - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}
}
]
}
Store cleansing transformations
object |
{- "data": {
- "type": "integrations/cleansing-transformations",
- "attributes": {
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}, - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}
}
}
{- "data": {
- "type": "integrations/cleansing-transformations",
- "attributes": {
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}, - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}, - "id": 1
}
}
Destroy cleansing transformations
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/cleansing-transformations/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show cleansing transformations
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/cleansing-transformations/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "integrations/cleansing-transformations",
- "attributes": {
- "event_count": 10,
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}, - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}, - "id": 1
}
}
Update cleansing transformations
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "integrations/cleansing-transformations",
- "attributes": {
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}, - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}
}
}
{- "data": {
- "type": "integrations/cleansing-transformations",
- "attributes": {
- "label": "Transformation 1",
- "description": "Description transformation 1",
- "operation": "rename_event",
- "parameters": {
- "filter": {
- "type": "in",
- "operands": [
- {
- "name": "event_name",
- "type": "property"
}, - {
- "type": "constant",
- "value": "page_view"
}
]
}, - "event_name": "page_review"
}, - "order": 1,
- "status": "active"
}, - "relationships": {
- "sources": {
- "data": [
- {
- "type": "integration",
- "id": "1"
}, - {
- "type": "integration",
- "id": "2"
}
]
}
}, - "id": 1
}
}
List event enrichments
include | Array of strings Items Enum: "store" "variables" "sources" Example: include=store,variables,sources
|
object Example: page[number]=5&page[size]=15 Pagination options | |
object Example: sort[by]=name&sort[desc]=true Sorting options | |
object Example: filter[environment]=1&filter[source]=101&filter[status]=active&filter[name]=enrichment pruduct Filter available |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/enrichment/events/?include=SOME_ARRAY_VALUE&page=SOME_OBJECT_VALUE&sort=SOME_OBJECT_VALUE&filter=SOME_OBJECT_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
]
}
Create event enrichment
object |
{- "data": {
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
}
{- "data": {
- "id": 1,
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
}
Get event enrichment
id required | integer Example: 1 Resource ID |
include | Array of strings Items Enum: "store" "variables" "sources" Example: include=store,variables,sources
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/enrichment/events/REPLACE_ID?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
}
Update event enrichment
id required | integer Example: 1 Resource ID |
include | Array of strings Items Enum: "store" "variables" "sources" Example: include=store,variables,sources
|
object |
{- "data": {
- "id": 1,
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
}
{- "data": {
- "id": 1,
- "type": "enrichment/event",
- "attributes": {
- "name": "Enrichment for Facebook Conversions",
- "status": "active",
- "events_name": [
- "page_view",
- "add_to_card",
- "purchase"
], - "matching_key": "products.id",
- "path": "custom",
- "path_custom": "items.products"
}, - "relationships": {
- "variables": {
- "data": {
- "type": "dms/variable",
- "id": "31"
}
}, - "store": {
- "data": {
- "type": "dms/universe",
- "id": "1"
}
}, - "sources": {
- "data": {
- "type": "integration",
- "id": "5"
}
}
}
}
}
Destroy an event enrichment
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/enrichment/events/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Delivery healths gives an overview on the delivery health during the provided period and beyond. It returns statistics on the succeded and failed events with a dataset history for each event type during the last 30 days.
The API response will depend on the available data stored in our database. To date, data life cycle is set to 30 days.
We recommand using these granularities to avoid empty replies:
start | string <ISO-8601> Example: start=2022-04-19T14:34:00.000Z Start date |
end | string <ISO-8601> Example: end=2022-04-19T15:33:59.999Z End date |
granularity | string Example: granularity=60000 End date |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/integrations/REPLACE_ID/delivery/healths?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "delivery/health",
- "attributes": {
- "connector_type": "dms_facebook_events",
- "total": 102000,
- "success": {
- "immediate": {
- "total": 30000,
- "increase_rate": 0.5
}, - "retry": {
- "total": 33000,
- "increase_rate": 0.1
}
}, - "fail": {
- "rejected": {
- "total": 13800,
- "increase_rate": -0.1
}, - "error": {
- "total": 25200,
- "increase_rate": 0
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1650924000000,
- 8640000
], - [
- 1651010400000,
- 9072000
], - [
- 1651096800000,
- 9072000
], - [
- 1651183200000,
- 9072000
], - [
- 1651269600000,
- 9072000
], - [
- 1651356000000,
- 9072000
], - [
- 1651442400000,
- 9072000
], - [
- 1651528800000,
- 9072000
], - [
- 1651615200000,
- 9072000
], - [
- 1651701600000,
- 9072000
], - [
- 1651788000000,
- 9072000
], - [
- 1651874400000,
- 9072000
], - [
- 1651960800000,
- 9072000
], - [
- 1652047200000,
- 9072000
], - [
- 1652133600000,
- 9072000
], - [
- 1652220000000,
- 9072000
], - [
- 1652306400000,
- 9072000
], - [
- 1652392800000,
- 9072000
], - [
- 1652479200000,
- 9072000
], - [
- 1652565600000,
- 9072000
], - [
- 1652652000000,
- 9072000
], - [
- 1652738400000,
- 9072000
], - [
- 1652824800000,
- 9072000
], - [
- 1652911200000,
- 9072000
], - [
- 1652997600000,
- 9072000
], - [
- 1653084000000,
- 9072000
], - [
- 1653170400000,
- 9072000
], - [
- 1653256800000,
- 9072000
], - [
- 1653343200000,
- 9072000
], - [
- 1653429600000,
- 9072000
]
], - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1650924000000,
- 4320000
], - [
- 1651010400000,
- 5616000
], - [
- 1651096800000,
- 5616000
], - [
- 1651183200000,
- 5616000
], - [
- 1651269600000,
- 5616000
], - [
- 1651356000000,
- 5616000
], - [
- 1651442400000,
- 5616000
], - [
- 1651528800000,
- 5616000
], - [
- 1651615200000,
- 5616000
], - [
- 1651701600000,
- 5616000
], - [
- 1651788000000,
- 5616000
], - [
- 1651874400000,
- 5616000
], - [
- 1651960800000,
- 5616000
], - [
- 1652047200000,
- 5616000
], - [
- 1652133600000,
- 5616000
], - [
- 1652220000000,
- 5616000
], - [
- 1652306400000,
- 5616000
], - [
- 1652392800000,
- 5616000
], - [
- 1652479200000,
- 5616000
], - [
- 1652565600000,
- 5616000
], - [
- 1652652000000,
- 5616000
], - [
- 1652738400000,
- 5616000
], - [
- 1652824800000,
- 5616000
], - [
- 1652911200000,
- 5616000
], - [
- 1652997600000,
- 5616000
], - [
- 1653084000000,
- 5616000
], - [
- 1653170400000,
- 5616000
], - [
- 1653256800000,
- 5616000
], - [
- 1653343200000,
- 5616000
], - [
- 1653429600000,
- 5616000
]
]
}
}
}
}
}
}
Delivery trends gives an overview on the delivery status history during the provided period.
"Success" status includes events that coud be successfully sent to the connector API: immediately or after one or more retries. "Fail" status includes events that could not be successfully sent to the connector, either caused by a rejection or by an error.
The API response will depend on the available data stored in our database. To date, data life cycle is set to 30 days.
We recommand using these granularities to avoid empty replies:
start | string <ISO-8601> Example: start=2022-04-19T14:34:00.000Z Start date |
end | string <ISO-8601> Example: end=2022-04-19T15:33:59.999Z End date |
granularity | string Example: granularity=60000 End date |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/integrations/REPLACE_ID/delivery/trends?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "delivery/trend",
- "attributes": {
- "connector_type": "dms_facebook_events",
- "datasets": [
- [
- "dateTime",
- "success",
- "fail"
], - [
- 1648764000000,
- 11335,
- 18
], - [
- 1648850400000,
- 11623,
- 17
]
]
}
}
}
Delivery issues gives a detailed report on the encountered issues during the provided period.
Issues are of two types: "errors" and "rejections"; Both can be issued from the connector's API or before being sent to the connector.
The API response will depend on the available data stored in our database. To date, data life cycle is set to 30 days.
We recommand using these granularities to avoid empty replies:
start | string <ISO-8601> Example: start=2022-04-19T14:34:00.000Z Start date |
end | string <ISO-8601> Example: end=2022-04-19T15:33:59.999Z End date |
granularity | string Example: granularity=60000 End date |
filter[type] | string Example: filter[type]=rejected [Optional] used to report details only on the specified issue type (error or rejected) |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/integrations/REPLACE_ID/delivery/issues?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE&granularity=SOME_STRING_VALUE&filter%5Btype%5D=SOME_STRING_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "delivery/issue",
- "attributes": {
- "connector_type": "dms_facebook_events",
- "error": [ ],
- "rejected": [
- {
- "reason": "invalid_user",
- "event_types": [
- "search",
- "page_view",
- "purchase"
], - "events_count": 177,
- "last_seen": 1649880808086
}, - {
- "reason": "invalid_parameter",
- "event_types": [
- "add_to_cart"
], - "events_count": 115,
- "last_seen": 1649883277307,
- "stream_hit_id": "3f78c233-b09f-4e5d-9861-d5a899a1937c-86400-rejected-invalid_user"
}
]
}
}
}
Delivery Issue Details gives details on the provided issue id: related event, request sent to the connector API, response from the connector API..
Issue id is not easily guessable, it must be retreived from the Delivery Issues API response by following the stream_hit_id parameter of the desired issue.
issueId required | string Example: 1650381024131-error-token_expired Issue ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/integrations/delivery/issues/REPLACE_ISSUEID/details \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1650381024131-error-token_expired",
- "type": "delivery/issues-details",
- "attributes": {
- "timestamp": 1609455600000,
- "status": "error",
- "detail": "token_expired",
- "request": {
- "url": "http =>//localhost =>7777/event?apiKey=commandersact",
- "method": "POST",
- "body": "[\"id\" =>[\"email\" =>[\"md5\" =>\"55502f40dc8b7c769880b10874abc9d0\"]],\"ip\" =>\"127.0.0.1\",\"account\" =>49317,\"site_type\" =>\"instore\",\"user_segment\" =>19,\"store_id\" =>0,\"events\" =>[[\"event\" =>\"trackTransaction\",\"id\" =>\"462f969b-f770-42e4-92fa-aee945000002\",\"timestamp\" =>\"2021-05-01T19 =>00 =>00Z\",\"currency\" =>\"EUR\",\"item\" =>[[\"id\" =>\"db050bb1-810d-4420-a6fb-c1ce472a4ca9\",\"price\" =>228,\"quantity\" =>1],[\"id\" =>\"db050bb1-810d-4420-a6fb-c1ce472a4ca0\",\"price\" =>25,\"quantity\" =>2]]]]]",
- "data": {
- "id": {
- "email": {
- "md5": "55502f40dc8b7c769880b10874abc9d0"
}
}, - "ip": "127.0.0.1",
- "account": 49317,
- "site_type": "instore",
- "user_segment": 19,
- "store_id": 0,
- "events": [
- {
- "event": "no-matter",
- "id": "462f969b-f770-42e4-92fa-aee945000002",
- "timestamp": "2021-05-01T19 =>00 =>00Z",
- "currency": "EUR",
- "item": [
- {
- "id": "db050bb1-810d-4420-a6fb-c1ce472a4ca9",
- "price": 228,
- "quantity": 1
}, - {
- "id": "db050bb1-810d-4420-a6fb-c1ce472a4ca0",
- "price": 25,
- "quantity": 2
}
]
}
]
}
}, - "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json",
- "date": "Fri, 01 Apr 2022 16 =>11 =>10 GMT",
- "connection": "close",
- "transfer-encoding": "chunked"
}, - "body": "[\n \"errors\" => [\n \"test error\"\n ],\n \"warnings\" => []\n]",
- "data": {
- "errors": [
- "test error"
], - "warnings": [ ]
}
}
}
}
}
Fetch statistics about events collections across one or multiple sources
source | string Default: null Id of a source to filter stats with |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/monitoring/sources-data-quality?source=SOME_STRING_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "monitoring/sources/data-quality-report",
- "attributes": {
- "eventNames": [
- "page_view",
- "puchase"
], - "validation": {
- "statuses": {
- "page_view": [
- [
- "dateTime",
- "collected",
- "normalized"
], - [
- "2022-06-19 15:45:00.000000000",
- 154,
- 154
], - [
- "2022-06-19 16:00:00.000000000",
- 1321,
- 1321
]
], - "purchase": [ ]
}, - "anomalies": {
- "page_view": [
- {
- "level": "warn",
- "count": 74216,
- "path": "properties.page_type",
- "message": "page_view event requires .page_type property",
- "sample": "{\"location\":\"https://www.domain.com/category/80076604.html\"}",
- "date": "2022-06-20 15:57:02.253000000"
}
], - "purchase": [ ]
}
}, - "collection": {
- "total": 140201,
- "sources": [
- {
- "reference": "bac8f6f9-823d-823d-823d-bac8f6f9",
- "count": 99166,
- "integration": {
- "label": "container body",
- "integration_type": "sources",
- "environment": "prod",
- "version": "2.00",
- "has_undeployed_changes": true,
- "last_run": null,
- "last_deployment": 1643828424745,
- "health": 90,
- "status": "active",
- "trend": [
- {
- "timestamp": 1111,
- "value": 90
}, - {
- "timestamp": 1112,
- "value": 80
}, - {
- "timestamp": 1113,
- "value": 85
}
]
}
}
]
}
}
}
}
Retrieve the list of events that were collected within a specified date range.
Can include statistics, sources and destinations information
filter[rangeType] | string Enum: "absolute" "relative" The type of range to use for the date filter. |
filter[from] | string,number <date-time> for rangeType='absolute': the ISO date for range start (e.g. 2023-01-01T12:30:00.000Z) for rangeType='relative': the number of seconds between the range start and now (e.g. 86400) |
filter[to] | string,number for rangeType='absolute': the ISO date for range end (e.g. 2023-01-01T12:30:00.000Z) for rangeType='relative': the number of seconds between the range end and now (e.g. 3600) |
filter[search] | string A search term that should match event names. |
include | string[] Enum: "stats.normalized" "sources" "sources.connector" "destinations" "destinations.connector" Events information to include:
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/monitoring/collection/events?filter%5BrangeType%5D=SOME_STRING_VALUE&filter%5Bfrom%5D=SOME_STRING%2CNUMBER_VALUE&filter%5Bto%5D=SOME_STRING%2CNUMBER_VALUE&filter%5Bsearch%5D=SOME_STRING_VALUE&include=SOME_STRING%5B%5D_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "events/definition",
- "id": "6035-purchase",
- "attributes": {
- "name": "purchase"
}, - "relationships": {
- "destinations": {
- "data": [
- {
- "type": "integration",
- "id": "96"
}
]
}, - "sources": {
- "data": [ ]
}, - "stats": {
- "data": {
- "type": "events/stat",
- "id": "6035-purchase"
}
}
}
}
], - "included": [
- {
- "type": "dataset",
- "id": "6035-purchase/stats/normalized",
- "attributes": {
- "dataset": [
- [
- "dateTime",
- "value"
], - [
- "2023-01-24 14:00:00.000000000",
- "13412.0"
], - [
- "2023-01-24 12:00:00.000000000",
- "15491.0"
], - [
- "2023-01-24 10:00:00.000000000",
- "10641.0"
]
]
}
}, - {
- "type": "integration",
- "id": "96",
- "attributes": {
- "label": "Destination name",
- "created": "2022-12-01T14:00:00+01:00",
- "updated": "2023-01-10T16:00:00+01:00",
- "parameters": { },
- "integration_key": "abcd1234",
- "status": "active"
}
}
]
}
List alerts for current connected user
include | Array of strings Items Enum: "notification" "creator" Example: include=notification
|
object Example: filter[category]=destination/delivery&filter[model_id]=1&filter[enable]=true Filter available |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/health/alerts?include=SOME_ARRAY_VALUE&filter=SOME_OBJECT_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true,
- "last_check_at": "2015-10-07T08:47:00+00:00",
- "last_check_value": "90",
- "created_at": "2015-10-07T08:00:00+00:00",
- "updated_at": null
}, - "relationships": {
- "creator": {
- "data": [
- {
- "type": "user",
- "id": "27964"
}
]
}, - "notification": {
- "data": [
- {
- "type": "health/notification",
- "id": "255"
}
]
}
}
}
]
}
Create alert for current connected user
The value of the "parameters" field depends on the value of the "category" field.
list of possible values of the field "category".
Category | Parameters |
---|---|
destination/delivery | { "threshold": [your threshold] } |
object |
{- "data": {
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true
}
}
}
{- "data": {
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true,
- "last_check_at": "2015-10-07T08:47:00+00:00",
- "last_check_value": "90",
- "created_at": "2015-10-07T08:00:00+00:00",
- "updated_at": null
}
}
}
Update alert
object |
{- "data": {
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true
}
}
}
{- "data": {
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true,
- "last_check_at": "2015-10-07T08:47:00+00:00",
- "last_check_value": "90",
- "created_at": "2015-10-07T08:00:00+00:00",
- "updated_at": null
}
}
}
Get alert
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/alerts/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "health/alert",
- "attributes": {
- "model_id": 1,
- "parameters": {
- "threshold": 75
}, - "category": "destination/delivery",
- "is_enable": true,
- "last_check_at": "2015-10-07T08:47:00+00:00",
- "last_check_value": "90",
- "created_at": "2015-10-07T08:00:00+00:00",
- "updated_at": null
}, - "relationships": {
- "creator": {
- "data": [
- {
- "type": "user",
- "id": "27964"
}
]
}, - "notification": {
- "data": [
- {
- "type": "health/notification",
- "id": "255"
}
]
}
}
}
]
}
Destroy alert
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/health/alerts/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
List notifications
object Example: filter[alert]=1 Filter available |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/health/notifications?filter=SOME_OBJECT_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}, - "last_notified_at": "2015-10-07T08:47:00+00:00"
}
}
]
}
Create notification for existing alert
object |
{- "data": {
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}
}
}
}
{- "data": {
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}, - "last_notified_at": "2015-10-07T08:47:00+00:00"
}
}
}
Update Notification
object |
{- "data": {
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}
}
}
}
{- "data": {
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}, - "last_notified_at": "2015-10-07T08:47:00+00:00"
}
}
}
Get notifications
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/notifications/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "health/alert/notification",
- "attributes": {
- "alert_id": 1,
- "frequency": "30m",
- "channel": "EMAIL",
- "channel_settings": {
- "email": {
- "emails": [
- "me@mycompany.com"
]
}, - "slack": {
- "webhook": ""
}, - "teams": {
- "webhook": ""
}
}, - "last_notified_at": "2015-10-07T08:47:00+00:00"
}
}
]
}
Destroy notifications
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/health/notifications/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
List of cookies
include | Array of strings Items Enum: "vendor" "category" "fields" Example: include=vendor,category,fields
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/cookies?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}, - "relationships": {
- "fields": {
- "data": [
- {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "1"
}, - {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "2"
}
]
}
}
}
]
}
Create new cookie
object |
{- "data": {
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}
}
}
{- "data": {
- "type": "privacy/cookie-scanner/cookie",
- "id": 5,
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/cookies/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}, - "relationships": {
- "fields": {
- "data": [
- {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "1"
}, - {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "2"
}
]
}
}
}
], - "included": [
- {
- "type": "privacy/cookie-scanner/custom-field",
- "id": 1,
- "attributes": {
- "cookie_id": 1,
- "language_id": 28,
- "field_id": 2,
- "value": "To provide load balancing functionality."
}
}, - {
- "type": "privacy/cookie-scanner/custom-field",
- "id": 2,
- "attributes": {
- "cookie_id": 2,
- "language_id": 28,
- "field_id": 2,
- "value": "To provide functions for integration."
}
}
]
}
Update cookie
object |
{- "data": {
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}
}
}
{- "data": {
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}, - "relationships": {
- "fields": {
- "data": [
- {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "1"
}, - {
- "type": "privacy/cookie-scanner/custom-field",
- "id": "2"
}
]
}
}
}, - "included": [
- {
- "type": "privacy/cookie-scanner/custom-field",
- "id": 1,
- "attributes": {
- "cookie_id": 1,
- "language_id": 28,
- "field_id": 2,
- "value": "To provide load balancing functionality."
}
}, - {
- "type": "privacy/cookie-scanner/custom-field",
- "id": 2,
- "attributes": {
- "cookie_id": 2,
- "language_id": 28,
- "field_id": 2,
- "value": "To provide functions for integration."
}
}
]
}
Destroy cookie
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/cookies/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Reset description Retrieve the default description of a given cookie when presented in configured languages.
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/cookie/description/REPLACE_COOKIENAME \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "description_en": "Identifier of the TRUST module; used by the privacy modules TRUST v1 and v2",
- "description_fr": "Utilisé pour identifier les visiteurs exposés à la bannière de confidentialité. TrustCommander utilise ce cookie pour mesurer les statistiques d'utilisation de la bannière de confidentialité jusqu'à ce que les visiteurs donnent leur consentement pour le cookie TCID. Avec ce système à 2 cookies, TrustCommander est le seul CMP qui a obtenu le droit de dispense de consentement pour la mesure statistique par la CNIL française.",
- "description_it": "Utilizzato da Trust Commander per la gestione del consenso."
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/setting/custom-fields \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "health/alert",
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
]
}
Create new cookie custom field
object |
{- "data": {
- "type": "privacy/cookie-scanner/setting/custom-field",
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
}
{- "data": {
- "type": "privacy/cookie-scanner/setting/custom-field",
- "id": 5,
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/setting/custom-fields/REPLACE_CUSTOM_FIELD \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "privacy/cookie-scanner/setting/custom-field",
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
]
}
Update cookie custom field
object |
{- "data": {
- "type": "privacy/cookie-scanner/setting/custom-field",
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
}
{- "data": {
- "type": "privacy/cookie-scanner/setting/custom-field",
- "attributes": {
- "name": "Usage",
- "position": 1,
- "is_system": 0,
- "created": "2021-07-09T15:45:54+02:00",
- "updated": "2021-07-09T15:45:54+02:00"
}
}
}
Destroy custom field
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/setting/custom-fields/REPLACE_CUSTOM_FIELD \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
List of all generated versions
include | Array of strings Items Value: "cookie" Example: include=cookie
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "privacy/cookie-scanner",
- "attributes": {
- "version": "4.00",
- "comment": "test cdn",
- "new": "hello, helloXXC",
- "ignored": "restoreUrl, tc_cj_last_touch_channel, csrf_same_site_set, User_identifier, TCPID, Apache",
- "languages": [
- "en",
- "fr",
- "it"
], - "is_deployed": 1,
- "filename": "cookies-all",
- "created": "2023-09-20T10:56:10+02:00",
- "updated": "2023-09-20T10:56:10+02:00",
- "deployed": null
}
}
], - "included": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}
}
Create new version
object |
{- "data": {
- "type": "privacy/cookie-scanner",
- "attributes": {
- "comment": "test cdn"
}
}
}
{- "data": {
- "type": "privacy/cookie-scanner",
- "id": 5,
- "attributes": {
- "version": "4.00",
- "comment": "test cdn",
- "new": "hello, helloXXC",
- "ignored": "restoreUrl, tc_cj_last_touch_channel, csrf_same_site_set, User_identifier, TCPID, Apache",
- "languages": [
- "en",
- "fr",
- "it"
], - "is_deployed": 1,
- "filename": "cookies-all",
- "created": "2023-09-20T10:56:10+02:00",
- "updated": "2023-09-20T10:56:10+02:00",
- "deployed": null
}
}
}
Get specific version of cookie Scanner
include | Array of strings Items Value: "cookie" Example: include=cookie
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scannerREPLACE_COOKIE_SCANNER?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "privacy/cookie-scanner/cookie",
- "attributes": {
- "version": "4.00",
- "comment": "test cdn",
- "new": "hello, helloXXC",
- "ignored": "restoreUrl, tc_cj_last_touch_channel, csrf_same_site_set, User_identifier, TCPID, Apache",
- "languages": [
- "en",
- "fr",
- "it"
], - "is_deployed": 1,
- "filename": "cookies-all",
- "created": "2023-09-20T10:56:10+02:00",
- "updated": "2023-09-20T10:56:10+02:00",
- "deployed": null
}, - "relationships": {
- "cookie": {
- "data": {
- "type": "privacy/cookie-scanner/cookie",
- "id": "1"
}
}
}
}
], - "included": {
- "name"": "AWSALBCORS",
- "cookie_scanner_id": null,
- "vendor_url": "",
- "storage_type": "3rd-party-cookie",
- "storage_domain": "api.commander1.com",
- "storage_duration": "5",
- "origin": "scanned_extension",
- "origin_label": "Scanned",
- "status": 1,
- "is_live": false,
- "is_compliant": false,
- "is_missing": true,
- "website": ""
}
}
Get the JS code that will be added to your legal page to automatically build the cookie list table.
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/js-code \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "code": "<script language=\"javascript\">...<script/>\n"
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/REPLACE_VERSION/deploy \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Allows to download the cookie notice in all localisations.
In the XSLX one tab is included per language. For all other formats a ZIP will be provided that includes one file per language.
language: is optional, default all available language are generated.
Available format:
http GET https://api.commander1.com/v2/REPLACE_SITEID/health/cookie-scanner/REPLACE_VERSION/REPLACE_FORMAT/exports/REPLACE_LANGUAGE \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Retrieve segments statistics
token required | string Authentication token. Optional if the header "Authorization' parameter is used instead. |
filter[segment_id] required | number Segment ID |
filter[from] required | dates <ISO-8601> start date |
filter[to] required | dates <ISO-8601> end date |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/dms/segments-statistics?token=SOME_STRING_VALUE&filter%5Bsegment_id%5D=SOME_NUMBER_VALUE&filter%5Bfrom%5D=SOME_DATES_VALUE&filter%5Bto%5D=SOME_DATES_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "dms/segment-statistics",
- "id": "1653955200000",
- "attributes": {
- "nb_visitors_added": "33632",
- "nb_visitors_removed": "12358",
- "nb_visitors_total": "540287.75",
- "start_date": "2022-06-02T00:00:00.000Z"
}
}
]
}
List Live Reports
include | Array of strings Items Enum: "owner" "claims" Example: include=owner,claims
|
object Example: page[number]=5&page[size]=15 Pagination options | |
object Example: filter[label]=rapport&filter[public-id]=ED78DZ8&filter[status]=draft&filter[category]=1&filter[archived]=1 Filter available | |
sort | string Example: sort=-updated_at Sort |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/ams/reports?include=SOME_ARRAY_VALUE&page=SOME_OBJECT_VALUE&filter=SOME_OBJECT_VALUE&sort=SOME_STRING_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "ams/reports",
- "attributes": {
- "public_id": "50db21b1",
- "label": "Rapport mensuel",
- "description": "Rapport mensuel pour l'équipe marketing",
- "status": "draft",
- "updated_at": "2022-04-07T10:14:02+02:00",
- "created_at": "2022-04-07T10:13:43+02:00",
- "archived": false,
- "is_system": false
}, - "relationships": {
- "owner": {
- "data": {
- "type": "user",
- "id": "27964"
}
}, - "claims": {
- "data": [
- {
- "type": "ams/report_claims",
- "id": "255"
}, - {
- "type": "ams/report_claims",
- "id": "254"
}
]
}
}
}
]
}
Get Live Report
id required | integer Example: 1 Resource ID |
include | Array of strings Items Enum: "owner" "claims" Example: include=owner,claims
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/ams/reports/REPLACE_ID?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "ams/reports",
- "attributes": {
- "public_id": "50db21b1",
- "label": "Rapport mensuel",
- "description": "Rapport mensuel pour l'équipe marketing",
- "status": "draft",
- "updated_at": "2022-04-07T10:14:02+02:00",
- "created_at": "2022-04-07T10:13:43+02:00",
- "archived": false,
- "is_system": false
}, - "relationships": {
- "owner": {
- "data": {
- "type": "user",
- "id": "27964"
}
}, - "claims": {
- "data": [
- {
- "type": "ams/report_claims",
- "id": "255"
}, - {
- "type": "ams/report_claims",
- "id": "254"
}
]
}
}
}
}
Get Live Report Data
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/ams/reports/REPLACE_ID/data \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "rows": [
- {
- "name": {
- "type": "string",
- "value": "Nike_email"
}, - "attribution-model-5_metric-29": {
- "type": "number",
- "value": 878,
- "top_value": 878
}, - "attribution-model-22_metric-29": {
- "type": "number",
- "value": 456,
- "top_value": 623
}
}, - {
- "name": {
- "type": "string",
- "value": "Puma_email"
}, - "attribution-model-5_metric-29": {
- "type": "number",
- "value": 806,
- "top_value": 806
}, - "attribution-model-22_metric-29": {
- "type": "number",
- "value": 452,
- "top_value": 896
}
}
], - "total": {
- "name": {
- "type": "string",
- "value": "total"
}, - "attribution-model-5_metric-29": {
- "type": "number",
- "value": 24745,
- "top_value": 24745
}, - "attribution-model-22_metric-29": {
- "type": "number",
- "value": 24745,
- "top_value": 24745
}
}, - "columns": [
- "name",
- "attribution-model-5_metric-29",
- "attribution-model-22_metric-29"
]
}, - "meta": {
- "pagination": {
- "total": 1000,
- "count": 10,
- "per_page": 10,
- "current_page": 1,
- "total_pages": 100
}
}, - "links": {
}
}
Get data from the consent dashboard (aggregated data)
token required | string Example: token=XXXYYZZ Authentication token. Optional if the header "Authorization' parameter is used instead. |
filter[begin_date] required | string <date> Example: filter[begin_date]=2021-04-30 |
filter[end_date] required | string <date> Example: filter[end_date]=2021-05-31 |
filter[sup_filters][location][] | Array of integers[ items ] Items Enum: 0 1 Example: filter[sup_filters][location][]=1 Data inside and outside of the EU |
filter[sup_filters][device][] | Array of integers[ items ] Items Enum: 0 1 2 3 Example: filter[sup_filters][device][]=2 Typical device types |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/privacy/statistics?token=SOME_STRING_VALUE&filter%5Bbegin_date%5D=SOME_STRING_VALUE&filter%5Bend_date%5D=SOME_STRING_VALUE&filter%5Bsup_filters%5D%5Blocation%5D%5B%5D=SOME_ARRAY_VALUE&filter%5Bsup_filters%5D%5Bdevice%5D%5B%5D=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "privacy/statistic",
- "id": "1",
- "attributes": {
- "nb_PC_views": 1,
- "nb_banner_clicks_button": 1,
- "nb_banner_views": 12,
- "nb_optin": 1,
- "nb_optin_all": 1,
- "nb_optin_all_on_click_banner": 1,
- "nb_optin_category_3": 1,
- "nb_optin_category_4": 1,
- "nb_optin_category_5": 1,
- "nb_optin_vendor_1": 1,
- "nb_optin_vendor_2": 1,
- "nb_optin_vendor_3": 1,
- "optin_rate": 0.08333333333333333,
- "optin_rate_category_3": 0.08333333333333333,
- "optin_rate_category_4": 0.08333333333333333,
- "optin_rate_category_5": 0.08333333333333333,
- "optin_rate_vendor_1": 0.08333333333333333,
- "optin_rate_vendor_2": 0.08333333333333333,
- "optin_rate_vendor_3": 0.08333333333333333,
- "optout_rate": 0
}
}
]
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/normalized-datalayer/event-types \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "normalized-datalayer/event-types",
- "attributes": {
- "name": "page_view",
- "label": "Page view",
- "created": "2022-09-22T18:04:49+02:00",
- "updated": "2022-09-23T18:05:43+02:00",
- "stored": false,
- "is_custom": false
}, - "id": 1
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-triggers \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Click on button trigger",
- "type": "click",
- "css_selector": "#myButton"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": 1
}, - {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Click on button trigger2",
- "type": "click",
- "css_selector": "#myButton2"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": 2
}
]
}
This endpoint creates a new trigger
include |
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Click on button trigger",
- "type": "click",
- "css_selector": "#myButton"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}
}
}
{- "data": {
- "type": "tms/web-triggers",
- "id": "1",
- "attributes": {
- "name": "Click on button trigger",
- "type": "click",
- "css_selector": "#myButton"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}
}
}
Delete web triggers
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-triggers/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Get web triggers
id required | integer Example: 1 Resource ID |
include | Array of strings Items Enum: "container" "tags" Example: include=container,tags
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/tms/web-triggers/REPLACE_ID?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Click on button trigger",
- "type": "click",
- "css_selector": "#myButton"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": 1
}
}
Update web triggers
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Update my trigger",
- "css_selector": "#myButton"
}, - "relationships": {
- "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}
}
}
{- "data": {
- "type": "tms/web-triggers",
- "attributes": {
- "name": "Update my trigger",
- "type": "click",
- "css_selector": "#myButton"
}, - "id": 1
}
}
Create web constraints
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "trigger": {
- "data": {
- "type": "web-triggers",
- "id": 1
}
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-constraints",
- "id": "1",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "trigger": {
- "data": {
- "type": "web-triggers",
- "id": 1
}
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-constraints \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": "1"
}, - {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule2",
- "type": "variable_equal",
- "pattern": "foobar2"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": "2"
}
]
}
Delete web constraints
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-constraints/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show web constraints
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-constraints/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "id": 1
}
}
Update web constraints
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule_updated",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "trigger": {
- "data": {
- "type": "web-triggers",
- "id": 1
}
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-constraints",
- "attributes": {
- "label": "my_variable_rule_updated",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "id": 1
}
}
Create web perimeters
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-perimeters",
- "id": "1",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-perimeters \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": "1"
}, - {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule2",
- "type": "variable_equal",
- "pattern": "foobar2"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": "2"
}
]
}
Delete web perimeters
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-perimeters/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show web perimeters
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-perimeters/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}
}, - "id": 1
}
}
Update web perimeters
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule_updated",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/web-tags",
- "id": 1
}, - {
- "type": "tms/web-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "web-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-perimeters",
- "attributes": {
- "label": "my_variable_rule_updated",
- "pattern": "foobar"
}, - "id": 1
}
}
Create web containers
object |
{- "data": {
- "type": "tms/web-containers",
- "attributes": {
- "name": "My web container",
- "deployment_methods": [
- "ftp_or_cdn",
- "amazon_s3",
- "manual"
], - "add_unminified_version_for_manual_deploy": false,
- "include_jquery_for_tests": true,
- "default_tags_lifetime": 12,
- "force_cookie_samesite_setting": "none",
- "force_cookie_secure_setting": "enabled"
}, - "relationships": {
- "deployment_mailing_list": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}, - "user_to_report_on_tag_expiration": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}
}
}
}
{- "data": {
- "type": "tms/web-containers",
- "attributes": {
- "name": "My web container",
- "deployment_methods": [
- "ftp_or_cdn",
- "amazon_s3",
- "manual"
], - "add_unminified_version_for_manual_deploy": false,
- "include_jquery_for_tests": true,
- "default_tags_lifetime": 12,
- "force_cookie_samesite_setting": "none",
- "force_cookie_secure_setting": "enabled"
}, - "relationships": {
- "deployment_mailing_list": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}, - "user_to_report_on_tag_expiration": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}
}, - "id": 1
}
}
Update web containers
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "id": 1,
- "attributes": {
- "name": "My web container",
- "deployment_methods": [
- "ftp_or_cdn",
- "amazon_s3",
- "manual"
], - "add_unminified_version_for_manual_deploy": false,
- "include_jquery_for_tests": true,
- "default_tags_lifetime": 12,
- "force_cookie_samesite_setting": "none",
- "force_cookie_secure_setting": "enabled"
}, - "relationships": {
- "deployment_mailing_list": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}, - "user_to_report_on_tag_expiration": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}
}
}
}
{- "data": {
- "type": "tms/web-containers",
- "attributes": {
- "name": "My web container",
- "deployment_methods": [
- "ftp_or_cdn",
- "amazon_s3",
- "manual"
], - "add_unminified_version_for_manual_deploy": false,
- "include_jquery_for_tests": true,
- "default_tags_lifetime": 12,
- "force_cookie_samesite_setting": "none",
- "force_cookie_secure_setting": "enabled"
}, - "relationships": {
- "deployment_mailing_list": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}, - "user_to_report_on_tag_expiration": {
- "data": [
- {
- "type": "user",
- "id": 1
}, - {
- "type": "user",
- "id": 2
}
]
}
}, - "id": 1
}
}
Delete web containers
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-containers/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create web tags
object |
{- "data": {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>",
- "disabled": false,
- "timeout": 0,
- "position": 1
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>",
- "disabled": false,
- "timeout": 0,
- "position": 1
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}
}, - "id": 1
}
}
Update web tags
object |
{- "data": {
- "type": "tms/web-tags-update",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>"
}, - "relationships": {
- "privacy_category": {
- "data": {
- "type": "privacy/category-references",
- "id": 1
}
}, - "privacy_vendor": {
- "data": {
- "type": "privacy/vendor-references",
- "name": "VendorName"
}
}, - "link_triggers": {
- "data": {
- "type": "web-triggers",
- "id": 1
}
}, - "unlink_triggers": {
- "data": {
- "id": 2,
- "type": "web-triggers"
}
}, - "link_perimeters": {
- "data": {
- "type": "web-perimeters",
- "id": 1
}
}, - "unlink_perimeters": {
- "data": {
- "id": 2,
- "type": "web-perimeters"
}
}, - "link_constraints": {
- "data": {
- "type": "web-constraints",
- "id": 1
}
}, - "unlink_constraints": {
- "data": {
- "id": 2,
- "type": "web-constraints"
}
}
}
}
}
{- "data": {
- "type": "tms/web-tags-update",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>"
}, - "relationships": {
- "privacy_category": {
- "data": {
- "type": "privacy/category-references",
- "id": 1
}
}, - "privacy_vendor": {
- "data": {
- "type": "privacy/vendor-references",
- "name": "VendorName"
}
}, - "link_triggers": {
- "data": {
- "type": "web-triggers",
- "id": 1
}
}, - "unlink_triggers": {
- "data": {
- "id": 2,
- "type": "web-triggers"
}
}, - "link_perimeters": {
- "data": {
- "type": "web-perimeters",
- "id": 1
}
}, - "unlink_perimeters": {
- "data": {
- "id": 2,
- "type": "web-perimeters"
}
}, - "link_constraints": {
- "data": {
- "type": "web-constraints",
- "id": 1
}
}, - "unlink_constraints": {
- "data": {
- "id": 2,
- "type": "web-constraints"
}
}
}, - "id": 1
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-tags \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>",
- "disabled": false,
- "timeout": 0,
- "position": 1
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}
}, - "id": "1"
}, - {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag 2",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag 2\");</script>",
- "disabled": true,
- "timeout": 100,
- "position": 2
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}
}, - "id": "2"
}
]
}
Delete web tags
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-tags/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show web tags
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-tags/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>",
- "disabled": false,
- "timeout": 0,
- "position": 1
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/web-containers",
- "id": 1
}
}
}, - "id": 1
}
}
Revertweb tags
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "tms/web-tags",
- "attributes": {
- "version": "2.01"
}
}
}
{- "data": {
- "type": "tms/web-tags",
- "attributes": {
- "name": "My tag",
- "tag_code": "<script type=\"text/javascript\">console.log(\"here is my tag\");</script>",
- "disabled": false,
- "timeout": 0,
- "position": 1
}, - "id": 1
}
}
This endpoint creates new web datalayer variables
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/web-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "type": "Alphanumeric & special chars",
- "use_in_noscript": false,
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/web-datalayer-variables",
- "id": "1",
- "attributes": {
- "name": "myVariable",
- "type": "Alphanumeric & special chars",
- "use_in_noscript": false,
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "id": 1
}
}
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-datalayer-variables \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "type": "Alphanumeric & special chars",
- "use_in_noscript": false,
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 1
}, - {
- "type": "tms/web-datalayer-variables",
- "attributes": {
- "name": "myVariable2",
- "type": "Alphanumeric & special chars",
- "use_in_noscript": true,
- "description": "lipsum2",
- "detailed_description": "lorem ipsum2"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 2
}
]
}
Get web datalayer variables
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-datalayer-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "type": "Alphanumeric & special chars",
- "use_in_noscript": false,
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 1
}
}
This endpoint deletes web datalayer variables
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-datalayer-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-internal-variables \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/web-internal-variables",
- "attributes": {
- "name": "myVariable",
- "value": "tC.internalvars.name =(function(){ tC.internalvars.toto = document.location.href.split('?');\n return tC.internalvars.toto[0];\n})();\n",
- "type": "Currency (ISO 4217)",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "containers": {
- "data": [
- {
- "type": "tms/containers",
- "id": 1
}, - {
- "type": "tms/containers",
- "id": 3
}
]
}
}, - "id": 1
}, - {
- "type": "tms/web-internal-variables",
- "attributes": {
- "name": "myVariable2",
- "value": "tC.internalvars.name =(function(){ tC.internalvars.toto = document.location.href.split('?');\n return tC.internalvars.toto[0];\n})();\n",
- "type": "Currency (ISO 4217)",
- "description": "lipsum2",
- "detailed_description": "lorem ipsum2"
}, - "relationships": {
- "containers": {
- "data": [
- {
- "type": "tms/containers",
- "id": 1
}, - {
- "type": "tms/containers",
- "id": 3
}
]
}
}, - "id": 2
}
]
}
This endpoint creates new web internal variables
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/web-internal-variables",
- "attributes": {
- "name": "myVariable",
- "value": "tC.internalvars.name =(function(){ tC.internalvars.toto = document.location.href.split('?');\n return tC.internalvars.toto[0];\n})();\n",
- "type": "Currency (ISO 4217)",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "containers": {
- "data": [
- {
- "type": "tms/containers",
- "id": 1
}, - {
- "type": "tms/containers",
- "id": 3
}
]
}
}
}
}
{- "data": {
- "type": "tms/web-internal-variables",
- "id": "1",
- "attributes": {
- "name": "myVariable",
- "value": "tC.internalvars.name =(function(){ tC.internalvars.toto = document.location.href.split('?');\n return tC.internalvars.toto[0];\n})();\n",
- "type": "Currency (ISO 4217)",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "containers": {
- "data": [
- {
- "type": "tms/containers",
- "id": 1
}, - {
- "type": "tms/containers",
- "id": 3
}
]
}
}
}
}
Get web internal variables
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/web-internal-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/web-internal-variables",
- "attributes": {
- "name": "myVariable",
- "value": "tC.internalvars.name =(function(){ tC.internalvars.toto = document.location.href.split('?');\n return tC.internalvars.toto[0];\n})();\n",
- "type": "Currency (ISO 4217)",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "containers": {
- "data": [
- {
- "type": "tms/containers",
- "id": 1
}, - {
- "type": "tms/containers",
- "id": 3
}
]
}
}, - "id": 1
}
}
This endpoint deletes web internal variables
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-internal-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create web datalayer variable categories
object |
{- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "attributes": {
- "name": "My web category"
}
}
}
{- "data": {
- "type": "tms/web-datalayer-variable-categories",
- "attributes": {
- "name": "My web category"
}, - "id": 1
}
}
Delete web datalayer variable categories
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/web-datalayer-variable-categories/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create serverside constraints
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/serverside-tags",
- "id": 1
}, - {
- "type": "tms/serverside-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "serverside-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/serverside-constraints",
- "id": "1",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/serverside-tags",
- "id": 1
}, - {
- "type": "tms/serverside-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "serverside-datalayer-variables",
- "id": 1
}
}
}
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-constraints \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/serverside-tags",
- "id": 1
}, - {
- "type": "tms/serverside-tags",
- "id": 3
}
]
}
}, - "id": "1"
}, - {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule2",
- "type": "variable_equal",
- "pattern": "foobar2"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/serverside-tags",
- "id": 1
}, - {
- "type": "tms/serverside-tags",
- "id": 3
}
]
}
}, - "id": "2"
}
]
}
Delete serverside constraints
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-constraints/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show serverside constraints
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-constraints/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "id": 1
}
}
Update serverside constraints
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule_update",
- "pattern": "foobar"
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}, - "tags": {
- "data": [
- {
- "type": "tms/serverside-tags",
- "id": 1
}, - {
- "type": "tms/serverside-tags",
- "id": 3
}
]
}, - "variable": {
- "data": {
- "type": "serverside-datalayer-variables",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/serverside-constraints",
- "attributes": {
- "label": "my_variable_rule_update",
- "type": "variable_equal",
- "pattern": "foobar"
}, - "id": 1
}
}
Create serverside containers
object |
{- "data": {
- "type": "tms/serverside-containers",
- "attributes": {
- "name": "My server-side container"
}
}
}
{- "data": {
- "type": "tms/serverside-containers",
- "attributes": {
- "name": "My server-side container"
}, - "id": 1
}
}
Update serverside containers
id required | integer Example: 1 Resource ID |
object |
{- "data": {
- "id": 1,
- "attributes": {
- "name": "My server-side container"
}
}
}
{- "data": {
- "type": "tms/serverside-containers",
- "attributes": {
- "name": "My server-side container"
}, - "id": 1
}
}
Delete serverside containers
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-containers/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create server side tags
object |
{- "data": {
- "type": "tms/serverside-tags",
- "attributes": {
- "name": "My tag",
- "disabled": false,
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}
}
}
}
{- "data": {
- "type": "tms/serverside-tags",
- "attributes": {
- "name": "My tag",
- "disabled": false,
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}
}, - "id": 1
}
}
Update serverside tags
object |
{- "data": {
- "type": "tms/serverside-tags-update",
- "attributes": {
- "name": "My tag",
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "link_constraints": {
- "data": {
- "type": "serverside-constraints",
- "id": 1
}
}, - "unlink_constraints": {
- "data": {
- "id": 2,
- "type": "serverside-constraints"
}
}
}
}
}
{- "data": {
- "type": "tms/serverside-tags-update",
- "attributes": {
- "name": "My tag",
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "link_constraints": {
- "data": {
- "type": "serverside-constraints",
- "id": 1
}
}, - "unlink_constraints": {
- "data": {
- "id": 2,
- "type": "serverside-constraints"
}
}
}, - "id": 1
}
}
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-tags \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/serverside-tags",
- "attributes": {
- "name": "My tag",
- "disabled": false,
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}
}, - "id": "1"
}, - {
- "type": "tms/serverside-tags",
- "attributes": {
- "name": "My tag 2",
- "disabled": true,
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}
}, - "id": "2"
}
]
}
Delete serverside tags
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-tags/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Show serverside tags
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-tags/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/serverside-tags",
- "attributes": {
- "name": "My tag",
- "disabled": false,
- "headers": {
- "header1": "value1",
- "header2": "value2"
}
}, - "relationships": {
- "container": {
- "data": {
- "type": "tms/serverside-containers",
- "id": 1
}
}
}, - "id": 1
}
}
List serverside datalayer variables
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-datalayer-variables \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/serverside-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "data_saver": true,
- "reconciliation_key": false,
- "variable_parameter": "variableParam",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 1
}, - {
- "type": "tms/serverside-datalayer-variables",
- "attributes": {
- "name": "myVariable2",
- "data_saver": false,
- "reconciliation_key": false,
- "variable_parameter": "variableParam2",
- "description": "lipsum2",
- "detailed_description": "lorem ipsum2"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 2
}
]
}
This endpoint creates new server-side datalayer variables
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/serverside-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "data_saver": true,
- "reconciliation_key": false,
- "variable_parameter": "variableParam",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "id": 1
}
}
}
}
{- "data": {
- "type": "tms/serverside-datalayer-variables",
- "id": "1",
- "attributes": {
- "name": "myVariable",
- "data_saver": true,
- "reconciliation_key": false,
- "variable_parameter": "variableParam",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "id": 1
}
}
}
}
}
Get serverside datalayer variables
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-datalayer-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/serverside-datalayer-variables",
- "attributes": {
- "name": "myVariable",
- "data_saver": true,
- "reconciliation_key": false,
- "variable_parameter": "variableParam",
- "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "relationships": {
- "category": {
- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "id": 1
}
}
}, - "id": 1
}
}
This endpoint deletes server-side datalayer variables
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-datalayer-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
List serverside internal variables
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-internal-variables \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "tms/serverside-internal-variables",
- "attributes": {
- "name": "stringifiedBoolean",
- "value": {
- "variable_to_map": "booleanToStringify",
- "mapping": [
- {
- "input": "0",
- "output": "false"
}, - {
- "input": "1",
- "output": "true"
}, - {
- "output": "non-boolean entry"
}
]
}, - "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "id": 1
}, - {
- "type": "tms/serverside-internal-variables",
- "attributes": {
- "name": "stringifiedBoolean2",
- "value": {
- "variable_to_map": "booleanToStringify2",
- "mapping": [
- {
- "input": "0",
- "output": "false"
}, - {
- "input": "1",
- "output": "true"
}, - {
- "output": "non-boolean entry"
}
]
}, - "description": "lipsum2",
- "detailed_description": "lorem ipsum2"
}, - "id": 2
}
]
}
This endpoint creates new server-side internal variables
Variable as JSON:api strings
object |
{- "data": {
- "type": "tms/serverside-internal-variables",
- "attributes": {
- "name": "stringifiedBoolean",
- "value": {
- "variable_to_map": "booleanToStringify",
- "mapping": [
- {
- "input": "0",
- "output": "false"
}, - {
- "input": "1",
- "output": "true"
}, - {
- "output": "non-boolean entry"
}
]
}, - "description": "lipsum",
- "detailed_description": "lorem ipsum"
}
}
}
{- "data": {
- "type": "tms/serverside-internal-variables",
- "id": "1",
- "attributes": {
- "name": "stringifiedBoolean",
- "value": {
- "variable_to_map": "booleanToStringify",
- "mapping": [
- {
- "input": "0",
- "output": "false"
}, - {
- "input": "1",
- "output": "true"
}, - {
- "output": "non-boolean entry"
}
]
}, - "description": "lipsum",
- "detailed_description": "lorem ipsum"
}
}
}
Get serverside internal variables
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-internal-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "tms/serverside-internal-variables",
- "attributes": {
- "name": "stringifiedBoolean",
- "value": {
- "variable_to_map": "booleanToStringify",
- "mapping": [
- {
- "input": "0",
- "output": "false"
}, - {
- "input": "1",
- "output": "true"
}, - {
- "output": "non-boolean entry"
}
]
}, - "description": "lipsum",
- "detailed_description": "lorem ipsum"
}, - "id": 1
}
}
This endpoint deletes server-side internal variables
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-internal-variables/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create server side datalayer variable categories
object |
{- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "attributes": {
- "name": "My server-side category"
}
}
}
{- "data": {
- "type": "tms/serverside-datalayer-variable-categories",
- "attributes": {
- "name": "My server-side category"
}, - "id": 1
}
}
Delete server side datalayer variable categories
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/tms/serverside-datalayer-variable-categories/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create users
object |
{- "data": {
- "type": "admin/users",
- "attributes": {
- "type": "technology_partner",
- "language": "french",
- "email": "test@example.com",
- "firstname": "John",
- "lastname": "Doe"
}, - "relationships": {
- "profile": {
- "data": {
- "type": "admin/profiles",
- "id": 1
}
}, - "workspace": {
- "data": [
- {
- "type": "admin/workspaces",
- "id": 1
}, - {
- "type": "admin/workspaces",
- "id": 2
}
]
}
}
}
}
{- "data": {
- "type": "admin/users",
- "attributes": {
- "type": "technology_partner",
- "language": "french",
- "email": "test@example.com",
- "firstname": "John",
- "lastname": "Doe"
}, - "relationships": {
- "profile": {
- "data": {
- "type": "admin/profiles",
- "id": 1
}
}, - "workspace": {
- "data": [
- {
- "type": "admin/workspaces",
- "id": 1
}, - {
- "type": "admin/workspaces",
- "id": 2
}
]
}
}, - "id": 1
}
}
Delete users
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/admin/users/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
Create workspace
object |
{- "data": {
- "type": "admin/workspace",
- "attributes": {
- "name": "My workspace",
- "currency": "EUR",
- "timezone": "Europe/Paris",
- "ip_obfuscation": false,
- "use_default_cdn": true
}, - "relationships": {
- "data": {
- "type": "customer",
- "id": 1
}
}
}
}
{- "data": {
- "type": "admin/workspace",
- "attributes": {
- "name": "My workspace",
- "currency": "EUR",
- "timezone": "Europe/Paris",
- "ip_obfuscation": false,
- "use_default_cdn": true
}, - "relationships": {
- "data": {
- "type": "customer",
- "id": 1
}
}, - "id": 1
}
}
Delete workspace
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/admin/workspace/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
401 Authorization header is missing
{- "errors": [
- {
- "title": "MISSING_AUTHORIZATION_HEADER",
- "detail": "The \"Authorization\" header is required"
}
]
}
List redirect rules
object Available filters |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/ams/redirect-rules?filter=SOME_OBJECT_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "ams/redirect-rules",
- "attributes": {
- "domain": "redirect-domain",
- "tld": "com",
- "full_domain": "redirec-domain.com",
- "rule": "deny",
- "is_active": 1,
- "created_at": "2015-10-07T08:47:00+00:00",
- "updated_at": "2018-05-23T19:48:00+00:00",
- "deleted_at": ""
}
}
}
http POST https://api.commander1.com/v2/REPLACE_SITEID/ams/redirect-rules \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "ams/redirect-rules",
- "attributes": {
- "domain": "redirect-domain",
- "tld": "com",
- "full_domain": "redirec-domain.com",
- "rule": "deny",
- "is_active": 1,
- "created_at": "2015-10-07T08:47:00+00:00",
- "updated_at": "2018-05-23T19:48:00+00:00",
- "deleted_at": ""
}
}
}
Get a redirect rule
id required | integer Example: 1 Resource ID |
http GET https://api.commander1.com/v2/REPLACE_SITEID/ams/redirect-rules/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": 1,
- "type": "ams/redirect-rules",
- "attributes": {
- "domain": "redirect-domain",
- "tld": "com",
- "full_domain": "redirec-domain.com",
- "rule": "deny",
- "is_active": 1,
- "created_at": "2015-10-07T08:47:00+00:00",
- "updated_at": "2018-05-23T19:48:00+00:00",
- "deleted_at": ""
}
}
}
Update an existing redirect rule
id required | integer Example: 1 Resource ID |
http PATCH https://api.commander1.com/v2/REPLACE_SITEID/ams/redirect-rules/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "ams/redirect-rules",
- "attributes": {
- "domain": "redirect-domain",
- "tld": "com",
- "full_domain": "redirec-domain.com",
- "rule": "deny",
- "is_active": 1,
- "created_at": "2015-10-07T08:47:00+00:00",
- "updated_at": "2018-05-23T19:48:00+00:00",
- "deleted_at": ""
}
}
}
Delete a redirect rule
id required | integer Example: 1 Resource ID |
http DELETE https://api.commander1.com/v2/REPLACE_SITEID/ams/redirect-rules/REPLACE_ID \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "type": "ams/redirect-rules",
- "attributes": {
- "domain": "redirect-domain",
- "tld": "com",
- "full_domain": "redirec-domain.com",
- "rule": "deny",
- "is_active": 1,
- "created_at": "2015-10-07T08:47:00+00:00",
- "updated_at": "2018-05-23T19:48:00+00:00",
- "deleted_at": ""
}
}
}
Admin-only Activity Logs API: Provides detailed platform activity records exclusively for administrators.
object Example: filter[action]=created&filter[causer_id]=1&filter[created]=2023-07-13 Filter available |
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/activity-logs?filter=SOME_OBJECT_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "type": "activity-logs",
- "id": 12,
- "attributes": {
- "log_name": "api",
- "action": "created",
- "description": "Stream Web JS SDK has been created",
- "origin": "/v2/7/integrations",
- "subject_id": 20,
- "subject_type": "dms_streams",
- "causer_id": 1,
- "properties": {
- "attributes": { }
}, - "created_at": "2023-05-04T20:01:59+02:00"
}
}, - {
- "type": "activity-logs",
- "id": 13,
- "attributes": {
- "log_name": "api",
- "action": "published",
- "description": "Report \\\"LRB Report Test\\\" has been published",
- "origin": "/v2/7/ams/163/published",
- "subject_id": 163,
- "subject_type": "ams_reports",
- "causer_id": 42,
- "properties": {
- "attributes": { }
}, - "created_at": "2023-05-06T17:12:24+02:00"
}
}
]
}