POST api/facebookads/basic/create

Request Information

URI Parameters

None.

Body Parameters

BasicAdPurchaseModel
NameDescriptionTypeAdditional information
inputId

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.

type

integer

None.

creativeImageUrl

string

None.

title

string

None.

creativeUrl

string

None.

paymentDescription

string

None.

couponId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "inputId": "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,
  "pageId": "sample string 4",
  "description": "sample string 5",
  "message": "sample string 6",
  "name": "sample string 7",
  "ribbonText": "sample string 8",
  "type": 9,
  "creativeImageUrl": "sample string 10",
  "title": "sample string 11",
  "creativeUrl": "sample string 12",
  "paymentDescription": "sample string 13",
  "couponId": "sample string 14"
}

text/html

Sample:
{"inputId":"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,"pageId":"sample string 4","description":"sample string 5","message":"sample string 6","name":"sample string 7","ribbonText":"sample string 8","type":9,"creativeImageUrl":"sample string 10","title":"sample string 11","creativeUrl":"sample string 12","paymentDescription":"sample string 13","couponId":"sample string 14"}

application/xml, text/xml

Sample:
<BasicAdPurchaseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NPlay.Common.Models.Services">
  <CouponId>sample string 14</CouponId>
  <CreativeDescription>sample string 5</CreativeDescription>
  <CreativeImageUrl>sample string 10</CreativeImageUrl>
  <CreativeMessage>sample string 6</CreativeMessage>
  <CreativeName>sample string 7</CreativeName>
  <CreativeUrl>sample string 12</CreativeUrl>
  <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>
  <InputId>sample string 1</InputId>
  <PageId>sample string 4</PageId>
  <PaymentDescription>sample string 13</PaymentDescription>
  <Price>2</Price>
  <RibbonText>sample string 8</RibbonText>
  <Title>sample string 11</Title>
  <Type>9</Type>
</BasicAdPurchaseModel>

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.