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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CustomFieldQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <Column>String</Column> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <DataType>String</DataType> <DefaultValue>String</DefaultValue> <Description>String</Description> <FieldId>0</FieldId> <GroupId>0</GroupId> <Id>0</Id> <IsHidden>false</IsHidden> <IsMandatory>false</IsMandatory> <IsPublic>false</IsPublic> <MandatoryErrorMessage>String</MandatoryErrorMessage> <MaxLength>0</MaxLength> <MultipleLineText>false</MultipleLineText> <Name>String</Name> <RegEx>String</RegEx> <RegExErrorMessage>String</RegExErrorMessage> <RegExId>0</RegExId> <Services> <CustomFieldServices> <Id>0</Id> <ImageUrl i:nil="true" /> <Name>String</Name> </CustomFieldServices> </Services> <Table>String</Table> <Values> <CustomFieldLookupResponse> <Active>false</Active> <Id>0</Id> <SortOrder>0</SortOrder> <Value>String</Value> </CustomFieldLookupResponse> </Values> <Width>0</Width> </CustomFieldQueryResponse>