BusinessApi

<back to all web services

CreateAdRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
POST/ad/create
CreateAdRequest Parameters:
NameParameterData TypeRequiredDescription
PlaceIdbodylongNo
DetailsUnionbodyAdDetailsUnionYes
AdDetailsUnion Parameters:
NameParameterData TypeRequiredDescription
PercentageOnAllMerchandiseformAdDetailsPercentageDiscountOnAllMerchandiseNo
PercentageRangeOnAllMerchandiseformAdDetailsPercentageDiscountRangeOnAllMerchandiseNo
PercentageOnSelectedMerchandiseformAdDetailsPercentageDiscountOnSelectedMerchandiseNo
AbsoluteOnSelectedMerchandiseformAdDetailsAbsoluteDiscountOnSelectedMerchandiseNo
AbsoluteRangeOnAllMerchandiseformAdDetailsAbsoluteDiscountRangeOnAllMerchandiseNo
TotalAmountOverXgivesYdiscountformAdDetailsTotalAmountOverXgivesYdiscountNo
XforYformAdDetailsXforYdiscountNo
NewArrivalsformAdDetailsNewArrivalsNo
FreetextformAdDetailsFreetextNo
TodaysBreakFastOfferformAdDetailsTodaysBreakFastOfferNo
TodaysLunchOfferformAdDetailsTodaysLunchOfferNo
TodaysDinnerOfferformAdDetailsTodaysDinnerOfferNo
SaveFoodAndMoneyformAdDetailsSaveFoodAndMoneyNo
PercentageOfYourFoodBillformAdDetailsPercentageOffYourFoodBillNo
HappyHourformAdDetailsHappyHourNo
SomeFreeTablesLeftTodayformAdDetailsSomeFreeTablesLeftTodayNo
TwoDishesForThePriceOfOneformAdDetailsTwoDishesForThePriceOfOneNo
AdDetailsPercentageDiscountOnAllMerchandise Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsBase Parameters:
NameParameterData TypeRequiredDescription
DescriptionformstringNo
MoreInformationformList<string>No
AdDetailsPercentageDiscountRangeOnAllMerchandise Parameters:
NameParameterData TypeRequiredDescription
StartformdoubleNo
StopformdoubleNo
AdDetailsPercentageDiscountOnSelectedMerchandise Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsAbsoluteDiscountOnSelectedMerchandise Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsAbsoluteDiscountRangeOnAllMerchandise Parameters:
NameParameterData TypeRequiredDescription
StartformdoubleNo
StopformdoubleNo
AdDetailsTotalAmountOverXgivesYdiscount Parameters:
NameParameterData TypeRequiredDescription
IfTotalAmountMoreThanXformdoubleNo
ThenYouGetDiscountPercentageYformdoubleNo
AdDetailsXforYdiscount Parameters:
NameParameterData TypeRequiredDescription
IfYouBuyXformintNo
ThenYouGetYformintNo
AdDetailsFreetext Parameters:
NameParameterData TypeRequiredDescription
TitleformstringYes
AdDetailsTodaysBreakFastOffer Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsTodaysLunchOffer Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsTodaysDinnerOffer Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsSaveFoodAndMoney Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
AdDetailsPercentageOffYourFoodBill Parameters:
NameParameterData TypeRequiredDescription
PercentageformdoubleNo
CreateAdResponse Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
GuidformGuidNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ad/create HTTP/1.1 
Host: qa-business-api.brovs.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	placeId: 0,
	detailsUnion: 
	{
		percentageOnAllMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageRangeOnAllMerchandise: 
		{
			start: 0,
			stop: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageOnSelectedMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		absoluteOnSelectedMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		absoluteRangeOnAllMerchandise: 
		{
			start: 0,
			stop: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		totalAmountOverXgivesYdiscount: 
		{
			ifTotalAmountMoreThanX: 0,
			thenYouGetDiscountPercentageY: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		xforY: 
		{
			ifYouBuyX: 0,
			thenYouGetY: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		newArrivals: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		freetext: 
		{
			title: String,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysBreakFastOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysLunchOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysDinnerOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		saveFoodAndMoney: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageOfYourFoodBill: 
		{
			percentage: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		happyHour: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		someFreeTablesLeftToday: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		twoDishesForThePriceOfOne: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0
}