Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read |
POST | /company/{companyId}/incentives/{incentiveId} | Logs a user interaction with an incentive. |
---|
"use strict";
/** @typedef {number} */
export var EngagementType;
(function (EngagementType) {
EngagementType[EngagementType["Read"] = 1] = "Read"
EngagementType[EngagementType["Success"] = 2] = "Success"
EngagementType[EngagementType["Cancelled"] = 3] = "Cancelled"
EngagementType[EngagementType["CheckLater"] = 4] = "CheckLater"
})(EngagementType || (EngagementType = {}));
export class LogIncentiveEngage {
/** @param {{CompanyId?:string,IncentiveId?:number,EngagementType?:EngagementType}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The id of the company. If not provided, the company associated with the authenticated user will be used. */
CompanyId;
/**
* @type {number}
* @description The id of the incentive. */
IncentiveId;
/**
* @type {EngagementType}
* @description Specifies the type of engagement (e.g., Read, Engaged) performed by the user on the incentive. */
EngagementType;
}
JavaScript LogIncentiveEngage DTOs
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.
POST /company/{companyId}/incentives/{incentiveId} HTTP/1.1
Host: testapi.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
IncentiveId: 0,
EngagementType: Read
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { }