| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| DELETE | /resource/{Id} | Delete a resource | Delete a resource for the currently logged in user, only administrators are allowed to delete resources. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | query | Guid? | Yes | Enter the company id, if blank company id and you are an admin, your company id will be used. |
| Id | path | int | Yes | Id of the resource to delete |
| Force | query | bool | No | If this equals true it will force to set the resource as active = false, this is used when bookings exist on the resource and it cannot be deleted. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | The resource id |
| Name | form | string | Yes | The resource name |
| Description | form | string | Yes | The resource description |
| Active | form | bool | No | If resource is active or not |
| Color | form | string | Yes | The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue. |
| form | string | Yes | The Email of the resource | |
| ImageUrl | form | Uri | Yes | The Image URL of the resource |
| MobilePhone | form | string | Yes | The Mobile phone number of the resource |
| AccessGroup | form | string | Yes | Used by example code locks to know what access group the resource is assigned to |
| EmailNotification | form | bool | No | If the resource should receive Email notification when booked |
| SMSNotification | form | bool | No | If the resource should receive SMS notification when booked |
| SendEmailReminder | form | bool? | No | If the resource should receive Email reminders on bookings |
| SendSMSReminder | form | bool? | No | If the resource should receive SMS reminders on bookings |
| Exceptions | form | List<TimeException> | Yes | The resource time exceptions |
| Bookings | form | List<BookedTime> | Yes | The resource bookings |
| Created | form | DateTime | No | The date when the resource was created |
| Updated | form | DateTime | No | The date when the resource was updated |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | Time exception id |
| IsRecurring | form | bool | No | Indicates whether or not the time exception is recurring |
| IsBlock | form | bool | No | Indicates whether the time exception is blocking the time or not |
| ReasonText | form | string | Yes | The reason of the time exception, example: Vacation, doctors appointment, ... |
| ReasonTextPublic | form | string | Yes | The public reason of the time exception, example: Vacation, doctors appointment, ... |
| From | form | DateTime | No | Time exception start |
| To | form | DateTime | No | Time exception end |
| ResourceIds | form | int[] | Yes | Resources that owns this exception |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | Booking id |
| ServiceId | form | int | No | The booked service |
| From | form | DateTime | No | Booking start |
| To | form | DateTime | No | Booking end |
| BookedSpots | form | int | No | Number of booked spots |
| TotalSpots | form | int | No | Number of total spots for the service |
| PauseAfterInMinutes | form | int | No | The pause after the booking |
| StatusId | form | int | No | The booking status |
| Status | form | BookingStatusEnum | No | |
| Customer | form | BookedCustomer | Yes | The customer the booking belongs to |
| Name | Value | |
|---|---|---|
| Booked | 1 | |
| Unbooked | 2 | |
| Reserved | 3 | |
| Canceled | 4 | |
| AwaitingPayment | 5 | |
| AwaitingPaymentNoTimeLimit | 6 | |
| Payed | 7 | |
| AwaitingPaymentRequestFromAdmin | 8 | |
| AwaitingPaymentFromProvider | 9 | |
| Invoiced | 10 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Firstname | form | string | Yes | |
| Lastname | form | string | Yes | |
| form | string | Yes | ||
| Phone | form | string | Yes | |
| FacebookUserName | form | string | Yes | |
| ImageUrl | form | string | Yes | |
| CorporateIdentityNumber | form | string | Yes | |
| InvoiceAddress1 | form | string | Yes | |
| InvoiceAddress2 | form | string | Yes | |
| InvoiceCity | form | string | Yes | |
| InvoicePostalCode | form | string | Yes | |
| InvoiceCountryCode | form | string | Yes |
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.
DELETE /resource/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Id":0,"Name":"String","Description":"String","Active":false,"Color":"String","Email":"String","MobilePhone":"String","AccessGroup":"String","EmailNotification":false,"SMSNotification":false,"SendEmailReminder":false,"SendSMSReminder":false,"Exceptions":[{"Id":0,"IsRecurring":false,"IsBlock":false,"ReasonText":"String","ReasonTextPublic":"String","ResourceIds":[0]}],"Bookings":[{"Id":0,"ServiceId":0,"BookedSpots":0,"TotalSpots":0,"PauseAfterInMinutes":0,"StatusId":0,"Status":"Booked","Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","FacebookUserName":"String","ImageUrl":"String","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}