BokaMera.API.Host

<back to all web services

CompanyIncentiveQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin
The following routes are available for this service:
GET/companies/{CompanyId}/incentivesIt gets either incentives which are not read or engaged by the current company/administrator.

export class BaseModel
{

    public constructor(init?: Partial<BaseModel>) { (Object as any).assign(this, init); }
}

export enum IncentiveActionType
{
    Upgrade = 1,
    AddOn = 2,
    Information = 3,
}

export class IncentiveAction extends BaseModel
{
    public Id: number;
    public ActionType: IncentiveActionType;
    public Page: string;
    public Segment: string;
    public Element: string;

    public constructor(init?: Partial<IncentiveAction>) { super(init); (Object as any).assign(this, init); }
}

export class CompanyIncentiveResponse
{
    public Id: number;
    public Heading: string;
    public StorageUrl: string;
    public SuccessButtonText: string;
    public ActionId: number;
    public InitialDelayInSeconds: number;
    public MaxDisplayCount?: number;
    public ValidFrom: string;
    public ValidTo: string;
    public Action: IncentiveAction;
    public Payload: string;

    public constructor(init?: Partial<CompanyIncentiveResponse>) { (Object as any).assign(this, init); }
}

export class CompanyIncentivesQueryResponse
{
    public Incentives: IList<CompanyIncentiveResponse>;
    public CompanyId: string;

    public constructor(init?: Partial<CompanyIncentivesQueryResponse>) { (Object as any).assign(this, init); }
}

// @ValidateRequest(Validator="IsAuthenticated")
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
export class CompanyIncentiveQuery implements ICompany
{
    /** @description 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")
    public CompanyId: string;

    public constructor(init?: Partial<CompanyIncentiveQuery>) { (Object as any).assign(this, init); }
}

TypeScript CompanyIncentiveQuery DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>