Media Data Object

 

Defines the base object of media.

Do not try to instantiate a Media. You can create the following object that derives from it.

<xs:complexType name="Media">
  <xs:sequence>
    <xs:element minOccurs="0" name="Id" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="MediaType" nillable="true" type="xs:string" />
    <xs:element name="Type" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

ElementDescriptionData TypeAdd
IdThe unique Bing Ads identifier of the media.longRead-only
MediaTypeThe media type. For more information about media types, see Remarks below.stringRead-only
TypeThe type of media to add to the media library.

For media that will be used with a LocationAdExtension, the supported values are Icon and Image.

For media that will be used with an ImageAdExtension, the supported values are Image16x9, Image15x10, Image4x3, and Image12x10.

For more information about supported aspect ratios, see the Image Data Object.
stringRequired

For Java and the .NET languages, do not set the MediaType element because the value is determined when you instantiate an image.

If you generate the SOAP manually, use the type attribute of the <Media> node as shown in the following example, to specify that the media is an image.

System_CAPS_ICON_note.jpg Note

Images and icons are both created as Image objects.

<Media xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Media i:type="Image">
    <Id i:nil="true" />
    <MediaType>Image</MediaType>
    <Type>Icon</Type>
    <Data>IconDataGoesHere</Data>
  </Media>
  <Media i:type="Image">
    <Id i:nil="true" />
    <MediaType>Image</MediaType>
    <Type>Image15x10</Type>
    <Data>ImageDataGoesHere</Data>
  </Media>
</Media>

CampaignManagementService.svc v10

Namespace: https://bingads.microsoft.com/CampaignManagement/v10

AddMedia
GetMediaByIds

Show: