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 | Then date when the event occured, leave blank if 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 | No | The type of event |
Comments | form | string | No | Comments that could be added to the event log item |
UserName | form | string | No | The user created the event |
Created | form | DateTime | No | Then date when the event occured |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The event type id |
Name | form | string | No | The event type name |
Description | form | string | No | The event type description |
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
Content-Type: text/jsonl
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/jsonl Content-Length: length {"Id":0,"BookingId":0,"EventTypeId":0,"EventType":{"Id":0,"Name":"String","Description":"String"},"Comments":"String","UserName":"String"}