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, and the Paging Parameters Object for configuring the parameters.
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 }}
id
is the unique identifier of the reportaccount_id
is the unique identifier of the accountcookies
is a list of cookie objects, documented belowpages
is the number of pages scannedscan_failure_message
is a description of the failure if the scan failedscan_type
is the type of scan, eitherall_pages
orone_page
scanned_domains
is a list of strings, each string represents a domain that was scannedstatus
is the status of the scan, one ofscanning
,scan_finish
, orscan_fault
website_id
is the unique identifier of the website
The objects in the cookies array:
category
is the cookie categorycountry
is the country that sourced the cookie, based on a geoip lookupdomain
is the domain of the cookiede
is the description in Germanen_uk
is the description in UK Englishen_us
is the description in US Englishexpire
is the expiry of the cookiefr
is the description in Frenchid
is the unique identifier of the cookieinitiator
is the url that sourced the cookiename
is the name of the cookienew
is a flag indicating whether the cookie was found on the most recent scanparty_provider_type
is this a first-party or third-party cookieservice
is a value indicating the service that soured the cookieservice_policy_link
is a link to the servie policy of the websitesource
is the source of the cookietracker_type
is one ofhttp_cookie
,html_local_storage
,html_session_storage
,server_cookie
,pixel_tracker
,indexed_db
url
is the url of the cookievalue
is the cookie valuewebsite_id
is 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 }}