Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
DELETE | /customfields/{Id} | Delete a custom field | Delete a custom field for the currently logged in user, only administrators are allowed to delete custom fields. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | query | 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 custom field to delete |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | Custom field id |
CompanyId | form | Guid | No | Reference to company that owns the custom field configuration |
GroupId | form | int? | No | Group id |
FieldId | form | int | No | Field id |
Name | form | string | No | Configuration name. Example: 'Number of persons'. |
Width | form | int | No | Field width. Example: 20 |
Column | form | string | No | Column in database where to store the information. Example: 'TextField1' |
Description | form | string | No | Custom field description. Example: 'For how many persons is this booking?' |
DataType | form | string | No | Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' |
DefaultValue | form | string | No | Default value of the field. Example: '3' |
IsMandatory | form | bool | No | Determines if the field is required to have a value or not |
MandatoryErrorMessage | form | string | No | Error message shown to the user if the field data is required but not entered |
MaxLength | form | int | No | Max lenght of the field |
MultipleLineText | form | bool | No | If the field should have multiple lines |
RegEx | form | string | No | Regular expression used for validation of the field |
RegExId | form | int? | No | Regular expression id for validation of the field |
RegExErrorMessage | form | string | No | Error message shown if the regular expression validation failed |
IsPublic | form | bool | No | If the field is visible to the customer |
IsHidden | form | bool | No | If the field should be hidden in lists |
Table | form | string | No | Table to which the field belongs |
Values | form | List<CustomFieldLookupResponse> | No | The values to select from if Datatype is DropDown for this custom field |
Services | form | List<CustomFieldServices> | No | The services that is connected to the custom field |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int? | No | |
Active | form | bool? | No | |
SortOrder | form | int? | No | |
Value | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | Name of the service |
ImageUrl | form | Uri | No | The image url of the service |
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.
DELETE /customfields/{Id} HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Id: 0, GroupId: 0, FieldId: 0, Name: String, Width: 0, Column: String, Description: String, DataType: String, DefaultValue: String, IsMandatory: False, MandatoryErrorMessage: String, MaxLength: 0, MultipleLineText: False, RegEx: String, RegExId: 0, RegExErrorMessage: String, IsPublic: False, IsHidden: False, Table: String, Values: [ { Id: 0, Active: False, SortOrder: 0, Value: String } ], Services: [ { Id: 0, Name: String } ] }