Cookies
PUT
Updates cookies. The request body has the following shape:
{ "account_id": "<string>", "category": "<enum{'unclassified', 'essential', 'performance', 'analytics;', 'advertising', 'social_networking'}>", "country": "<string>", "domain": "<string>", "de": "<string>", "en_uk": "<string>", "en_us": "<string>", "fr": "<string>", "id": "<string>", "initiator": "<string>", "name": "<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>"}account_idis the unique identifier of the accountcategoryis 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 Englishfris the description in Frenchidis the unique identifier of the cookieinitiatoris the url that sourced the cookienameis the name of the 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
At least 1 object with the field account_id and website_id is required.
The results will contain zero or more of the following objects:
{ "account_id": "<string>", "category": "<enum{'unclassified', 'essential', 'performance', 'analytics;', 'advertising', 'social_networking'}>", "country": "<string>", "domain": "<string>", "de": "<string>", "en_uk": "<string>", "en_us": "<string>", "fr": "<string>", "party_provider_type": "<string>", "initiator": "<string>", "name": "<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>" "_idx": <integer>}If one of the collaborators cannot be updated, the object will be an error object. If the error is a validation error, there will be a field called validation errors
Example 1
Updates a single cookie for a single website.
Request
PUT https://api.termly.io/v1/websites/cookies
Request Body
[ { "account_id": "acct_1234", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_1234", "initiator": null, "name": "ACME Tracker", "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" }]Response
[ { "account_id": "acct_1234", "id": "ck_1234", "website_id": "web_1234", "_idx": 0 }]Example 2
Update multiple cookies for multiple websites.
Request
PUT https://api.termly.io/v1/websites/cookies
Request Body
[ { "account_id": "acct_1234", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_1234", "initiator": null, "name": "ACME Tracker", "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" }, { "account_id": "acct_1234", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_5678", "initiator": null, "name": "ACME Tracker", "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_0987" }, { "account_id": "acct_4567", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_2112", "initiator": null, "name": "ACME Tracker", "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" }]Response
[ { "account_id": "acct_1234", "id": "ck_1234", "website_id": "web_1234", "_idx": 0 }, { "account_id": "acct_1234", "id": "ck_5678", "website_id": "web_0987", "_idx": 1 }, { "account_id": "acct_4567", "id": "ck_2112", "website_id": "web_4567", "_idx": 2 }]Example 3
Updates single cookie with multiple requests due to website not found.
Request
PUT https://api.termly.io/v1/websites/cookies
Request Body
[ { "account_id": "acct_1234", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_1234", "initiator": null, "name": "ACME Tracker", "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" }, { "account_id": "acct_1234", "category": null, "country": "United States", "domain": "https://example.com", "de": null, "en_uk": null, "en_us": "Tracks the widget", "fr": null, "id": "ck_0000", "initiator": null, "name": "ACME Tracker", "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_0987" }]Response
[ { "account_id": "acct_1234", "id": "ck_1234", "website_id": "web_1234", "_idx": 0 }, { "account_id": "acct_1234", "error": "object_not_found", "id": "web_0987", "_idx": 1 }]