Scan Reports
GET
Retrieve the latest scan for the website. The query has the following shape:
Request
[ { "account_id": "<string>", "website_id": "<string>", "id": "<string>", "latest_scan": "<boolean>", }]At least 1 object with the field account_id and website_id is required. The id field is optional. If it is given, then that report will be returned. If the id field is not given and latest_scan is not given (or is false) the website’s current report will be returned (the latest successful scan). If the id parameter is not given and latest_scan is set to true then the latest scan will be returned (even if it is a failed scan). Once the query is constructed, pass the URL encoded value in the query string parameter query.
Paging
All GET requests are subject to paging, please refer to Result Paging for details.
Response
The response has the following shape:
{ "results": [], "errors": [], "scrolling": {}}The results will contain zero or more of the following objects:
{ "results": [ { "id": "<string>", "account_id": "<string>", "cookies": [ { "category": "<string>", "country": "<string>", "domain": "<string>", "de": "<string>", "en_uk": "<string>", "en_us": "<string>", "expire": "<string>", "fr": "<string>", "id": "<string>", "initiator": "<string>", "name": "<string>", "new": "<bool>", "party_provider_type": "<string>", "service": "<string>", "service_policy_link": "<string>", "source": "<string>", "tracker_type": "<enum{'http_cookie, 'html_local_storage', 'html_session_storage', 'server_cookie', 'pixel_tracker', 'indexed_db'}>", "url": "<string>", "value": "<string>", "website_id": "<string>" } ], "pages": "<string>", "scan_failure_message": "<string>", "scan_type": "<string>", "scanned_domains": [ "<string>" ], "status": "<string>", "website_id": "<string>" } ], "errors": [ { "account_id": "<string>", "error": "<string>", "website_id": "<string>" } ], "paging": { "next_results": null, "previous_results": null }}idis the unique identifier of the reportaccount_idis the unique identifier of the accountcookiesis a list of cookie objects, documented belowpagesis the number of pages scannedscan_failure_messageis a description of the failure if the scan failedscan_typeis the type of scan, eitherall_pagesorone_pagescanned_domainsis a list of strings, each string represents a domain that was scannedstatusis the status of the scan, one ofscanning,scan_finish, orscan_faultwebsite_idis the unique identifier of the website
The objects in the cookies array:
categoryis the cookie categorycountryis the country that sourced the cookie, based on a geoip lookupdomainis the domain of the cookiedeis the description in Germanen_ukis the description in UK Englishen_usis the description in US Englishexpireis the expiry of the cookiefris the description in Frenchidis the unique identifier of the cookieinitiatoris the url that sourced the cookienameis the name of the cookienewis a flag indicating whether the cookie was found on the most recent scanparty_provider_typeis this a first-party or third-party cookieserviceis a value indicating the service that soured the cookieservice_policy_linkis a link to the servie policy of the websitesourceis the source of the cookietracker_typeis one ofhttp_cookie,html_local_storage,html_session_storage,server_cookie,pixel_tracker,indexed_dburlis the url of the cookievalueis the cookie valuewebsite_idis the unique identifier of the website
Example 1
Request scan_report for a single website.
Request
GET https://api.termly.io/v1/websites/scan_report?query=%5B%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_1234%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_1234%22%0A%20%20%7D%0A%5D
Query
[ { "account_id": "acct_1234", "website_id": "web_1234", "id": "rpt_1234", }]Response
{ "results": [ { "id": "rpt_1234", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_1234" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_1234" } ], "errors": [], "paging": { "next_results": null, "previous_results": null }}Example 2
Request
GET https://api.termly.io/v1/websites/scan_report?query=%5B%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_1234%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_1234%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_1234%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_4567%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_2112%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_1029%22%0A%20%20%7D%0A%5D%0A
Request scan_report for multiple websites.
Query
[ { "account_id": "acct_1234", "website_id": "web_1234", "id": "rpt_1233", }, { "account_id": "acct_1234", "website_id": "web_4567", "id": "rpt_123", }, { "account_id": "acct_2112", "website_id": "web_1029", "id": "rpt_1238", }]Response
{ "results": [ { "id": "rpt_1233", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_1234" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_1234" }, { "id": "rpt_123", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_4567" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_4567" }, { "id": "rpt_1238", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_1029" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_1029" } ], "errors": [], "paging": { "next_results": null, "previous_results": null }}Example 3
Request scan_report for multiple websites. One website does not exist.
Request
GET https://api.termly.io/v1/websites/scan_report?query=%5B%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_1234%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_1234%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_1234%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_4567%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22account_id%22%3A%20%22acct_2112%22%2C%0A%20%20%20%20%22website_id%22%3A%20%22web_9876%22%0A%20%20%7D%0A%5D
Query
[ { "account_id": "acct_1234", "website_id": "web_1234", "id": "rpt_1238" }, { "account_id": "acct_1234", "website_id": "web_4567", "id": "rpt_138", }, { "account_id": "acct_2112", "website_id": "web_9876", "id": "rpt_9876" }]Response
{ "results": [ { "id": "rpt_1238", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_1234" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_1234" }, { "id": "rpt_138", "account_id": "acct_1234", "compliant_adequate_countries": "false", "compliant_disclose_cookie": "true", "cookies": [ { "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "lifetime": "12345", "fr": null, "id": "cookie_1234", "initiator": null, "name": "ACME Tracker", "new": false, "party_provider_type": "third_party", "service": null, "service_policy_link": null, "source": null, "tracker_type": "http_cookie", "url": "https://example.com/cisforcookie", "value": "that's good enough for me", "website_id": "web_4567" } ], "detected_consent_banner": true, "detected_cookie_category": true, "detected_cookie_preference": true, "pages": "1", "scan_failure_message": null, "scan_type": "single_page", "scanned_domains": [ "example.com" ], "status": "scan_finish", "website_id": "web_4567" } ], "errors": [ { "error": "object_not_found", "account_id": "acct_2112", "website_id": "web_9876", "id": "rpt_9876" } ], "paging": { "next_results": null, "previous_results": null }}