DataShopper API Documentation
Welcome to the DataShopper API! Our API allows you to leverage the power of data-driven solutions to identify anonymous website visitors, retarget users, and optimize your marketing strategies. This documentation provides detailed information on how to use our API effectively.
Create Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel
Request Type: POST
Body: raw
Parameter | Type | Description |
|---|---|---|
api_key | string | Your unique API key provided by the Datashopper team. |
name | string | The name of website. |
url | string | The url of website. |
filter | string | This field is optional, only attach for creating pixel for specific routes. It can either "include" or "exclude". |
routes | array | An array comprising of specific routes on which the pixel should be executed. Each specific route must follow the format "/specific-path-name". Leave only "/" for homepage. This field is optional, only attach for creating pixel for specific routes. |
Example Body Request:
{
"api_key": "your-api-key",
"name":"website-name",
"url": "https://www.website.com",
"filter": "include",
"routes": [
"/",
"/contact"
]
}
Get All Pixels
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel
Request Type: GET
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
Example Body Request:
{
"api_key": "your-api-key"
}
Get a Pixel Script
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/your-website-slug
Request Type: GET
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
Example Body Request:
{
"api_key": "your-api-key"
}
Example Body Response:
<script>
(function(){
var e = document.getElementsByTagName("script")[0];
var d = document.createElement("script");
var date = new Date();
var newDate = date.getFullYear() + '-' + String(date.getDate()).padStart(2, '0') + '-' + String(date.getHours()).padStart(2, '0');
d.src = "https://some-website.com/script?request_id=your-website-slug&date=" + encodeURIComponent(newDate);
d.type = "text/javascript";
d.async = true;
d.defer = true;
e.parentNode.insertBefore(d, e);
})();
<script>
Add/Update UTM Filters to a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/utm-filters
Request Type: POST
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
| campaign_source | string | Campaign Source. This field is required. |
| campaign_medium | string | Campaign Medium. This field is required. |
| campaign_name | string | Campaign Name. This field is optional. |
| campaign_term | string | Campaign Term. This field is optional. |
| campaign_content | string | Campaign Content. This field is optional. |
Example Body Request:
{
"api_key": "your-api-key",
"website":"website-name",
"campaign_source": "source",
"campaign_medium": "medium",
"campaign_name": "name",
"campaign_term": "term",
"campaign_content": "content"
}
Add/Update Zip Code Filters to a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/zip-codes
Request Type: POST
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
| type | string | This field can either be "include" or "exclude" and will decide to include/exclude the specific zip codes. |
| zip_codes | array | This array will contain the specific zip codes. |
Example Body Request:
{
"api_key": "your-api-key",
"website":"website-name",
"type": "include",
"zip_codes": [
"60021",
"12345"
]
}
Create a Blacklist Filter for a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/blacklist
Request Type: POST
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
| name | string | The name of blacklist. |
| type | string | The type of blacklist, it can be either "email" or "address". |
| list | array | This array will contain instances of either email or address. |
Example Body Request:
{
"api_key": "your-api-key",
"website":"website-name",
"name": "blacklist-name",
"type": "email",
"list": [
"[email protected]",
"[email protected]"
]
}
Delete UTM Filters for a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/utm-filters
Request Type: DELETE
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
Delete Zip Code Filter for a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/zip-codes
Request Type: DELETE
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
Delete a Blacklist Filter for a Pixel
Endpoint: https://main.dashboard.datashopper.com/api/v1/pixel/blacklist/blacklist-id
Request Type: DELETE
Body: raw
| Parameter | Type | Description |
|---|---|---|
| api_key | string | Your unique API key provided by the Datashopper team. |
| website | string | The slug of your website. |
Updated about 10 hours ago
