BokaMera.API.Host

<back to all web services

CustomFieldSlotsQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/customfields/slotsFind all slots to store custom fields data inGet all available slots that are avaialble to store data in
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ApiResponse(Description:="You have too low privilegies to call this service", StatusCode:=403)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class CustomFieldSlotsQuery
            Implements ICompany
            '''<Summary>
            '''Company id to find custom fields for
            '''</Summary>
            <ApiMember(Description:="Company id to find custom fields for", ParameterType:="query")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Table to which the field belongs
            '''</Summary>
            <ApiMember(Description:="Table to which the field belongs", IsRequired:=true)>
            Public Overridable Property Table As String

            '''<Summary>
            '''If you want to receive only free slots (not occupied).
            '''</Summary>
            <ApiMember(Description:="If you want to receive only free slots (not occupied).")>
            Public Overridable Property FreeSlots As Nullable(Of Boolean)
        End Class

        Public Partial Class CustomFieldSlotsQueryResponse
            '''<Summary>
            '''Table to which the field belongs
            '''</Summary>
            <ApiMember(Description:="Table to which the field belongs")>
            Public Overridable Property Table As String

            '''<Summary>
            '''Custom field id
            '''</Summary>
            <ApiMember(Description:="Custom field id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''Custom field column name
            '''</Summary>
            <ApiMember(Description:="Custom field column name")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The field datatype
            '''</Summary>
            <ApiMember(Description:="The field datatype")>
            Public Overridable Property Datatype As String

            '''<Summary>
            '''If the slot is free or occupied
            '''</Summary>
            <ApiMember(Description:="If the slot is free or occupied")>
            Public Overridable Property Occupied As Boolean
        End Class
    End Namespace
End Namespace

VB.NET CustomFieldSlotsQuery 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.

GET /customfields/slots HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomFieldSlotsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Datatype>String</Datatype>
  <Id>0</Id>
  <Name>String</Name>
  <Occupied>false</Occupied>
  <Table>String</Table>
</CustomFieldSlotsQueryResponse>