POST | /share/refer-business-link-used | A business referral link was used | Validates the JWT token with the identity of the referring user and the place, 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 ConsumerApi;
namespace ConsumerApi
{
public partial class ReferBusinessLinkUsedRequest
: IPost
{
public string ReferBusinessToken { get; set; }
}
public partial class ReferBusinessLinkUsedResponse
{
public ReferBusinessUser? ReferringUser { get; set; }
public ReferredPlace? ReferredPlace { get; set; }
public ReferBusinessState State { get; set; }
}
public enum ReferBusinessState
{
SignInToSee,
Available,
CanNotReferYourself,
AlreadyClaimedByYou,
AlreadyClaimedBySomeoneElse,
Expired,
}
public partial class ReferBusinessUser
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string? ProfilePhotoUrl { get; set; }
}
public partial class ReferredPlace
{
public long Id { get; set; }
public Guid Guid { get; set; }
public string Name { get; set; }
public string? LogoUrl { get; set; }
public string? ImageUrl { get; set; }
}
}
C# ReferBusinessLinkUsedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /share/refer-business-link-used HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
referBusinessToken: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { referringUser: { firstName: String, lastName: String, profilePhotoUrl: String }, referredPlace: { id: 0, name: String, logoUrl: String, imageUrl: String }, state: SignInToSee }