| POST | /share/share-ad-link-used | A share AD link was used | Validates the JWT token with the identity of the sharing user and the shared AD Message and returns relevant information. |
|---|
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 AdDto
{
public long Id { get; set; }
public Guid Guid { get; set; }
public string Title { get; set; }
public DateTimeOffset StartAt { get; set; }
public DateTimeOffset StopAt { get; set; }
public DateTimeOffset PublishAt { get; set; }
public List<ImageUrls> ImageUrls { get; set; } = [];
public PlaceBasicApiDto Place { get; set; }
public AdDetailsUnion DetailsUnion { get; set; }
public long StarredCount { get; set; }
}
public partial class BrandApiDto
{
public string Name { get; set; }
}
public partial class CategoryTreeApiDto
{
public string Name { get; set; }
public string Slug { get; set; }
public string AbsoluteSlug { get; set; }
public string? ImageUrl { get; set; }
public string? AllImageUrl { get; set; }
public string? IconImageUrl { get; set; }
public int Position { get; set; }
public List<CategoryTreeApiDto>? Children { get; set; } = [];
}
public partial class PlaceBasicApiDto
{
public long Id { get; set; }
public Guid Guid { get; set; }
public string? Overview { get; set; }
public string Name { get; set; }
public float Longitude { get; set; }
public float Latitude { get; set; }
public bool Claimed { get; set; }
public string? OrganizationNumber { get; set; }
public string CountryCode { get; set; }
public OpeningHours? OpeningHours { get; set; }
public bool? WheelchairAccessible { get; set; }
public bool? Wifi { get; set; }
public bool? OutdoorSeating { get; set; }
public bool? SaveFoodAndMoney { get; set; }
public PlaceType PlaceType { get; set; }
public PriceMainDishApiDto? PriceMainDish { get; set; }
public TimeZoneDto TimeZoneDto { get; set; }
public long? BusinessId { get; set; }
public PlaceContact Contact { get; set; }
public PlaceAddress Address { get; set; }
public List<CategoryTreeApiDto> Categories { get; set; } = [];
public ImageUrls? LogoUrl { get; set; }
public ImageUrls? ImageUrl { get; set; }
public List<WearPriceProfileEsDto> WearPriceProfiles { get; set; } = [];
public List<PlaceSelectedBrandApiDto> Brands { get; set; } = [];
public string? Floor { get; set; }
}
public partial class PlaceCustomBrandApiDto
{
public string Name { get; set; }
}
public partial class PlaceSelectedBrandApiDto
{
public BrandApiDto? Brand { get; set; }
public string[]? CategoryAbsoluteSlugs { get; set; } = [];
public PlaceCustomBrandApiDto? PlaceCustomBrand { get; set; }
}
public partial class PriceMainDishApiDto
{
public string Title { get; set; }
public PriceMainDish Slug { get; set; }
}
public partial class ShareAdLinkUsedRequest
: IPost
{
public string ShareAdToken { get; set; }
public Locale? Locale { get; set; }
}
public partial class ShareAdLinkUsedResponse
{
public SharingUser? User { get; set; }
public AdDto? Ad { get; set; }
public PlaceBasicApiDto? Place { get; set; }
public SharingState State { get; set; }
}
public enum SharingState
{
Teaser,
Awarded,
SelfShare,
Expired,
}
public partial class SharingUser
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string? ProfilePhotoUrl { get; set; }
}
public partial class WearPriceProfileEsDto
{
public string Slug { get; set; }
public string Label { get; set; }
}
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; }
}
public partial class ImageUrls
{
public string Preview { get; set; }
public string Small { get; set; }
public string Medium { get; set; }
public string Large { get; set; }
}
public enum Locale
{
EnUs,
NbNo,
}
public partial class OpeningHour
{
public int OpenAtHour { get; set; }
public int OpenAtMinute { get; set; }
public int CloseAtHour { get; set; }
public int CloseAtMinute { get; set; }
}
public partial class OpeningHours
{
public WeeklyOpeningHours Weekly { get; set; }
}
public partial class PlaceAddress
{
public string Street { get; set; }
public string PostalCode { get; set; }
public string Region { get; set; }
public string CountryCode { get; set; }
}
public partial class PlaceContact
{
public string? Phone { get; set; }
public string? Email { get; set; }
public string? Website { get; set; }
public string? WebShop { get; set; }
}
public enum PlaceType
{
Mall,
Regular,
}
public partial class TimeZoneDto
{
public TimeSpan BaseUtcOffset { get; set; }
public string DaylightName { get; set; }
public string DisplayName { get; set; }
public string Id { get; set; }
public string StandardName { get; set; }
public bool SupportsDaylightSavingTime { get; set; }
}
public partial class WeeklyOpeningHours
{
public OpeningHour? Monday { get; set; }
public OpeningHour? Tuesday { get; set; }
public OpeningHour? Wednesday { get; set; }
public OpeningHour? Thursday { get; set; }
public OpeningHour? Friday { get; set; }
public OpeningHour? Saturday { get; set; }
public OpeningHour? Sunday { get; set; }
}
public enum PriceMainDish
{
Value,
Medium,
High,
FineDining,
}
}
C# ShareAdLinkUsedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /share/share-ad-link-used HTTP/1.1
Host: qa-business-api.brovs.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"shareAdToken":"String","locale":"EnUs"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"user":{"firstName":"String","lastName":"String","profilePhotoUrl":"String"},"ad":{"id":0,"title":"String","startAt":"0001-01-01T00:00:00.0000000+00:00","stopAt":"0001-01-01T00:00:00.0000000+00:00","publishAt":"0001-01-01T00:00:00.0000000+00:00","imageUrls":[{"preview":"String","small":"String","medium":"String","large":"String"}],"place":{"id":0,"overview":"String","name":"String","longitude":0,"latitude":0,"claimed":false,"organizationNumber":"String","countryCode":"String","openingHours":{"weekly":{"monday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"tuesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"wednesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"thursday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"friday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"saturday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"sunday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0}}},"wheelchairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"placeType":"Mall","priceMainDish":{"title":"String","slug":"Value"},"timeZoneDto":{"baseUtcOffset":"PT0S","daylightName":"String","displayName":"String","id":"String","standardName":"String","supportsDaylightSavingTime":false},"businessId":0,"contact":{"phone":"String","email":"String","website":"String","webShop":"String"},"address":{"street":"String","postalCode":"String","region":"String","countryCode":"String"},"categories":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]}]}],"logoUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"imageUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"wearPriceProfiles":[{"slug":"String","label":"String"}],"brands":[{"brand":{"name":"String"},"categoryAbsoluteSlugs":["String"],"placeCustomBrand":{"name":"String"}}],"floor":"String"},"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"]}},"starredCount":0},"place":{"id":0,"overview":"String","name":"String","longitude":0,"latitude":0,"claimed":false,"organizationNumber":"String","countryCode":"String","openingHours":{"weekly":{"monday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"tuesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"wednesday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"thursday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"friday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"saturday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0},"sunday":{"openAtHour":0,"openAtMinute":0,"closeAtHour":0,"closeAtMinute":0}}},"wheelchairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"placeType":"Mall","priceMainDish":{"title":"String","slug":"Value"},"timeZoneDto":{"baseUtcOffset":"PT0S","daylightName":"String","displayName":"String","id":"String","standardName":"String","supportsDaylightSavingTime":false},"businessId":0,"contact":{"phone":"String","email":"String","website":"String","webShop":"String"},"address":{"street":"String","postalCode":"String","region":"String","countryCode":"String"},"categories":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]}]}],"logoUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"imageUrl":{"preview":"String","small":"String","medium":"String","large":"String"},"wearPriceProfiles":[{"slug":"String","label":"String"}],"brands":[{"brand":{"name":"String"},"categoryAbsoluteSlugs":["String"],"placeCustomBrand":{"name":"String"}}],"floor":"String"},"state":"Teaser"}