Update the settings for a geo

HTTP method Endpoint
PUT /v1/offers/{offer_id}/geo/{geo_id}

Path parameters

Parameter Description
offer_id The unique id for the offer.
geo_id The unique id for the geo.

Request body parameters

Field Type Description Nullable
target To push the identification of the target, you must write the following field. No
country string Country to be targeted.
When the country is identified as the exclusion (type=2), the city is not optional
No
city array To push (or exclude) the country below.
type integer An identifier included or excluded.
Type:
1 include ;
2 exclude

Response body parameters

Field Type Description
id integer
offer_id integer A string that uniquely identifies this offer.
country string Country to be targeted
country_code string Country code.
city array City in targeted country.
type integer An identifier included or excluded.

Example request

Request PUT https://{networkname}.api.offerslook.com/v1/offers/3147/geo/28574


Request PUT http://{networkname}.api.offerslook.com/v1/offers/3147/geo/28574



    {
      "type": 1,
      "target": {
        "country": "China",
        "city": [
          "Guangtai",
          "Dongguan"
        ]
      }
    }

Example response


    {
      "code": 0,
      "message": "Success",
      "data": {
        "offer_geo": {
          "type": 1,
          "target": [
            {
              "type": 1,
              "country": "Albania",
              "country_code": "AL",
              "city": [

              ],
              "id": 28574,
              "offer_id": 3147
            },
            {
              "type": 2,
              "country": "China",
              "country_code": "CN",
              "city": [
                "Guangtai",
                "Dongguan"
              ],
              "id": 28575,
              "offer_id": 3147
            },
            {
              "type": 1,
              "country": "Armenia",
              "country_code": "AM",
              "city": [
                "Kapan",
                "Agarak",
                "Azatamut"
              ],
              "id": 28576,
              "offer_id": 3147
            },
            {
              "type": 1,
              "country": "Western Sahara",
              "country_code": "EH",
              "city": [

              ],
              "id": 28577,
              "offer_id": 3147
            }
          ]
        }
      }
    }

results matching ""

    No results matching ""