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 exists on the resource and it can't be deleted. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The resource id |
Name | form | string | No | The resource name |
Description | form | string | No | The resource description |
Active | form | bool | No | If resource is active or not |
Color | form | string | No | The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue. |
form | string | No | The email of the resource | |
ImageUrl | form | Uri | No | The image url of the resource |
MobilePhone | form | string | No | The mobile phone number of the resource |
AccessGroup | form | string | No | 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> | No | The resource time exceptions |
Bookings | form | List<BookedTime> | No | The resource bookings |
Created | form | DateTime | No | Then date when the resource was created |
Updated | form | DateTime | No | Then date when the resource was updated |
ResponseStatus | form | ResponseStatus | No |
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 | No | The reason of the time exception, example: Vacation, doctors appointment, ... |
ReasonTextPublic | form | string | No | 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[] | No | 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 | No | 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 | No | |
Lastname | form | string | No | |
form | string | No | ||
Phone | form | string | No | |
FacebookUserName | form | string | No | |
ImageUrl | form | string | No | |
CorporateIdentityNumber | form | string | No | |
InvoiceAddress1 | form | string | No | |
InvoiceAddress2 | form | string | No | |
InvoiceCity | form | string | No | |
InvoicePostalCode | form | string | No | |
InvoiceCountryCode | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ResourceQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <AccessGroup>String</AccessGroup> <Active>false</Active> <Bookings> <BookedTime> <BookedSpots>0</BookedSpots> <Customer> <CorporateIdentityNumber>String</CorporateIdentityNumber> <Email>String</Email> <FacebookUserName>String</FacebookUserName> <Firstname>String</Firstname> <Id>00000000-0000-0000-0000-000000000000</Id> <ImageUrl>String</ImageUrl> <InvoiceAddress1>String</InvoiceAddress1> <InvoiceAddress2>String</InvoiceAddress2> <InvoiceCity>String</InvoiceCity> <InvoiceCountryCode>String</InvoiceCountryCode> <InvoicePostalCode>String</InvoicePostalCode> <Lastname>String</Lastname> <Phone>String</Phone> </Customer> <From>0001-01-01T00:00:00</From> <Id>0</Id> <PauseAfterInMinutes>0</PauseAfterInMinutes> <ServiceId>0</ServiceId> <Status>Booked</Status> <StatusId>0</StatusId> <To>0001-01-01T00:00:00</To> <TotalSpots>0</TotalSpots> </BookedTime> </Bookings> <Color>String</Color> <Created>0001-01-01T00:00:00</Created> <Description>String</Description> <Email>String</Email> <EmailNotification>false</EmailNotification> <Exceptions> <TimeException> <From>0001-01-01T00:00:00</From> <Id>0</Id> <IsBlock>false</IsBlock> <IsRecurring>false</IsRecurring> <ReasonText>String</ReasonText> <ReasonTextPublic>String</ReasonTextPublic> <ResourceIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:int>0</d4p1:int> </ResourceIds> <To>0001-01-01T00:00:00</To> </TimeException> </Exceptions> <Id>0</Id> <ImageUrl i:nil="true" /> <MobilePhone>String</MobilePhone> <Name>String</Name> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <SMSNotification>false</SMSNotification> <SendEmailReminder>false</SendEmailReminder> <SendSMSReminder>false</SendSMSReminder> <Updated>0001-01-01T00:00:00</Updated> </ResourceQueryResponse>