GetBusinessesInfo REST Template
Gets a list of objects that contains business identification information (for example, the name and identifier of the business). To get the complete details of a business in the list, use the Get Businesses By IDs REST template.
The following specifies the HTTP method, supported content types, and base URI to use in your request.
HTTP method: Get
Supported content types: XML and JSON
To use JSON, the following applies:
Your request URL must include the “format=json” query string.
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 user’s logon password.
The user’s logon user name.
The request does not include a body. For a description of the header elements that your request must include, see GetBusinessesInfoRequest Message Object.
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 GetBusinessesInfoResponse Message Object.
<GetBusinessesInfoResponse xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <BusinessesInfo xmlns:d2p1="https://adcenter.microsoft.com/v8"> <d2p1:BusinessInfo> <d2p1:Id></d2p1:Id> <d2p1:Name></d2p1:Name> </d2p1:BusinessInfo> </BusinessesInfo> </GetBusinessesInfoResponse>
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.