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.
import java.math.*
import java.util.*
import net.servicestack.client.*


@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
open class CreateBookingLogItem : ICompany
{
    /**
    * 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.")
    var CompanyId:UUID? = null

    /**
    * The booking id
    */
    @ApiMember(Description="The booking id", IsRequired=true)
    var BookingId:Int? = null

    /**
    * The type of event
    */
    @ApiMember(Description="The type of event", IsRequired=true)
    var EventTypeId:Int? = null

    /**
    * Comments that could be added to the event log item
    */
    @ApiMember(Description="Comments that could be added to the event log item", IsRequired=true)
    var Comments:String? = null

    /**
    * 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)
    var Created:Date? = null
}

open class BookingLogQueryResponse
{
    /**
    * The booking log id
    */
    @ApiMember(Description="The booking log id")
    var Id:Int? = null

    /**
    * The booking id
    */
    @ApiMember(Description="The booking id")
    var BookingId:Int? = null

    /**
    * The type of event
    */
    @ApiMember(Description="The type of event")
    var EventTypeId:Int? = null

    /**
    * The type of event
    */
    @ApiMember(Description="The type of event")
    var EventType:BookingLogEventTypeResponse? = null

    /**
    * Comments that could be added to the event log item
    */
    @ApiMember(Description="Comments that could be added to the event log item")
    var Comments:String? = null

    /**
    * The user created the event
    */
    @ApiMember(Description="The user created the event")
    var UserName:String? = null

    /**
    * Then date when the event occured
    */
    @ApiMember(Description="Then date when the event occured")
    var Created:Date? = null
}

open class BookingLogEventTypeResponse
{
    /**
    * The event type id
    */
    @ApiMember(Description="The event type id")
    var Id:Int? = null

    /**
    * The event type name
    */
    @ApiMember(Description="The event type name")
    var Name:String? = null

    /**
    * The event type description
    */
    @ApiMember(Description="The event type description")
    var Description:String? = null
}

Kotlin CreateBookingLogItem DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /bookinglog HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
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/jsv
Content-Length: length

{
	Id: 0,
	BookingId: 0,
	EventTypeId: 0,
	EventType: 
	{
		Id: 0,
		Name: String,
		Description: String
	},
	Comments: String,
	UserName: String
}