BokaMera.API.Host

<back to all web services

NewsletterCustomerQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/newsletter/customersGet all customers that are valid for sending newsletters to.Get all customers that are valid for sending newsletters to.
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

        Public Partial Class NewsletterCustomerInfo
            Public Overridable Property Id As Guid
            Public Overridable Property Firstname As String
            Public Overridable Property Lastname As String
            Public Overridable Property Email As String
            Public Overridable Property Phone As String
            Public Overridable Property FacebookUserName As String
            Public Overridable Property ImageUrl As Uri
        End Class

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class NewsletterCustomerQuery
            Implements ICompany
            Public Sub New()
                BookedServiceIds = New Integer(){}
            End Sub

            '''<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.")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Search for customer has done minimum number of bookings.
            '''</Summary>
            <ApiMember(Description:="Search for customer has done minimum number of bookings.")>
            Public Overridable Property CustomerMinBookings As Nullable(Of Integer)

            '''<Summary>
            '''Search for customer has done maximum number of bookings.
            '''</Summary>
            <ApiMember(Description:="Search for customer has done maximum number of bookings.")>
            Public Overridable Property CustomerMaxBookings As Nullable(Of Integer)

            '''<Summary>
            '''Search for customer has booked any of the service in the list (List contain service id's).
            '''</Summary>
            <ApiMember(Description:="Search for customer has booked any of the service in the list (List contain service id's).")>
            Public Overridable Property BookedServiceIds As Integer()

            '''<Summary>
            '''Search interval From datetime .
            '''</Summary>
            <ApiMember(Description:="Search interval From datetime .")>
            Public Overridable Property From As Nullable(Of Date)

            '''<Summary>
            '''Search interval To datetime .
            '''</Summary>
            <ApiMember(Description:="Search interval To datetime .")>
            Public Overridable Property To As Nullable(Of Date)

            '''<Summary>
            '''The max number of records you want to collect
            '''</Summary>
            <ApiMember(Description:="The max number of records you want to collect")>
            Public Overridable Property MaxRecords As Nullable(Of Integer)

            '''<Summary>
            '''If you want to include the full customer information in the response
            '''</Summary>
            <ApiMember(Description:="If you want to include the full customer information in the response")>
            Public Overridable Property IncludeCustomerInformation As Boolean
        End Class

        Public Partial Class NewsletterCustomerQueryResponse
            Public Overridable Property Id As Guid
            Public Overridable Property Customer As NewsletterCustomerInfo
        End Class
    End Namespace
End Namespace

VB.NET NewsletterCustomerQuery DTOs

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.

GET /newsletter/customers HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","FacebookUserName":"String"}}