Add a new whitelist of an advertiser

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

Path parameters

Request body parameters

Response body parameters

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"
            }
          ]
        }
      }
    }

Last updated