Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read |
POST | /company/{companyId}/incentives/{incentiveId} | Logs a user interaction with an incentive. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Db.Incentive
Namespace Global
Namespace BokaMera.API.ServiceModel.Db.Incentive
Public Enum EngagementType
Read = 1
Success = 2
Cancelled = 3
CheckLater = 4
End Enum
End Namespace
Namespace BokaMera.API.ServiceModel.Dtos
<ValidateRequest(Validator:="IsAuthenticated")>
<ApiResponse(Description:="You were unauthorized to call this service.", StatusCode:=401)>
Public Partial Class LogIncentiveEngage
'''<Summary>
'''The id of the company. If not provided, the company associated with the authenticated user will be used.
'''</Summary>
<ApiMember(Description:="The id of the company. If not provided, the company associated with the authenticated user will be used.", IsRequired:=true, ParameterType:="path")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''The id of the incentive.
'''</Summary>
<ApiMember(Description:="The id of the incentive.", IsRequired:=true, ParameterType:="path")>
Public Overridable Property IncentiveId As Integer
'''<Summary>
'''Specifies the type of engagement (e.g., Read, Engaged) performed by the user on the incentive.
'''</Summary>
<ApiMember(Description:="Specifies the type of engagement (e.g., Read, Engaged) performed by the user on the incentive.", IsRequired:=true)>
Public Overridable Property EngagementType As EngagementType
End Class
End Namespace
End Namespace
VB.NET LogIncentiveEngage 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 /company/{companyId}/incentives/{incentiveId} HTTP/1.1
Host: testapi.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<LogIncentiveEngage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<EngagementType>Read</EngagementType>
<IncentiveId>0</IncentiveId>
</LogIncentiveEngage>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />