getGeoRegions

Returns a list of regions available for targeting.

Request

Request structure in JSON format:

{
  "method": "get",
  "params" : { /* required */
    "Page" : {
      "Limit" : (long),
      "Offset" : (long)
    },
    "SelectionCriteria" : { /* required */
      "Name" : (string),
      "RegionIds" : [ (long) ],
      "ExactNames" : [ (string) ]
    },
    "FieldNames" : [ ("GeoRegionId" |"GeoRegionName"|"ParentGeoRegionNames") ] /* required */
  }
}

Parameter

Type

Description

Mandatory

params structure (for JSON) / GetRequest (for SOAP)

Page

LimitOffset

Structure that defines the page for paginated selection of data.

No

SelectionCriteria

GeoRegionsSelectionCriteria

Region selection criteria.

Provide at least one of these parameters: Name, RegionIds, or ExactNames.

If the request includes the parameter:

  • Name: the method will return the results for regions with a similar name.
  • RegionIds: the method will return the results for the given region IDs.
  • ExactNames: the method will return the results for matching region names.

Yes

FieldNames

array of AdFieldEnum

Names of top-level parameters to get.

Yes

GeoRegionsSelectionCriteria structure

Name

string

Select regions with similar names.

No if RegionIds or ExactNames is specified.

RegionIds

array of long

Selects regions with the specified IDs.

No if Name or ExactNames is specified.

ExactNames

array of string

Select regions with exactly matching names.

No if Name or RegionIds is specified.

Response

Response structure in JSON format:

{
  "result" : { /* required */
    "LimitedBy" : (long),
    "GeoRegions" : [{
      "GeoRegionId" : (long),
      "GeoRegionName" : (string),
      "ParentGeoRegionNames" : { /* nillable */
        "Items" : [ (string) ] /* required */
      }
    }, .. (unbounded)]
  }
}

Parameter

Type

Description

result structure (for JSON) / GetResponse (for SOAP)

LimitedBy

long

Sequential number of the last object returned. It is included if there was a limit on the number of objects in the response. See the section Paginated data selection.

GeoRegions

array of GeoRegionsGetItem

List of regions.

GeoRegionsGetItem structure

GeoRegionId

long

ID of the region.

GeoRegionName

string

Name of the region in the language specified in the HTTP Accept-Language header in the request.

ParentGeoRegionNames

array of string

Array of names of higher-level regions.