GetAdEditorialReasonsByIds REST Template
Gets the reasons of why the specified ads failed editorial review.
The identifier of the account that contains the ad group whose ad failed editorial review.
The ids value is a constant string that indicates that the POST method is getting a list of ads that failed editorial review. The body of the request includes the list of identifiers of the ads that failed editorial review.
The following specifies the HTTP method, supported content types, and base URI to use in your request.
HTTP method: POST
Supported content types: XML and JSON
To use JSON, the following apply:
Your request URL must include the “format=json” query string.
For enumeration types, the value in the response is set to a numeric value instead of to the value name defined in the value set. For example, if the location of the editorial error is AdTitle, the Location value is set to 6 instead of to AdTitle.
All enumerations are zero-based, and increment by 1.
The key names that you use for the JSON members are the same as the elements of the XML objects shown in the examples below.
Production base URI: https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementServiceREST.svc
Sandbox base URI: Not available.
The following are the headers to include in your request.
The application access token. This header is not used.
The account identifier. For more information, see Account and Customer Identifiers.
The customer identifier. For more information, see Account and Customer Identifiers.
The developer access token.
The logon password of the user.
The logon user name of the user.
The following XML fragment shows the elements to use to get the reasons of why the ads failed editorial review. For a description of each element and the header elements that your request must include, see GetAdEditorialReasonsByIdsRequest.
<GetAdEditorialReasonsByIdsRequest xmlns="http://schemas.datacontract.org/2004/07/HostedService.CampaignManagementService.Rest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <AdIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:long></d4p1:long> </AdIds> </GetAdEditorialReasonsByIdsRequest>
The following XML fragment shows the elements that are included in the response. For a description of each element and the TrackingId header element that the response includes, see GetAdEditorialReasonsByIdsResponse.
<GetAdEditorialReasonsByIdsResponse xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <EditorialReasons xmlns:d2p1="https://adcenter.microsoft.com/v8"> <d2p1:EditorialReasonCollection> <d2p1:AdOrKeywordId><d2p1:AdOrKeywordId> <d2p1:Reasons> <d2p1:EditorialReason> <d2p1:Location></d2p1:Location> <d2p1:ReasonCode></d2p1:ReasonCode> <d2p1:Term></d2p1:Term> </d2p1:EditorialReason> </d2p1:Reasons> </d2p1:EditorialReasonCollection> </EditorialReasons> </GetAdEditorialReasonsByIdsResponse>
If an error occurs, the service returns one of the following HTTP error codes.
Bad request, which indicates that the request data contains an error. The response will contain either an ApiFaultDetail or AdApiFaultDetail object that identifies the error. For a list of possible error codes, see Campaign Management Error Codes and Common Error Codes.
Method not allowed, which indicates that the URI template is not correct.