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.
DeleteCustomField Parameters:
NameParameterData TypeRequiredDescription
CompanyIdqueryGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
IdpathintYesId of the custom field to delete
CustomFieldQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoCustom field id
CompanyIdformGuidNoReference to company that owns the custom field configuration
GroupIdformint?NoGroup id
FieldIdformintNoField id
NameformstringYesConfiguration name. Example: 'Number of persons'.
WidthformintNoField width. Example: 20
ColumnformstringYesColumn in database where to store the information. Example: 'TextField1'
DescriptionformstringYesCustom field description. Example: 'For how many persons is this booking?'
DataTypeformstringYesData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
DefaultValueformstringYesDefault value of the field. Example: '3'
IsMandatoryformboolNoDetermines if the field is required to have a value or not
MandatoryErrorMessageformstringYesError message shown to the user if the field data is required but not entered
MaxLengthformintNoMax lenght of the field
MultipleLineTextformboolNoIf the field should have multiple lines
RegExformstringYesRegular expression used for validation of the field
RegExIdformint?NoRegular expression id for validation of the field
RegExErrorMessageformstringYesError message shown if the regular expression validation failed
IsPublicformboolNoIf the field is visible to the customer
IsHiddenformboolNoIf the field should be hidden in lists
TableformstringYesTable to which the field belongs
ValuesformList<CustomFieldLookupResponse>YesThe values to select from if Datatype is DropDown for this custom field
ServicesformList<CustomFieldServices>YesThe services that is connected to the custom field
CustomFieldLookupResponse Parameters:
NameParameterData TypeRequiredDescription
Idformint?No
Activeformbool?No
SortOrderformint?No
ValueformstringYes
CustomFieldServices Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYesName of the service
ImageUrlformUriYesThe image url of the service

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
HTTP/1.1 200 OK
Content-Type: application/json
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"}]}