Add a new whitelist of an advertiser

HTTP method Endpoint
POST /v1/advertisers/{advertiser_id}/advertiser_whitelists

You can choose to add an ID address or a IP address segment set.

Path parameters

Parameter Description
advertiser_id The unique id for the advertiser.

Request body parameters

Field Type Description Nullable
ip string ip No
start string start ip No
end string end ip No

Response body parameters

Field Type Description
is_open integer open whitelist.
0 close ;
1 open
ip_address array ip address
ip string ip
ip_range array ip range
start string start ip
end string end ip

Example request

Request POST https://{networkname}.api.offerslook.com/v1/advertisers/4988/advertiser_whitelists


Request POST http://{networkname}.api.offerslook.com/v1/advertisers/4988/advertiser_whitelists


When adding an IP address, the format is



    {
      "ip": "192.168.2.25"
    }

When adding an IP address segment, the format is



    {
      "start": "192.168.3.3",
      "end": "192.168.3.56"
    }

Example response

The return result of adding an IP address is



    {
      "code": 0,
      "message": "Success",
      "data": {
        "advertiser_whitelist": {
          "advertiser_id": 4988,
          "is_open": 1,
          "ip_address": [
            {
              "id": "1",
              "ip": "192.168.2.2"
            },
            {
              "id": "2",
              "ip": "192.168.2.25"
            }
          ],
          "ip_range": [
            {
              "id": "3",
              "end": "192.168.1.222",
              "start": "192.168.1.1"
            },
            {
              "id": "4",
              "end": "192.168.2.12",
              "start": "192.168.2.1"
            }
          ]
        }
      }
    }

Add the IP address segment to the return result



    {
      "code": 0,
      "message": "Success",
      "data": {
        "advertiser_whitelist": {
          "advertiser_id": 4988,
          "is_open": 1,
          "ip_address": [
            {
              "id": "1",
              "ip": "192.168.2.2"
            },
            {
              "id": "2",
              "ip": "192.168.2.25"
            }
          ],
          "ip_range": [
            {
              "id": "3",
              "end": "192.168.1.222",
              "start": "192.168.1.1"
            },
            {
              "id": "4",
              "end": "192.168.2.12",
              "start": "192.168.2.1"
            },
            {
              "id": "5",
              "end": "192.168.3.56",
              "start": "192.168.3.3"
            }
          ]
        }
      }
    }

results matching ""

    No results matching ""