Add a new geo for offer

HTTP method Endpoint
POST /v1/offers/{offer_id}/geo

Path parameters

Parameter Description
offer_id The unique id for the offer.

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 POST https://{networkname}.api.offerslook.com/v1/offers/3147/geo


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



    {
      "type": 1,
      "target": {
        "type": 1,
        "country": "Western Sahara",
        "city": [

        ]
      }
    }

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": [
                "Guanzhuang",
                "Liudong"
              ],
              "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 ""