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.

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"
      },
      {
        "latitude": 1.1,
        "longitude": 2.1,
        "radius": 3,
        "distance_unit": "sample string 4"
      }
    ]
  },
  "price": 2.0,
  "duration": 3
}

text/html

Sample:
{"postId":"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}

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">
  <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>
  <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.