| 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. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
| BookingId | body | int | Yes | The booking id |
| EventTypeId | body | int | Yes | The type of event |
| Comments | body | string | Yes | Comments that could be added to the event log item |
| Created | body | DateTime? | Yes | The date when the event occurred. Leave blank for the current datetime |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The booking log id |
| BookingId | form | int | No | The booking id |
| EventTypeId | form | int | No | The type of event |
| EventType | form | BookingLogEventTypeResponse | Yes | The type of event |
| Comments | form | string | Yes | Comments that could be added to the event log item |
| UserName | form | string | Yes | The user created the event |
| Created | form | DateTime | No | The date when the event occurred |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The event type id |
| Name | form | string | Yes | The event type name |
| Description | form | string | Yes | The event type description |
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 /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
}