Banned visitors

Posted on Mar 04, 2016 16:52

With this API call you can manage your Banned visitors.

 

JSON Format

 

Each Banned visitor is represented as JSON object with the following properties:

Name Type Description
 Id  number  The id of the banned visitor
 AgentId  number  The id of the agent who has created this banned visitor
 IP  string  The IP address of the banned visitor
 Reason  string  The reason why this visitor has been banned.
 DateAdded  string  The date when this visitor has been banned.

 

 

Get All Banned visitors

 

GET /api/bannedvisitors?page=1

Get all banned visitors for your account. You have to provide the ?page= parameter and specify the number of the page.

 

Example response

{

    "Data": [

        {

            "Id": 63,

            "AgentId": 123,

            "IP": "76.142.121.49",

            "Reason": "Spammer",

            "DateAdded": "2016-03-05T03:46:15.193Z"

        },

        {

            "Id": 64,

            "AgentId": 121,

            "IP": "229.233.203.183",

            "Reason": null,

            "DateAdded": "2016-03-05T21:41:40.59Z"

        },

................................................

    ],

    "Paging": {

        "PageNo": 1,

        "PageSize": 20,

        "PageCount": 1,

        "TotalRecordCount": 5

    }

}

 

 

Get Banned visitor by Id

 

GET /api/bannedvisitors/{banned_visitor_id}

Get banned visitor from your account by specified id.

 

Example response

{

    "Id": 64,

    "AgentId": 121,

    "IP": "229.233.203.183",

    "Reason": null,

    "DateAdded": "2016-03-05T03:49:14.53Z"

}

 

 

Get Banned IP addresses

 

GET /api/bannedvisitors/ip

Get all banned IP addresses for your account.

 

Example response

[
  "76.142.121.49",
  "229.233.203.183",
  "95.153.127.202",
  "48.104.88.20",
  "158.65.139.86"
]

 

 

Create Banned visitor

 

POST /api/bannedvisitors

Create banned visitor for your account.

 

Example response

{

    "Id": 85,

    "AgentId": 121,

    "IP": "109.44.150.219",

    "Reason": "Spammer",

    "DateAdded": "2016-03-05T21:58:33.5848902Z"

}

 

  

Delete Banned visitor

 

DELETE /api/bannedvisitors/{banned_visitor_id}

Delete banned visitor from your account by specified id.