BokaMera.API.Host

<back to all web services

CreateBookingLogItem

The following routes are available for this service:
POST/bookinglogAdd a new event to booking logAdd 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 .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.

POST /bookinglog HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateBookingLogItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookingId>0</BookingId>
  <Comments>String</Comments>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Created>0001-01-01T00:00:00</Created>
  <EventTypeId>0</EventTypeId>
</CreateBookingLogItem>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BookingLogQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookingId>0</BookingId>
  <Comments>String</Comments>
  <Created>0001-01-01T00:00:00</Created>
  <EventType>
    <Description>String</Description>
    <Id>0</Id>
    <Name>String</Name>
  </EventType>
  <EventTypeId>0</EventTypeId>
  <Id>0</Id>
  <UserName>String</UserName>
</BookingLogQueryResponse>