POST api/facebookads/listing/create

Request Information

URI Parameters

None.

Body Parameters

ListingAdPurchaseModel
NameDescriptionTypeAdditional information
listingId

string

None.

geoLocations

GeoLocations

None.

price

decimal number

None.

duration

integer

None.

pageId

string

None.

description

string

None.

message

string

None.

name

string

None.

ribbonText

string

None.

Request Formats

application/json, text/json

Sample:
{
  "listingId": "sample string 1",
  "geoLocations": {
    "custom_locations": [
      {
        "latitude": 1.1,
        "longitude": 2.1,
        "radius": 3,
        "distance_unit": "sample string 4"
      },
      {
        "latitude": 1.1,
        "longitude": 2.1,
        "radius": 3,
        "distance_unit": "sample string 4"
      }
    ]
  },
  "price": 2.0,
  "duration": 3,
  "pageId": "sample string 4",
  "description": "sample string 5",
  "message": "sample string 6",
  "name": "sample string 7",
  "ribbonText": "sample string 8"
}

text/html

Sample:
{"listingId":"sample string 1","geoLocations":{"custom_locations":[{"latitude":1.1,"longitude":2.1,"radius":3,"distance_unit":"sample string 4"},{"latitude":1.1,"longitude":2.1,"radius":3,"distance_unit":"sample string 4"}]},"price":2.0,"duration":3,"pageId":"sample string 4","description":"sample string 5","message":"sample string 6","name":"sample string 7","ribbonText":"sample string 8"}

application/xml, text/xml

Sample:
<ListingAdPurchaseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NPlay.Common.Models.Services">
  <CreativeDescription>sample string 5</CreativeDescription>
  <CreativeMessage>sample string 6</CreativeMessage>
  <CreativeName>sample string 7</CreativeName>
  <Duration>3</Duration>
  <GeoLocations xmlns:d2p1="http://schemas.datacontract.org/2004/07/NPlay.Common.Models">
    <d2p1:custom_locations>
      <d2p1:CustomLocation>
        <d2p1:distance_unit>sample string 4</d2p1:distance_unit>
        <d2p1:latitude>1.1</d2p1:latitude>
        <d2p1:longitude>2.1</d2p1:longitude>
        <d2p1:radius>3</d2p1:radius>
      </d2p1:CustomLocation>
      <d2p1:CustomLocation>
        <d2p1:distance_unit>sample string 4</d2p1:distance_unit>
        <d2p1:latitude>1.1</d2p1:latitude>
        <d2p1:longitude>2.1</d2p1:longitude>
        <d2p1:radius>3</d2p1:radius>
      </d2p1:CustomLocation>
    </d2p1:custom_locations>
  </GeoLocations>
  <ListingId>sample string 1</ListingId>
  <PageId>sample string 4</PageId>
  <Price>2</Price>
  <RibbonText>sample string 8</RibbonText>
</ListingAdPurchaseModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ListingAdPurchaseModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/html, application/xml, text/xml

Sample:

Sample not available.