Adding Company Site Cookies
If you need to add a new cookie for a company site registered on illow, you can do so effortlessly by sending a POST request to our API at the following endpoint:
https://api.platform.illow.io/open-api/v1/cookies/{siteId}/cookie
info
Important: Ensure that you include your Access Key in the X-API-Key header for all your requests.
Query Parameters
Property | Type | Description |
---|---|---|
siteId | string | The unique ID created by illow for your site |
Request Body
The request body should be in JSON format and must contain the cookie information you want to add. The structure of the request body should match the following definition:
Property | Type | Required? | Description |
---|---|---|---|
name | string | Yes | The name of the cookie. |
domain | string | Yes | The domain associated with the cookie. |
expires | number | Yes | The expiration timestamp of the cookie in milliseconds. |
category | string | Yes | The category to which the cookie belongs (necessary, preference, marketing, statistics, unclassified). |
description | string | No | Additional information or a description of the cookie's purpose. |
isOptIn | boolean | No | Indicates if the cookie is an opt-in cookie. |
wildcardMatch | boolean | Yes | Indicates whether the cookie allows wildcard matches in the domain and path fields. |
Response
The API will respond with one of the following status codes:
204
: Cookie created successfully.400
: Bad request.400
: Authentication error.500
: Internal server error. The request has failed.
Example
This example demonstrates the creation of a new cookie named "session_id" for the domain "example.com." It collects statistical data for websites and is set to expire at a specific timestamp.
{
"name": "session_id",
"domain": "example.com",
"expires": 1679989200,
"category": "Statistics",
"description": "This cookie collects statistical data",
"isOptIn": true,
"wildcardMatch": false
}