Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin |
GET | /companies/{CompanyId}/incentives | It gets either incentives which are not read or engaged by the current company/administrator. |
---|
namespace BokaMera.API.ServiceModel.Db
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type BaseModel() =
class end
type IncentiveActionType =
| Upgrade = 1
| AddOn = 2
| Information = 3
[<AllowNullLiteral>]
type IncentiveAction() =
inherit BaseModel()
member val Id:Int32 = new Int32() with get,set
member val ActionType:IncentiveActionType = new IncentiveActionType() with get,set
member val Page:String = null with get,set
member val Segment:String = null with get,set
member val Element:String = null with get,set
[<AllowNullLiteral>]
type CompanyIncentiveResponse() =
member val Id:Int32 = new Int32() with get,set
member val Heading:String = null with get,set
member val StorageUrl:String = null with get,set
member val SuccessButtonText:String = null with get,set
member val ActionId:Int32 = new Int32() with get,set
member val InitialDelayInSeconds:Int32 = new Int32() with get,set
member val MaxDisplayCount:Nullable<Int32> = new Nullable<Int32>() with get,set
member val ValidFrom:DateTimeOffset = new DateTimeOffset() with get,set
member val ValidTo:DateTimeOffset = new DateTimeOffset() with get,set
member val Action:IncentiveAction = null with get,set
member val Payload:String = null with get,set
[<AllowNullLiteral>]
type CompanyIncentivesQueryResponse() =
member val Incentives:IList<CompanyIncentiveResponse> = null with get,set
member val CompanyId:Guid = new Guid() with get,set
[<ValidateRequest(Validator="IsAuthenticated")>]
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<AllowNullLiteral>]
type CompanyIncentiveQuery() =
///<summary>
///The company id, if empty will use the company id for the user you are logged in with.
///</summary>
[<ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="path")>]
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
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.
GET /companies/{CompanyId}/incentives HTTP/1.1 Host: testapi.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { }