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
Property | Type | Description |
---|---|---|
siteId | string | The 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:
Property | Type | Description |
---|---|---|
cookies | Array of cookies | An 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
Property | Type | Description |
---|---|---|
companyId | string | Unique identifier for the company. |
deleted | boolean | Indicates whether the company is deleted. |
domain | string | The domain associated with the company. |
siteId | string | The identifier for the site. |
rescanPending | boolean | Indicates if a rescan is pending. |
timestamp | number (Unix Timestamp) | The timestamp when the operation occurred |
pageViewsReached | boolean | Indicates if page views were reached. |
cookies | Array of cookies | An 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
}