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.

export class BookingLogEventTypeResponse
{
    /** @description The event type id */
    // @ApiMember(Description="The event type id")
    public Id: number;

    /** @description The event type name */
    // @ApiMember(Description="The event type name")
    public Name: string;

    /** @description The event type description */
    // @ApiMember(Description="The event type description")
    public Description: string;

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

export class BookingLogQueryResponse
{
    /** @description The booking log id */
    // @ApiMember(Description="The booking log id")
    public Id: number;

    /** @description The booking id */
    // @ApiMember(Description="The booking id")
    public BookingId: number;

    /** @description The type of event */
    // @ApiMember(Description="The type of event")
    public EventTypeId: number;

    /** @description The type of event */
    // @ApiMember(Description="The type of event")
    public EventType: BookingLogEventTypeResponse;

    /** @description Comments that could be added to the event log item */
    // @ApiMember(Description="Comments that could be added to the event log item")
    public Comments: string;

    /** @description The user created the event */
    // @ApiMember(Description="The user created the event")
    public UserName: string;

    /** @description Then date when the event occured */
    // @ApiMember(Description="Then date when the event occured")
    public Created: string;

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
export class CreateBookingLogItem 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.")
    public CompanyId?: string;

    /** @description The booking id */
    // @ApiMember(Description="The booking id", IsRequired=true)
    public BookingId: number;

    /** @description The type of event */
    // @ApiMember(Description="The type of event", IsRequired=true)
    public EventTypeId: number;

    /** @description Comments that could be added to the event log item */
    // @ApiMember(Description="Comments that could be added to the event log item", IsRequired=true)
    public Comments: string;

    /** @description Then date when the event occured, leave blank if current datetime */
    // @ApiMember(Description="Then date when the event occured, leave blank if current datetime", IsRequired=true)
    public Created: string;

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

TypeScript 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>