POST | /bookinglog | Add a new event to booking log | Add a new event to the booking of the company of the currently logged in user, only administrators are allowed to add items to event log. |
---|
"use strict";
export class BookingLogEventTypeResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The event type id */
Id;
/**
* @type {string}
* @description The event type name */
Name;
/**
* @type {string}
* @description The event type description */
Description;
}
export class BookingLogQueryResponse {
/** @param {{Id?:number,BookingId?:number,EventTypeId?:number,EventType?:BookingLogEventTypeResponse,Comments?:string,UserName?:string,Created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The booking log id */
Id;
/**
* @type {number}
* @description The booking id */
BookingId;
/**
* @type {number}
* @description The type of event */
EventTypeId;
/**
* @type {BookingLogEventTypeResponse}
* @description The type of event */
EventType;
/**
* @type {string}
* @description Comments that could be added to the event log item */
Comments;
/**
* @type {string}
* @description The user created the event */
UserName;
/**
* @type {string}
* @description Then date when the event occured */
Created;
}
export class CreateBookingLogItem {
/** @param {{CompanyId?:string,BookingId?:number,EventTypeId?:number,Comments?:string,Created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
/**
* @type {number}
* @description The booking id */
BookingId;
/**
* @type {number}
* @description The type of event */
EventTypeId;
/**
* @type {string}
* @description Comments that could be added to the event log item */
Comments;
/**
* @type {string}
* @description Then date when the event occured, leave blank if current datetime */
Created;
}
JavaScript CreateBookingLogItem DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /bookinglog HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","BookingId":0,"EventTypeId":0,"Comments":"String","Created":"0001-01-01T00:00:00"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Id":0,"BookingId":0,"EventTypeId":0,"EventType":{"Id":0,"Name":"String","Description":"String"},"Comments":"String","UserName":"String"}