Object endpoints

The metrics API replicates the behavior of the analysis context in Contentsquare. To get a metric, you can filter by device, segment etc. Plus, for page groups and zones metrics, you will have to define for which page group or zones you want data. To help you, we provide an API that retrieves these objects: segments, page groups etc.

Get the list of all segments for a project. More information regarding segments in Contentsquare

projectIdOnly required for an account-level API key. The target project.
ids

Filter the results and get a list of segments that matches the ids provided.

  • Multiple IDs should be separated by a comma
{
"payload": [
{
"id": 1,
"name": "New visitors",
"source": "contentsquare",
"createdAt": "2019-11-21T09:46:16.000Z",
"updatedAt": "2019-11-21T09:46:16.000Z"
}
],
"success": true
}

Get the list of all goals for a project. More information regarding goals in Contentsquare

{
"payload": [
{
"id": 100,
"name": "Reach Cart",
"type": "pageview",
"createdAt": "2019-10-05T10:34:42.670Z",
"updatedAt": "2019-11-21T09:46:09.000Z"
}
],
"success": true
}
projectIdOnly required for an account-level API key. The target project.

Get the list of all mappings for a project. More information regarding mappings in Contentsquare

projectIdOnly required for an account-level API key. The target project.
ids

Filter the results and get a list of mappings that matches the ids provided.


Multiple IDs should be separated by a comma

{
"payload": [
{
"id": 101010,
"name": "New Zoning Mapping",
"description": "Test",
"createdAt": "2019-11-05T09:44:51.000Z",
"updatedAt": "2019-11-05T09:45:05.000Z"
}
],
"success": true
}

Get information for a specific mapping More information regarding mappings in Contentsquare

projectIdOnly required for an account-level API key. The target project.
{
"payload": [
{
"id": 101010,
"name": "New Zoning Mapping",
"description": "Test",
"createdAt": "2019-11-05T09:44:51.000Z",
"updatedAt": "2019-11-05T09:45:05.000Z"
}
],
"success": true
}

/v1/mappings/{mappingId}/page-groups

Section titled /v1/mappings/{mappingId}/page-groups

Get all the page groups for a specific mapping More information regarding mappings and page groups in Contentsquare

projectIdOnly required for an account-level API key. The target project.
{
"payload": [
{
"id": 1010,
"name": "Product Pages",
"category": "Other"
}
],
"success": true
}

Get information about a page and all the related mappings More information regarding page groups in Contentsquare

projectIdOnly required for an account-level API key. The target project.
{
"payload": {
"id": 1010,
"name": "Product pages",
"category": "Other",
"mappings": [
{
"id": 147,
"name": "Ecommerce",
"description": null,
"createdAt": "2018-10-16T11:37:36.000Z",
"updatedAt": "2019-08-21T07:12:18.000Z"
},
{
"id": 148,
"name": "All pages",
"description": null,
"createdAt": "2018-10-16T12:49:49.000Z",
"updatedAt": "2019-08-21T07:12:23.000Z"
}
]
},
"success": true
}

/v1/page-groups/{pageGroupId}/zonings

Section titled /v1/page-groups/{pageGroupId}/zonings

Get all the zonings for a page group More information regarding zonings in Contentsquare

projectIdOnly required for an account-level API key. The target project.
{
"payload": [
{
"id": 100,
"name": "Revamp product page",
"createdAt": "2019-10-25T13:12:45.000Z",
"lastUpdatedAt": "2019-10-29T11:11:22.000Z"
}
],
"success": true
}

Get all the zones for a zoning More information regarding zonings in Contentsquare

projectIdOnly required for an account-level API key. The target project.
{
"payload": [
{
"id": 100,
"name": "Add to cart button"
}
],
"success": true
}