BusinessApi

<back to all web services

UpdateRunningAdRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
PUT/ad/update_running
"use strict";
export class AdDetailsBase {
    /** @param {{description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    description;
    /** @type {?string[]} */
    moreInformation = [];
}
export class AdDetailsPercentageDiscountOnAllMerchandise extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsPercentageDiscountRangeOnAllMerchandise extends AdDetailsBase {
    /** @param {{start?:number,stop?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    start;
    /** @type {?number} */
    stop;
}
export class AdDetailsPercentageDiscountOnSelectedMerchandise extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsAbsoluteDiscountOnSelectedMerchandise extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsAbsoluteDiscountRangeOnAllMerchandise extends AdDetailsBase {
    /** @param {{start?:number,stop?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    start;
    /** @type {?number} */
    stop;
}
export class AdDetailsTotalAmountOverXgivesYdiscount extends AdDetailsBase {
    /** @param {{ifTotalAmountMoreThanX?:number,thenYouGetDiscountPercentageY?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    ifTotalAmountMoreThanX;
    /** @type {?number} */
    thenYouGetDiscountPercentageY;
}
export class AdDetailsXforYdiscount extends AdDetailsBase {
    /** @param {{ifYouBuyX?:number,thenYouGetY?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    ifYouBuyX;
    /** @type {?number} */
    thenYouGetY;
}
export class AdDetailsNewArrivals extends AdDetailsBase {
    /** @param {{description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class AdDetailsFreetext extends AdDetailsBase {
    /** @param {{title?:string,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    title;
}
export class AdDetailsTodaysBreakFastOffer extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsTodaysLunchOffer extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsTodaysDinnerOffer extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsSaveFoodAndMoney extends AdDetailsBase {
    /** @param {{value?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    value;
}
export class AdDetailsPercentageOffYourFoodBill extends AdDetailsBase {
    /** @param {{percentage?:number,description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {?number} */
    percentage;
}
export class AdDetailsHappyHour extends AdDetailsBase {
    /** @param {{description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class AdDetailsSomeFreeTablesLeftToday extends AdDetailsBase {
    /** @param {{description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class AdDetailsTwoDishesForThePriceOfOne extends AdDetailsBase {
    /** @param {{description?:string,moreInformation?:string[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class AdDetailsUnion {
    /** @param {{percentageOnAllMerchandise?:AdDetailsPercentageDiscountOnAllMerchandise,percentageRangeOnAllMerchandise?:AdDetailsPercentageDiscountRangeOnAllMerchandise,percentageOnSelectedMerchandise?:AdDetailsPercentageDiscountOnSelectedMerchandise,absoluteOnSelectedMerchandise?:AdDetailsAbsoluteDiscountOnSelectedMerchandise,absoluteRangeOnAllMerchandise?:AdDetailsAbsoluteDiscountRangeOnAllMerchandise,totalAmountOverXgivesYdiscount?:AdDetailsTotalAmountOverXgivesYdiscount,xforY?:AdDetailsXforYdiscount,newArrivals?:AdDetailsNewArrivals,freetext?:AdDetailsFreetext,todaysBreakFastOffer?:AdDetailsTodaysBreakFastOffer,todaysLunchOffer?:AdDetailsTodaysLunchOffer,todaysDinnerOffer?:AdDetailsTodaysDinnerOffer,saveFoodAndMoney?:AdDetailsSaveFoodAndMoney,percentageOfYourFoodBill?:AdDetailsPercentageOffYourFoodBill,happyHour?:AdDetailsHappyHour,someFreeTablesLeftToday?:AdDetailsSomeFreeTablesLeftToday,twoDishesForThePriceOfOne?:AdDetailsTwoDishesForThePriceOfOne}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?AdDetailsPercentageDiscountOnAllMerchandise} */
    percentageOnAllMerchandise;
    /** @type {?AdDetailsPercentageDiscountRangeOnAllMerchandise} */
    percentageRangeOnAllMerchandise;
    /** @type {?AdDetailsPercentageDiscountOnSelectedMerchandise} */
    percentageOnSelectedMerchandise;
    /** @type {?AdDetailsAbsoluteDiscountOnSelectedMerchandise} */
    absoluteOnSelectedMerchandise;
    /** @type {?AdDetailsAbsoluteDiscountRangeOnAllMerchandise} */
    absoluteRangeOnAllMerchandise;
    /** @type {?AdDetailsTotalAmountOverXgivesYdiscount} */
    totalAmountOverXgivesYdiscount;
    /** @type {?AdDetailsXforYdiscount} */
    xforY;
    /** @type {?AdDetailsNewArrivals} */
    newArrivals;
    /** @type {?AdDetailsFreetext} */
    freetext;
    /** @type {?AdDetailsTodaysBreakFastOffer} */
    todaysBreakFastOffer;
    /** @type {?AdDetailsTodaysLunchOffer} */
    todaysLunchOffer;
    /** @type {?AdDetailsTodaysDinnerOffer} */
    todaysDinnerOffer;
    /** @type {?AdDetailsSaveFoodAndMoney} */
    saveFoodAndMoney;
    /** @type {?AdDetailsPercentageOffYourFoodBill} */
    percentageOfYourFoodBill;
    /** @type {?AdDetailsHappyHour} */
    happyHour;
    /** @type {?AdDetailsSomeFreeTablesLeftToday} */
    someFreeTablesLeftToday;
    /** @type {?AdDetailsTwoDishesForThePriceOfOne} */
    twoDishesForThePriceOfOne;
}

JavaScript UpdateRunningAdRequest DTOs

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.

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

{
	adId: 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

{
	adId: 0
}