BusinessApi

<back to all web services

UpdateAdRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
PUT/ad/update
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BusinessApi;

namespace BusinessApi
{
    public partial class AdDetailsAbsoluteDiscountOnSelectedMerchandise
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsAbsoluteDiscountRangeOnAllMerchandise
        : AdDetailsBase
    {
        public double Start { get; set; }
        public double Stop { get; set; }
    }

    public partial class AdDetailsBase
    {
        public string? Description { get; set; }
        public List<string>? MoreInformation { get; set; } = [];
    }

    public partial class AdDetailsFreetext
        : AdDetailsBase
    {
        public string Title { get; set; }
    }

    public partial class AdDetailsHappyHour
        : AdDetailsBase
    {
    }

    public partial class AdDetailsNewArrivals
        : AdDetailsBase
    {
    }

    public partial class AdDetailsPercentageDiscountOnAllMerchandise
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsPercentageDiscountOnSelectedMerchandise
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsPercentageDiscountRangeOnAllMerchandise
        : AdDetailsBase
    {
        public double Start { get; set; }
        public double Stop { get; set; }
    }

    public partial class AdDetailsPercentageOffYourFoodBill
        : AdDetailsBase
    {
        public double Percentage { get; set; }
    }

    public partial class AdDetailsSaveFoodAndMoney
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsSomeFreeTablesLeftToday
        : AdDetailsBase
    {
    }

    public partial class AdDetailsTodaysBreakFastOffer
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsTodaysDinnerOffer
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsTodaysLunchOffer
        : AdDetailsBase
    {
        public double Value { get; set; }
    }

    public partial class AdDetailsTotalAmountOverXgivesYdiscount
        : AdDetailsBase
    {
        public double IfTotalAmountMoreThanX { get; set; }
        public double ThenYouGetDiscountPercentageY { get; set; }
    }

    public partial class AdDetailsTwoDishesForThePriceOfOne
        : AdDetailsBase
    {
    }

    public partial class AdDetailsUnion
    {
        public AdDetailsPercentageDiscountOnAllMerchandise? PercentageOnAllMerchandise { get; set; }
        public AdDetailsPercentageDiscountRangeOnAllMerchandise? PercentageRangeOnAllMerchandise { get; set; }
        public AdDetailsPercentageDiscountOnSelectedMerchandise? PercentageOnSelectedMerchandise { get; set; }
        public AdDetailsAbsoluteDiscountOnSelectedMerchandise? AbsoluteOnSelectedMerchandise { get; set; }
        public AdDetailsAbsoluteDiscountRangeOnAllMerchandise? AbsoluteRangeOnAllMerchandise { get; set; }
        public AdDetailsTotalAmountOverXgivesYdiscount? TotalAmountOverXgivesYdiscount { get; set; }
        public AdDetailsXforYdiscount? XforY { get; set; }
        public AdDetailsNewArrivals? NewArrivals { get; set; }
        public AdDetailsFreetext? Freetext { get; set; }
        public AdDetailsTodaysBreakFastOffer? TodaysBreakFastOffer { get; set; }
        public AdDetailsTodaysLunchOffer? TodaysLunchOffer { get; set; }
        public AdDetailsTodaysDinnerOffer? TodaysDinnerOffer { get; set; }
        public AdDetailsSaveFoodAndMoney? SaveFoodAndMoney { get; set; }
        public AdDetailsPercentageOffYourFoodBill? PercentageOfYourFoodBill { get; set; }
        public AdDetailsHappyHour? HappyHour { get; set; }
        public AdDetailsSomeFreeTablesLeftToday? SomeFreeTablesLeftToday { get; set; }
        public AdDetailsTwoDishesForThePriceOfOne? TwoDishesForThePriceOfOne { get; set; }
    }

    public partial class AdDetailsXforYdiscount
        : AdDetailsBase
    {
        public int IfYouBuyX { get; set; }
        public int ThenYouGetY { get; set; }
    }

}

C# UpdateAdRequest 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 HTTP/1.1 
Host: qa-business-api.brovs.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	adId: 0,
	startAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 0
	},
	stopAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 0
	},
	publishAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 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
}