BokaMera.API.Host

<back to all web services

DeleteCustomField

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/customfields/{Id}Delete a custom fieldDelete a custom field for the currently logged in user, only administrators are allowed to delete custom fields.
namespace BokaMera.API.ServiceModel.Dtos

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type CustomFieldLookupResponse() = 
        member val Id:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Active:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val SortOrder:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Value:String = null with get,set

    [<AllowNullLiteral>]
    type CustomFieldServices() = 
        member val Id:Int32 = new Int32() with get,set
        ///<summary>
        ///Name of the service
        ///</summary>
        [<ApiMember(Description="Name of the service")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The image url of the service
        ///</summary>
        [<ApiMember(Description="The image url of the service")>]
        member val ImageUrl:Uri = null with get,set

    [<AllowNullLiteral>]
    type CustomFieldQueryResponse() = 
        ///<summary>
        ///Custom field id
        ///</summary>
        [<ApiMember(Description="Custom field id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///Reference to company that owns the custom field configuration
        ///</summary>
        [<ApiMember(Description="Reference to company that owns the custom field configuration")>]
        member val CompanyId:Guid = new Guid() with get,set

        ///<summary>
        ///Group id
        ///</summary>
        [<ApiMember(Description="Group id")>]
        member val GroupId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Field id
        ///</summary>
        [<ApiMember(Description="Field id")>]
        member val FieldId:Int32 = new Int32() with get,set

        ///<summary>
        ///Configuration name. Example: 'Number of persons'.
        ///</summary>
        [<ApiMember(Description="Configuration name. Example: 'Number of persons'.")>]
        member val Name:String = null with get,set

        ///<summary>
        ///Field width. Example: 20
        ///</summary>
        [<ApiMember(Description="Field width. Example: 20")>]
        member val Width:Int32 = new Int32() with get,set

        ///<summary>
        ///Column in database where to store the information. Example: 'TextField1'
        ///</summary>
        [<ApiMember(Description="Column in database where to store the information. Example: 'TextField1'")>]
        member val Column:String = null with get,set

        ///<summary>
        ///Custom field description. Example: 'For how many persons is this booking?'
        ///</summary>
        [<ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")>]
        member val Description:String = null with get,set

        ///<summary>
        ///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
        ///</summary>
        [<ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>]
        member val DataType:String = null with get,set

        ///<summary>
        ///Default value of the field. Example: '3'
        ///</summary>
        [<ApiMember(Description="Default value of the field. Example: '3'")>]
        member val DefaultValue:String = null with get,set

        ///<summary>
        ///Determines if the field is required to have a value or not
        ///</summary>
        [<ApiMember(Description="Determines if the field is required to have a value or not")>]
        member val IsMandatory:Boolean = new Boolean() with get,set

        ///<summary>
        ///Error message shown to the user if the field data is required but not entered
        ///</summary>
        [<ApiMember(Description="Error message shown to the user if the field data is required but not entered")>]
        member val MandatoryErrorMessage:String = null with get,set

        ///<summary>
        ///Max lenght of the field
        ///</summary>
        [<ApiMember(Description="Max lenght of the field")>]
        member val MaxLength:Int32 = new Int32() with get,set

        ///<summary>
        ///If the field should have multiple lines
        ///</summary>
        [<ApiMember(Description="If the field should have multiple lines")>]
        member val MultipleLineText:Boolean = new Boolean() with get,set

        ///<summary>
        ///Regular expression used for validation of the field
        ///</summary>
        [<ApiMember(Description="Regular expression used for validation of the field")>]
        member val RegEx:String = null with get,set

        ///<summary>
        ///Regular expression id for validation of the field
        ///</summary>
        [<ApiMember(Description="Regular expression id for validation of the field")>]
        member val RegExId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Error message shown if the regular expression validation failed
        ///</summary>
        [<ApiMember(Description="Error message shown if the regular expression validation failed")>]
        member val RegExErrorMessage:String = null with get,set

        ///<summary>
        ///If the field is visible to the customer
        ///</summary>
        [<ApiMember(Description="If the field is visible to the customer")>]
        member val IsPublic:Boolean = new Boolean() with get,set

        ///<summary>
        ///If the field should be hidden in lists
        ///</summary>
        [<ApiMember(Description="If the field should be hidden in lists")>]
        member val IsHidden:Boolean = new Boolean() with get,set

        ///<summary>
        ///Table to which the field belongs
        ///</summary>
        [<ApiMember(Description="Table to which the field belongs")>]
        member val Table:String = null with get,set

        ///<summary>
        ///The values to select from if Datatype is DropDown for this custom field
        ///</summary>
        [<ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")>]
        member val Values:ResizeArray<CustomFieldLookupResponse> = new ResizeArray<CustomFieldLookupResponse>() with get,set

        ///<summary>
        ///The services that is connected to the custom field
        ///</summary>
        [<ApiMember(Description="The services that is connected to the custom field")>]
        member val Services:ResizeArray<CustomFieldServices> = new ResizeArray<CustomFieldServices>() with get,set

    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type DeleteCustomField() = 
        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [<ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///Id of the custom field to delete
        ///</summary>
        [<ApiMember(Description="Id of the custom field to delete", IsRequired=true, ParameterType="path")>]
        member val Id:Int32 = new Int32() with get,set

F# DeleteCustomField DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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: testapi.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>