Skip to main content

Updating Cookies for a Site

To update the company cookies associated with a specific site, you can use a PUT request sent to the following endpoint:

https://api.platform.illow.io/open-api/v1/cookies/{siteId}
info

Replace {SITE_ID} with the actual site ID obtained previously.

This endpoint supports the following query parameter:

Query Parameters

PropertyTypeDescription
siteIdstringThe unique ID assigned by illow for your site

Request Body

The request body should be in JSON format and should include an array of updated cookies associated with the company site. The structure of the request body should match the following definition:

PropertyTypeDescription
cookiesArray of cookiesAn array of updated cookies associated with the company site.

Response

The API will return one of the following HTTP status codes:

  • 200: Successfully updated the company's cookies for the site.

Response Format: JSON

PropertyTypeDescription
companyIdstringUnique identifier for the company.
deletedbooleanIndicates whether the company is deleted.
domainstringThe domain associated with the company.
siteIdstringThe identifier for the site.
rescanPendingbooleanIndicates if a rescan is pending.
timestampnumber (Unix Timestamp)The timestamp when the operation occurred
pageViewsReachedbooleanIndicates if page views were reached.
cookiesArray of cookiesAn array of cookies associated with the company site.
  • 422: Unprocessable entity. The request body is malformed.
  • 500: Internal server error. The request has failed.

Example

Request Body

{
"cookies": [
{
"name": "CONSENT",
"domain": "youtube.com",
"expires": 9600,
"category": "Unclassified",
"description": "This cookie is used to store user consent preferences on YouTube.",
"isOptIn": false,
"wildcardMatch": false
}
]
}

Response body

{
"companyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"deleted": false,
"domain": "example.com",
"siteId": "exampleSite",
"rescanPending": false,
"cookies": [
{
"name": "session_id",
"domain": "example.com",
"expires": 1689467134,
"category": "Statistics",
"description": "This cookie collects statistical data for website analytics.",
"isOptIn": true,
"wildcardMatch": false
},
{
"name": "user_token",
"domain": "example.com",
"expires": 1699467134,
"category": "Necessary",
"description": "User authentication token.",
"isOptIn": false,
"wildcardMatch": false
},
{
"name": "CONSENT",
"domain": "youtube.com",
"expires": 9600,
"category": "Unclassified",
"description": "This cookie is used to store user consent preferences on YouTube.",
"isOptIn": false,
"wildcardMatch": false
}
],
"timestamp": 1679989200,
"pageViewsReached": true
}