Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /resourcetypes/{Id} | Update existing resourcetype | Updates an existing resourcetype if you are authorized to do so. |
---|
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. |
Id | path | int | Yes | Id of the resourcetype |
Resources | body | List<UpdateResourceTypeResource> | No | The resources to be added |
Name | body | string | No | The resourcetype name |
Description | body | string | No | The resourcetype description |
Active | body | bool | No | If resourcetype is active or not |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The resource id |
Priority | form | int | No | The priority of the resource |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The resourcetype id |
Name | form | string | No | The resourcetype name |
Description | form | string | No | The resourcetype description |
Resources | form | List<ResourceTypeResource> | No | The resources in the resourcetype. Only shows active resources if not admin. |
Active | form | bool | No | If resourcetype is active or not |
Created | form | DateTime | No | Then date when the resource was created |
Updated | form | DateTime | No | Then date when the resource was updated |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The resource id |
Name | form | string | No | The resource name |
Active | form | bool | No | The resource status |
Description | form | string | No | The resource description |
form | string | No | The resource email | |
Phone | form | string | No | The resource phone |
Color | form | string | No | The resource color |
ImageUrl | form | Uri | No | The resource image |
Priority | form | int | No | The priority of the resource |
EmailNotification | form | bool | No | If the resource want to receive email notifications |
SMSNotification | form | bool | No | If the resource want to receive sms notifications |
EmailReminder | form | bool | No | If the resource want to receive email reminders |
SMSReminder | form | bool | No | If the resource want to receive sms reminders |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /resourcetypes/{Id} HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Id":0,"Resources":[{"Id":0,"Priority":0}],"Name":"String","Description":"String","Active":false}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Id":0,"Name":"String","Description":"String","Resources":[{"Id":0,"Name":"String","Active":false,"Description":"String","Email":"String","Phone":"String","Color":"String","Priority":0,"EmailNotification":false,"SMSNotification":false,"EmailReminder":false,"SMSReminder":false}],"Active":false}