GetGeoLocationsFileUrl Service Operation - Campaign Management
Gets a temporary URL that you can use to download a file that contains identifiers for the geographical locations that you can target or exclude.
For details about the file contents, see Geographical Location Codes.
Request Elements
The GetGeoLocationsFileUrlRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.
Note
Unless otherwise noted below, all request elements are required.
Request Body Elements
Element | Description | Data Type |
---|---|---|
CompressionType | Defines the possible compression types for the file to download. Currently the only supported compression format is GZip. This request element is optional. If no value is passed, the API will continue to return uncompressed files. |
CompressionType |
LanguageLocale | The language and locale of the geographical location display names. The supported language locale values are zh-Hant (Traditional Chinese), en (English), fr (French), de (German), it (Italian), ja-JP (Japanese), pt-BR (Brazilian Portuguese), and es (Spanish). | string |
Version | The version of the location file that you want to download. Currently the only supported version is 2.0. |
string |
Request Header Elements
Element | Description | Data Type |
---|---|---|
AuthenticationToken | The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts. For more information see Authentication with OAuth. |
string |
CustomerAccountId | The identifier of the ad account that owns or is associated with the entities in the request. This header element must have the same value as the AccountId body element when both are required. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
CustomerId | The identifier of the manager account (customer) the user is accessing or operating from. A user can have access to multiple manager accounts. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
DeveloperToken | The developer token used to access the Bing Ads API. For more information see Get a Developer Token. |
string |
Password | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
UserName | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
Response Elements
The GetGeoLocationsFileUrlResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.
Response Body Elements
Element | Description | Data Type |
---|---|---|
FileUrl | The file URL that you can use to download the geographical location data for the version, language, and locale that you requested. Before you download the file, check whether the date and time of the LastModifiedTimeUtc element is later than the date and time of your previous download. You should only download the file if necessary. |
string |
FileUrlExpiryTimeUtc | The date and time that the provided file URL will expire. If you do not download the file prior to the expiration time, then you can call the operation again to request a new file URL. You might observe that the URL is set to expire 15 minutes from the time this operation completes; however, you should not depend on a fixed duration. Future calls to this operation might result in a shorter or longer expiration time. The value is in Coordinated Universal Time (UTC). The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types. |
dateTime |
LastModifiedTimeUtc | The date and time that the geographical location data for the specified version, language, and locale was last updated. As a best practice you should store this date and time, and going forward only download the file if this value is updated to a later date and time. The value is in Coordinated Universal Time (UTC). The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types. |
dateTime |
Response Header Elements
Element | Description | Data Type |
---|---|---|
TrackingId | The identifier of the log entry that contains the details of the API call. | string |
Request SOAP
This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Action mustUnderstand="1">GetGeoLocationsFileUrl</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
<CustomerId i:nil="false">ValueHere</CustomerId>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<GetGeoLocationsFileUrlRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Version i:nil="false">ValueHere</Version>
<LanguageLocale i:nil="false">ValueHere</LanguageLocale>
<CompressionType i:nil="false">ValueHere</CompressionType>
</GetGeoLocationsFileUrlRequest>
</s:Body>
</s:Envelope>
Response SOAP
This template was generated by a tool to show the order of the body and header elements for the SOAP response.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<GetGeoLocationsFileUrlResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<FileUrl d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</FileUrl>
<FileUrlExpiryTimeUtc d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</FileUrlExpiryTimeUtc>
<LastModifiedTimeUtc>ValueHere</LastModifiedTimeUtc>
</GetGeoLocationsFileUrlResponse>
</s:Body>
</s:Envelope>
Code Syntax
The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.
public async Task<GetGeoLocationsFileUrlResponse> GetGeoLocationsFileUrlAsync(
string version,
string languageLocale,
CompressionType? compressionType)
{
var request = new GetGeoLocationsFileUrlRequest
{
Version = version,
LanguageLocale = languageLocale,
CompressionType = compressionType
};
return (await CampaignManagementService.CallAsync((s, r) => s.GetGeoLocationsFileUrlAsync(r), request));
}
static GetGeoLocationsFileUrlResponse getGeoLocationsFileUrl(
java.lang.String version,
java.lang.String languageLocale,
CompressionType compressionType) throws RemoteException, Exception
{
GetGeoLocationsFileUrlRequest request = new GetGeoLocationsFileUrlRequest();
request.setVersion(version);
request.setLanguageLocale(languageLocale);
request.setCompressionType(compressionType);
return CampaignManagementService.getService().getGeoLocationsFileUrl(request);
}
static function GetGeoLocationsFileUrl(
$version,
$languageLocale,
$compressionType)
{
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
$request = new GetGeoLocationsFileUrlRequest();
$request->Version = $version;
$request->LanguageLocale = $languageLocale;
$request->CompressionType = $compressionType;
return $GLOBALS['CampaignManagementProxy']->GetService()->GetGeoLocationsFileUrl($request);
}
response=campaignmanagement_service.GetGeoLocationsFileUrl(
Version=Version,
LanguageLocale=LanguageLocale,
CompressionType=CompressionType)
Requirements
Service: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13