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. |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
@ValidateRequest(Validator="IsAuthenticated")
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
open class CompanyIncentiveQuery : ICompany
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
@ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", IsRequired=true, ParameterType="path")
var CompanyId:UUID? = null
}
open class CompanyIncentivesQueryResponse
{
var Incentives:IList<CompanyIncentiveResponse>? = null
var CompanyId:UUID? = null
}
open class CompanyIncentiveResponse
{
var Id:Int? = null
var Heading:String? = null
var StorageUrl:String? = null
var SuccessButtonText:String? = null
var ActionId:Int? = null
var InitialDelayInSeconds:Int? = null
var MaxDisplayCount:Int? = null
var ValidFrom:Date? = null
var ValidTo:Date? = null
var Action:IncentiveAction? = null
var Payload:String? = null
}
open class IncentiveAction : BaseModel()
{
var Id:Int? = null
var ActionType:IncentiveActionType? = null
var Page:String? = null
var Segment:String? = null
var Element:String? = null
}
open class BaseModel
{
}
enum class IncentiveActionType(val value:Int)
{
Upgrade(1),
AddOn(2),
Information(3),
}
Kotlin CompanyIncentiveQuery 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.
GET /companies/{CompanyId}/incentives HTTP/1.1 Host: testapi.bokamera.se Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CompanyIncentivesQueryResponse 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> <Incentives i:nil="true" /> </CompanyIncentivesQueryResponse>