Get session
Get session by ID
GET
/
sessions
/
{id}
curl --request GET \
--url https://cookiechimp.com/api/v1/sessions/{id} \
--header 'Authorization: <api-key>'
{
"id": "sess123",
"user_id": "user456",
"pageviews": [
{
"id": "pageview789",
"session_id": "sess123",
"url": "https://www.example.com/products",
"consent_id": null,
"active_cookies": [
"essential-cookie-1"
],
"created_at": "2023-01-20T12:45:30Z"
},
{
"id": "pageview890",
"session_id": "sess123",
"url": "https://www.example.com/products/123",
"consent_id": "consent321",
"active_cookies": [
"essential-cookie-1",
"cookie1",
"cookie2"
],
"created_at": "2023-01-20T12:50:00Z"
}
],
"consents": [
{
"id": "consent321",
"session_id": "sess123",
"user_id": "user456",
"user_preferences": {
"accept_type": "all",
"accepted_categories": [
"cat1",
"cat2"
],
"rejected_categories": [
"cat3",
"cat4"
],
"accepted_services": {
"company1": [
"cookie1",
"cookie2"
]
},
"rejected_services": {}
},
"created_at": "2023-01-20T12:46:30Z"
}
],
"first_seen_at": "2023-01-20T12:45:30Z",
"last_seen_at": "2023-01-20T12:50:00Z"
}
Authorizations
Path Parameters
ID of the resource
Response
200
application/json
Session
Unique identifier for the session
ID of the user set by your website
List of pageviews in the session
Unique identifier for the pageview
ID of the session
URL of the pageview
If the user has given consent, the ID of the consent that is associated with the pageview
List of active cookies in the pageview
Date and time when the pageview was created
List of consents in the session
Available options:
all
, custom
, necessary
ID of the user set by your website
Unique identifier for the consent
ID of the session
Date and time when the consent was created
Date and time when the session was first seen
Date and time when the session was last seen
curl --request GET \
--url https://cookiechimp.com/api/v1/sessions/{id} \
--header 'Authorization: <api-key>'
{
"id": "sess123",
"user_id": "user456",
"pageviews": [
{
"id": "pageview789",
"session_id": "sess123",
"url": "https://www.example.com/products",
"consent_id": null,
"active_cookies": [
"essential-cookie-1"
],
"created_at": "2023-01-20T12:45:30Z"
},
{
"id": "pageview890",
"session_id": "sess123",
"url": "https://www.example.com/products/123",
"consent_id": "consent321",
"active_cookies": [
"essential-cookie-1",
"cookie1",
"cookie2"
],
"created_at": "2023-01-20T12:50:00Z"
}
],
"consents": [
{
"id": "consent321",
"session_id": "sess123",
"user_id": "user456",
"user_preferences": {
"accept_type": "all",
"accepted_categories": [
"cat1",
"cat2"
],
"rejected_categories": [
"cat3",
"cat4"
],
"accepted_services": {
"company1": [
"cookie1",
"cookie2"
]
},
"rejected_services": {}
},
"created_at": "2023-01-20T12:46:30Z"
}
],
"first_seen_at": "2023-01-20T12:45:30Z",
"last_seen_at": "2023-01-20T12:50:00Z"
}