SiteInsight public API (v1)

Campaigns

Campaigns - Get campaign by ID

Returns campaign info.


                                            get/Campaigns/:ID
curl --insecure --header "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" http://SiteInsight.net/api/v1/Campaigns/1

URL parameter

Name Type Description
ID Number

Campaign ID

Success = true

Name Type Description
ID Number

Campaign ID

Email optional String

Email for notification

Name String

Campaign name

Status String

Campaign status. Possible values:
"Working" - Campaign was moderated and initialized
"Pending" - Campaign created, but not yet verified by moderator
"Rejected" - The campaign did not pass the moderation
"Pause" - Campaign stopped
"NotConfigured" - To get started, you need to configure all the campaign settings

Deleted Boolean

Deleted Campaign might be restored

CreateDate DateTime

DateTime when campaign was created

ChangeDate DateTime

DateTime when campaign was changed


    {
    "ContentEncoding": null,
    "ContentType": null,
    "Data": {
        "Success": true,
        "Campaign": {
            "ID": 137,
            "Name": "Name",
            "Email": "NotificanionEmail@yandex.ru",
            "Deleted": false,
            "Status": "Working",
            "CreateDate": "2017-12-19T07:28:29",
            "ChangeDate": "2018-03-22T19:41:54"
        }
    },
    "JsonRequestBehavior": 0,
    "MaxJsonLength": null,
    "RecursionLimit": null
}

Campaigns - Stop campaign

Stop campaign. Returns updated campaign

put/Campaigns/Stop/:id

URL parameter

Name Type Description
ID Number

Campaign ID

Campaigns - Start campaign

Start campaign. Returns updated campaign

put/Campaigns/Start/:id

URL parameter

Name Type Description
ID Number

Campaign ID

Campaigns - Restart campaign

Restart campaign

put/Campaigns/Restart/:id

URL parameter

Name Type Description
ID Number

Campaign ID

SiteInCampaigns

SiteInCampaigns - Get siteInCampaign by id

Returns siteInCampaign info.

get/siteInCampaigns/:id
curl --insecure --header "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" http://SiteInsight.net/api/v1/SiteInCampaigns/1

Parameters

Name Type Description
ID Number

SiteInCampaign ID

Success = true

Name Type Description
ID Number

SiteInCampaign ID

Name String

SiteInCampaign name

Comments String

Comments

Deleted Boolean

Deleted SiteInCampaign might be restored

Enabled Boolean

Monitoring state

Cookies Object[]

Cookies

   ID Number

Cookie ID

   Site String

Site

   Type String

Cookie type

   City String

City name

   Name String

Cookie name

   Value String

Cookie value

CreateDate DateTime

DateTime when siteInCampaign was created

ChangeDate DateTime

DateTime when siteInCampaign was changed


    {
    "ContentEncoding": null,
    "ContentType": null,
    "Data": {
        "Success": true,
        "SiteInCampaign": {
            "ID": 284,
            "Name": null,
            "Comments": null,
            "Deleted": false,
            "Enabled": false,
            "Cookies": [
                {
                    "ID": 116,
                    "Site": "smartstitch.ru",
                    "Type": "City",
                    "CityID": 2406,
                    "City": "Москва",
                    "Value": "Moscow",
                    "Name": "defaultCity",
                    "CreateDate": "2017-12-07T13:26:04",
                    "ChangeDate": "2017-12-07T13:37:19"
                }
            ],
            "CreateDate": "2017-12-07T13:26:04",
            "ChangeDate": "2017-12-07T14:48:23"
        }
    },
    "JsonRequestBehavior": 0,
    "MaxJsonLength": null,
    "RecursionLimit": null
}

SiteInCampaigns - Get siteInCampaigns by campaign ID

Returns siteInCampaigns in array ordered by ID. See get SiteInCampaign for the response details.

get/SiteInCampaigns?CampaignID=137&Take=10&Skip=0
curl --insecure -- http://SiteInsight.net/api/v1/SiteInCampaigns?CampaignID=137&Take=10&Skip=0

Parameters

Name Type Description
CampaignID Number

Campaign ID

Take Number

Number of siteInCampaigns in response. Max value = 10

Skip Number

SiteInCampaigns - Stop siteInCampaign

Stop siteInCampaign. Returns updated siteInCampaign

put/SiteInCampaigns/Stop/:id

URL parameter

Name Type Description
ID Number

SiteInCampaign ID

SiteInCampaigns - Start siteInCampaign

Start siteInCampaign. Returns updated siteInCampaign

put/SiteInCampaigns/Start/:id

URL parameter

Name Type Description
ID Number

SiteInCampaign ID

Products

Products - Get product by ID

Returns product info. Response may contains user defineds fields

get/products/:ID
curl --insecure --header "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" http://SiteInsight.net/api/v1/Products/1

Parameters

Name Type Description
ID Number

Product ID

Success = true

Name Type Description
ID Number

Product ID

Status String

Product status. Possible values:
"MonitoringEnabled"
"MonitoringDisabled"
"MonitoringError"

CampaignID Number

Campaign ID

Deleted Boolean

Deleted Product might be restored

CreateDate DateTime

DateTime when product was created

ChangeDate DateTime

DateTime when product was changed

Urls Object[]

Urls

   ID Number

Url ID

   FullPath String

Url full path

   Status String

Url status. Possible values:
"Ok"
"Error"
"PollDisabled"
"Warning"

   StatusDescription String

Status description

   LastPollDate Number

Unix timestamp


    {
    "ContentEncoding": null,
    "ContentType": null,
    "Data": {
        "Success": true,
        "Product": {
            "ID": 254684,
            "Status": "MonitoringEnabled",
            "CampaignID": 137,
            "Deleted": false,
            "CreateDate": "2017-12-19T14:55:58",
            "ChangeDate": "2017-12-19T21:20:56",
            "Urls": [
                {
                    "ID": 253718,
                    "FullPath": "https://zvetnoe.ru/product/belosnezhka-1/nabor-dlya-vyshivaniya-serebristyy-angel/",
                    "Status": "Ok",
                    "StatusDescription": null,
                    "LastPollDate": 1534789731,
                    "ErrorsCount": null,
                    "HttpStatusCode": 200
                },
                {
                    "ID": 253719,
                    "FullPath": "https://www.mirkrestikom.ru/shop/goods/2689947_4002-14-serebristii-angel/",
                    "Status": "Ok",
                    "StatusDescription": null,
                    "LastPollDate": 1535029806,
                    "ErrorsCount": null,
                    "HttpStatusCode": 200
                },
                {
                    "ID": 253720,
                    "FullPath": "https://aipa.ru/nabory-dlya-vyshivaniya/1824989-serebristyy-angel-nabor-dlya-vyshivaniya-belosnezhka.html",
                    "Status": "Ok",
                    "StatusDescription": null,
                    "LastPollDate": 1535412819,
                    "ErrorsCount": null,
                    "HttpStatusCode": 200
                },
                {
                    "ID": 253721,
                    "FullPath": "https://www.raskraski.ru/cat_show_743933.html",
                    "Status": "Ok",
                    "StatusDescription": "Бренд (512) is empty [29.07.2018 8:29:55]",
                    "LastPollDate": 1532852995,
                    "ErrorsCount": null,
                    "HttpStatusCode": 429
                },
                {
                    "ID": 253722,
                    "FullPath": "https://www.lelekahobby.ru/catalog/7108/76634/",
                    "Status": null,
                    "StatusDescription": null,
                    "LastPollDate": null,
                    "ErrorsCount": null,
                    "HttpStatusCode": null
                },
                {
                    "ID": 253723,
                    "FullPath": "https://www.wildberries.ru/catalog/2305812/detail.aspx",
                    "Status": "Ok",
                    "StatusDescription": "Цена (222) length = 0 [27.08.2018 21:28:53] \r\nВалюта (223) length = 0 [27.08.2018 21:28:53] \r\n",
                    "LastPollDate": 1535405333,
                    "ErrorsCount": null,
                    "HttpStatusCode": 200
                },
                {
                    "ID": 253724,
                    "FullPath": "https://www.7petel.ru/vyshivka/belosnezhka/4002/",
                    "Status": "Ok",
                    "StatusDescription": null,
                    "LastPollDate": 1535310682,
                    "ErrorsCount": null,
                    "HttpStatusCode": 200
                }
            ],
            "PropertyNameID12TypeID55": null
        }
    },
    "JsonRequestBehavior": 0,
    "MaxJsonLength": null,
    "RecursionLimit": null
}

Products - Get products by campaign ID

Returns products in array ordered by ID. See get Products for the response details.

get/Products?CampaignID=137&Take=10&Skip=0
curl --insecure -- http://SiteInsight.net/api/v1/Products?CampaignID=137&Take=10&Skip=0

Parameters

Name Type Description
CampaignID Number

Campaign ID

Take Number

Number of products in response. Max value = 10

Skip Number

Products - Stop product monitoring

Stop product monitoring. Returns updated product

put/Products/Stop/:id

URL parameter

Name Type Description
ID Number

Product ID

Products - Start product monitoring

Start product monitoring. Returns updated product

put/Products/Stop/:id

URL parameter

Name Type Description
ID Number

Product ID

Products - Delete product

Delete product.

delete/Products/Delete/:id

URL parameter

Name Type Description
ID Number

Product ID

Products - Create product

Create new product.

posthttp://SiteInsight.net/api/v1/Products?CampaignID=137

Parametr

Name Type Description
CampaignID Number

Campaign ID

Urls

Urls - Delete url from product

Delete url.

delete/Urls/Delete?ProductID=137&UrlID=43456

URL parameter

Name Type Description
ProductID Number

Product ID

UrlID Number

Url ID

Urls - Create url and add it to product

Create new url.

posthttp://SiteInsight.net/api/v1/Urls/Create?ProductID=137&Path=https://stackoverflow.com/questions/27401743/how-to-redirect-subdomain-to-another-local-ipport-with-iis

Parametr

Name Type Description
ProductID Number

Product ID

Path Number

Url full path

Measure currents

MeasureCurrents - Get measure current

Returns measure current. Response contains user defineds fields

get/MeasureCurrents?ProductID=0&CookieID=0&UrlID=0
curl --insecure --header "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" http://SiteInsight.net/api/v1/MeasureCurrents?ProductID=0&CookieID=0&UrlID=0

Parameters

Name Type Description
ProductID Number

Product ID

UrlID Number

Url ID

CookieID Number

Cookie ID

Success = true

Name Type Description
UrlID Number

Url ID

ProductID Number

Product ID

CookieID Number

Cookie ID

Path String

Url full path

MaxDate DateTime

Max date

LastPollDate DateTime

Url lastPollDate

MeasuresIsActual Boolean

True if all poll dates of updatable fields are equal url last poll date


    {
    "ContentEncoding": null,
    "ContentType": null,
    "Data": {
        "Success": true,
        "MeasureCurrent": {
            "UrlID": 1688990,
            "ProductID": 1451898,
            "CookieID": 136,
            "Path": "https://sklad-hobby.ru/kanva/kanva-aida-zweigart-metrazhom/kanva-perlaida-11-ct-shirina-110-sm-991685",
            "MaxDate": "2018-08-20T08:09:41",
            "MeasuresIsActual": true,
            "HttpStatusCode": 200,
            "LastPollDate": "2018-08-20T08:09:40",
            "PropertyNameID15TypeID53": "Канва Perl-Aida 11 ct ширина 110 см",
            "PropertyNameID16TypeID52": "1265.572",
            "PropertyNameID11TypeID53": "RUB",
            "PropertyNameID10TypeID53": "ZWEIGART",
            "PropertyNameID12TypeID55": "true"
        }
    },
    "JsonRequestBehavior": 0,
    "MaxJsonLength": null,
    "RecursionLimit": null
}