POST api/facebookads/postad/create

Request Information

URI Parameters

None.

Body Parameters

PagePostCarouselAdPurchaseModel
NameDescriptionTypeAdditional information
postId

string

None.

geoLocations

GeoLocations

None.

price

decimal number

None.

duration

integer

None.

couponId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "postId": "sample string 1",
  "geoLocations": {
    "custom_locations": [
      {
        "latitude": 1.1,
        "longitude": 2.1,
        "radius": 3,
        "distance_unit": "sample string 4",
        "address_string": "sample string 5"
      },
      {
        "latitude": 1.1,
        "longitude": 2.1,
        "radius": 3,
        "distance_unit": "sample string 4",
        "address_string": "sample string 5"
      }
    ]
  },
  "price": 2.0,
  "duration": 3,
  "couponId": "sample string 4"
}

text/html

Sample:
{"postId":"sample string 1","geoLocations":{"custom_locations":[{"latitude":1.1,"longitude":2.1,"radius":3,"distance_unit":"sample string 4","address_string":"sample string 5"},{"latitude":1.1,"longitude":2.1,"radius":3,"distance_unit":"sample string 4","address_string":"sample string 5"}]},"price":2.0,"duration":3,"couponId":"sample string 4"}

application/xml, text/xml

Sample:
<PagePostCarouselAdPurchaseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NPlay.Common.Models.Services">
  <CouponId>sample string 4</CouponId>
  <Duration>3</Duration>
  <GeoLocations xmlns:d2p1="http://schemas.datacontract.org/2004/07/NPlay.Common.Models">
    <d2p1:custom_locations>
      <d2p1:CustomLocation>
        <d2p1:address_string>sample string 5</d2p1:address_string>
        <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:address_string>sample string 5</d2p1:address_string>
        <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>
  <PostId>sample string 1</PostId>
  <Price>2</Price>
</PagePostCarouselAdPurchaseModel>

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 'PagePostCarouselAdPurchaseModel'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.