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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<ReferBusinessLinkUsedRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">
<ReferBusinessToken>String</ReferBusinessToken>
</ReferBusinessLinkUsedRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ReferBusinessLinkUsedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto"> <ReferredPlace> <Guid>00000000-0000-0000-0000-000000000000</Guid> <Id>0</Id> <ImageUrl>String</ImageUrl> <LogoUrl>String</LogoUrl> <Name>String</Name> </ReferredPlace> <ReferringUser> <FirstName>String</FirstName> <LastName>String</LastName> <ProfilePhotoUrl>String</ProfilePhotoUrl> </ReferringUser> <State>SignInToSee</State> </ReferBusinessLinkUsedResponse>