BokaMera.API.Host

<back to all web services

GDPRCustomerQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/gdpr/customers/{CustomerId}Get all customer information stored on the customerGet all information stored on the customer
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 GDPRCustomerBookingsResponse
            '''<Summary>
            '''The company ID associated with this booking
            '''</Summary>
            <ApiMember(Description:="The company ID associated with this booking")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The unique identifier of the booking
            '''</Summary>
            <ApiMember(Description:="The unique identifier of the booking")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The customer ID associated with this booking
            '''</Summary>
            <ApiMember(Description:="The customer ID associated with this booking")>
            Public Overridable Property CustomerId As Guid

            '''<Summary>
            '''The service ID for this booking
            '''</Summary>
            <ApiMember(Description:="The service ID for this booking")>
            Public Overridable Property ServiceId As Integer

            '''<Summary>
            '''The current status of the booking
            '''</Summary>
            <ApiMember(Description:="The current status of the booking")>
            Public Overridable Property StatusId As Integer

            '''<Summary>
            '''The start date and time of the booking
            '''</Summary>
            <ApiMember(Description:="The start date and time of the booking")>
            Public Overridable Property From As Date

            '''<Summary>
            '''The end date and time of the booking
            '''</Summary>
            <ApiMember(Description:="The end date and time of the booking")>
            Public Overridable Property To As Date

            '''<Summary>
            '''The date when the booking was cancelled or unbooked
            '''</Summary>
            <ApiMember(Description:="The date when the booking was cancelled or unbooked")>
            Public Overridable Property UnbookedOn As Nullable(Of Date)

            '''<Summary>
            '''Comments added when the booking was cancelled
            '''</Summary>
            <ApiMember(Description:="Comments added when the booking was cancelled")>
            Public Overridable Property UnbookedComments As String

            '''<Summary>
            '''Comments added when the booking was created
            '''</Summary>
            <ApiMember(Description:="Comments added when the booking was created")>
            Public Overridable Property BookedComments As String

            '''<Summary>
            '''The name of the person who made the booking
            '''</Summary>
            <ApiMember(Description:="The name of the person who made the booking")>
            Public Overridable Property BookedBy As String

            '''<Summary>
            '''General comments about the booking
            '''</Summary>
            <ApiMember(Description:="General comments about the booking")>
            Public Overridable Property Comments As String

            '''<Summary>
            '''Custom text field 1
            '''</Summary>
            <ApiMember(Description:="Custom text field 1")>
            Public Overridable Property TextField1 As String

            '''<Summary>
            '''Custom text field 2
            '''</Summary>
            <ApiMember(Description:="Custom text field 2")>
            Public Overridable Property TextField2 As String

            '''<Summary>
            '''Custom text field 3
            '''</Summary>
            <ApiMember(Description:="Custom text field 3")>
            Public Overridable Property TextField3 As String

            '''<Summary>
            '''Custom text field 4
            '''</Summary>
            <ApiMember(Description:="Custom text field 4")>
            Public Overridable Property TextField4 As String

            '''<Summary>
            '''Custom text field 5
            '''</Summary>
            <ApiMember(Description:="Custom text field 5")>
            Public Overridable Property TextField5 As String

            '''<Summary>
            '''Custom text field 6
            '''</Summary>
            <ApiMember(Description:="Custom text field 6")>
            Public Overridable Property TextField6 As String

            '''<Summary>
            '''Custom text field 7
            '''</Summary>
            <ApiMember(Description:="Custom text field 7")>
            Public Overridable Property TextField7 As String

            '''<Summary>
            '''Custom text field 8
            '''</Summary>
            <ApiMember(Description:="Custom text field 8")>
            Public Overridable Property TextField8 As String

            '''<Summary>
            '''Custom text field 9
            '''</Summary>
            <ApiMember(Description:="Custom text field 9")>
            Public Overridable Property TextField9 As String

            '''<Summary>
            '''Custom text field 10
            '''</Summary>
            <ApiMember(Description:="Custom text field 10")>
            Public Overridable Property TextField10 As String

            '''<Summary>
            '''Custom text field 11
            '''</Summary>
            <ApiMember(Description:="Custom text field 11")>
            Public Overridable Property TextField11 As String

            '''<Summary>
            '''Custom text field 12
            '''</Summary>
            <ApiMember(Description:="Custom text field 12")>
            Public Overridable Property TextField12 As String

            '''<Summary>
            '''Custom text field 13
            '''</Summary>
            <ApiMember(Description:="Custom text field 13")>
            Public Overridable Property TextField13 As String

            '''<Summary>
            '''Custom text field 14
            '''</Summary>
            <ApiMember(Description:="Custom text field 14")>
            Public Overridable Property TextField14 As String

            '''<Summary>
            '''Custom text field 15
            '''</Summary>
            <ApiMember(Description:="Custom text field 15")>
            Public Overridable Property TextField15 As String

            '''<Summary>
            '''Custom text field 16
            '''</Summary>
            <ApiMember(Description:="Custom text field 16")>
            Public Overridable Property TextField16 As String

            '''<Summary>
            '''Custom text field 17
            '''</Summary>
            <ApiMember(Description:="Custom text field 17")>
            Public Overridable Property TextField17 As String

            '''<Summary>
            '''Custom text field 18
            '''</Summary>
            <ApiMember(Description:="Custom text field 18")>
            Public Overridable Property TextField18 As String

            '''<Summary>
            '''Custom text field 19
            '''</Summary>
            <ApiMember(Description:="Custom text field 19")>
            Public Overridable Property TextField19 As String

            '''<Summary>
            '''Custom text field 20
            '''</Summary>
            <ApiMember(Description:="Custom text field 20")>
            Public Overridable Property TextField20 As String

            '''<Summary>
            '''The date when the booking was last updated
            '''</Summary>
            <ApiMember(Description:="The date when the booking was last updated")>
            Public Overridable Property UpdatedDate As Date

            '''<Summary>
            '''The date when the booking was created
            '''</Summary>
            <ApiMember(Description:="The date when the booking was created")>
            Public Overridable Property CreatedDate As Date

            '''<Summary>
            '''Comments sent to the customer about this booking
            '''</Summary>
            <ApiMember(Description:="Comments sent to the customer about this booking")>
            Public Overridable Property CommentsToCustomer As String
        End Class

        Public Partial Class GDPRCustomerCommentsResponse
            '''<Summary>
            '''The company ID associated with this comment
            '''</Summary>
            <ApiMember(Description:="The company ID associated with this comment")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The unique identifier of the comment
            '''</Summary>
            <ApiMember(Description:="The unique identifier of the comment")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The customer ID this comment is associated with
            '''</Summary>
            <ApiMember(Description:="The customer ID this comment is associated with")>
            Public Overridable Property CustomerId As Guid

            '''<Summary>
            '''The content of the comment
            '''</Summary>
            <ApiMember(Description:="The content of the comment")>
            Public Overridable Property Comments As String

            '''<Summary>
            '''The date when the comment was last updated
            '''</Summary>
            <ApiMember(Description:="The date when the comment was last updated")>
            Public Overridable Property Updated As Date

            '''<Summary>
            '''The date when the comment was created
            '''</Summary>
            <ApiMember(Description:="The date when the comment was created")>
            Public Overridable Property Created As Date

            '''<Summary>
            '''URL to any image associated with the comment
            '''</Summary>
            <ApiMember(Description:="URL to any image associated with the comment")>
            Public Overridable Property ImageUrl As Uri
        End Class

        Public Partial Class GDPRCustomerInfoResponse
            '''<Summary>
            '''The unique identifier of the user
            '''</Summary>
            <ApiMember(Description:="The unique identifier of the user")>
            Public Overridable Property UserId As Guid

            '''<Summary>
            '''The user's first name
            '''</Summary>
            <ApiMember(Description:="The user's first name")>
            Public Overridable Property Firstname As String

            '''<Summary>
            '''The user's last name
            '''</Summary>
            <ApiMember(Description:="The user's last name")>
            Public Overridable Property Lastname As String

            '''<Summary>
            '''The user's phone number
            '''</Summary>
            <ApiMember(Description:="The user's phone number")>
            Public Overridable Property Phone As String

            '''<Summary>
            '''The user's email address
            '''</Summary>
            <ApiMember(Description:="The user's email address")>
            Public Overridable Property Email As String

            '''<Summary>
            '''Whether the user account is currently active
            '''</Summary>
            <ApiMember(Description:="Whether the user account is currently active")>
            Public Overridable Property Active As Boolean

            '''<Summary>
            '''The user's Facebook username
            '''</Summary>
            <ApiMember(Description:="The user's Facebook username")>
            Public Overridable Property FacebookUsername As String

            '''<Summary>
            '''Custom text field 1
            '''</Summary>
            <ApiMember(Description:="Custom text field 1")>
            Public Overridable Property TextField1 As String

            '''<Summary>
            '''Custom text field 2
            '''</Summary>
            <ApiMember(Description:="Custom text field 2")>
            Public Overridable Property TextField2 As String

            '''<Summary>
            '''Custom text field 3
            '''</Summary>
            <ApiMember(Description:="Custom text field 3")>
            Public Overridable Property TextField3 As String

            '''<Summary>
            '''Custom text field 4
            '''</Summary>
            <ApiMember(Description:="Custom text field 4")>
            Public Overridable Property TextField4 As String

            '''<Summary>
            '''Custom text field 5
            '''</Summary>
            <ApiMember(Description:="Custom text field 5")>
            Public Overridable Property TextField5 As String

            '''<Summary>
            '''Custom text field 6
            '''</Summary>
            <ApiMember(Description:="Custom text field 6")>
            Public Overridable Property TextField6 As String

            '''<Summary>
            '''Custom text field 7
            '''</Summary>
            <ApiMember(Description:="Custom text field 7")>
            Public Overridable Property TextField7 As String

            '''<Summary>
            '''Custom text field 8
            '''</Summary>
            <ApiMember(Description:="Custom text field 8")>
            Public Overridable Property TextField8 As String

            '''<Summary>
            '''Custom text field 9
            '''</Summary>
            <ApiMember(Description:="Custom text field 9")>
            Public Overridable Property TextField9 As String

            '''<Summary>
            '''Custom text field 10
            '''</Summary>
            <ApiMember(Description:="Custom text field 10")>
            Public Overridable Property TextField10 As String

            '''<Summary>
            '''Custom text field 11
            '''</Summary>
            <ApiMember(Description:="Custom text field 11")>
            Public Overridable Property TextField11 As String

            '''<Summary>
            '''Custom text field 12
            '''</Summary>
            <ApiMember(Description:="Custom text field 12")>
            Public Overridable Property TextField12 As String

            '''<Summary>
            '''Custom text field 13
            '''</Summary>
            <ApiMember(Description:="Custom text field 13")>
            Public Overridable Property TextField13 As String

            '''<Summary>
            '''Custom text field 14
            '''</Summary>
            <ApiMember(Description:="Custom text field 14")>
            Public Overridable Property TextField14 As String

            '''<Summary>
            '''Custom text field 15
            '''</Summary>
            <ApiMember(Description:="Custom text field 15")>
            Public Overridable Property TextField15 As String

            '''<Summary>
            '''Custom text field 16
            '''</Summary>
            <ApiMember(Description:="Custom text field 16")>
            Public Overridable Property TextField16 As String

            '''<Summary>
            '''Custom text field 17
            '''</Summary>
            <ApiMember(Description:="Custom text field 17")>
            Public Overridable Property TextField17 As String

            '''<Summary>
            '''Custom text field 18
            '''</Summary>
            <ApiMember(Description:="Custom text field 18")>
            Public Overridable Property TextField18 As String

            '''<Summary>
            '''Custom text field 19
            '''</Summary>
            <ApiMember(Description:="Custom text field 19")>
            Public Overridable Property TextField19 As String

            '''<Summary>
            '''Custom text field 20
            '''</Summary>
            <ApiMember(Description:="Custom text field 20")>
            Public Overridable Property TextField20 As String

            '''<Summary>
            '''The date when the customer information was last updated
            '''</Summary>
            <ApiMember(Description:="The date when the customer information was last updated")>
            Public Overridable Property Updated As Date

            '''<Summary>
            '''The date when the customer information was created
            '''</Summary>
            <ApiMember(Description:="The date when the customer information was created")>
            Public Overridable Property Created As Date
        End Class

        Public Partial Class GDPRCustomerMessageLogResponse
            '''<Summary>
            '''The company ID associated with this message
            '''</Summary>
            <ApiMember(Description:="The company ID associated with this message")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The unique identifier of the message
            '''</Summary>
            <ApiMember(Description:="The unique identifier of the message")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The booking ID this message is related to, if any
            '''</Summary>
            <ApiMember(Description:="The booking ID this message is related to, if any")>
            Public Overridable Property BookingId As Nullable(Of Integer)

            '''<Summary>
            '''The recipient of the message
            '''</Summary>
            <ApiMember(Description:="The recipient of the message")>
            Public Overridable Property Receiver As String

            '''<Summary>
            '''The sender of the message
            '''</Summary>
            <ApiMember(Description:="The sender of the message")>
            Public Overridable Property Sender As String

            '''<Summary>
            '''The title or subject of the message
            '''</Summary>
            <ApiMember(Description:="The title or subject of the message")>
            Public Overridable Property MessageTitle As String

            '''<Summary>
            '''The body content of the message
            '''</Summary>
            <ApiMember(Description:="The body content of the message")>
            Public Overridable Property MessageBody As String

            '''<Summary>
            '''The name of the person who created the message
            '''</Summary>
            <ApiMember(Description:="The name of the person who created the message")>
            Public Overridable Property CreatedBy As String

            '''<Summary>
            '''The date when the message was created
            '''</Summary>
            <ApiMember(Description:="The date when the message was created")>
            Public Overridable Property Created As Date

            '''<Summary>
            '''Whether the message was successfully sent
            '''</Summary>
            <ApiMember(Description:="Whether the message was successfully sent")>
            Public Overridable Property Sent As Boolean

            '''<Summary>
            '''The date when the message was sent
            '''</Summary>
            <ApiMember(Description:="The date when the message was sent")>
            Public Overridable Property SentDate As Nullable(Of Date)

            '''<Summary>
            '''The method used to send the message (e.g., email, SMS)
            '''</Summary>
            <ApiMember(Description:="The method used to send the message (e.g., email, SMS)")>
            Public Overridable Property SendMethodId As Integer
        End Class

        Public Partial Class GDPRCustomerNewsletterLogResponse
            '''<Summary>
            '''The company ID associated with this newsletter
            '''</Summary>
            <ApiMember(Description:="The company ID associated with this newsletter")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The unique identifier of the newsletter log entry
            '''</Summary>
            <ApiMember(Description:="The unique identifier of the newsletter log entry")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The newsletter ID this log entry is related to, if any
            '''</Summary>
            <ApiMember(Description:="The newsletter ID this log entry is related to, if any")>
            Public Overridable Property NewslettersId As Nullable(Of Integer)

            '''<Summary>
            '''The recipient of the newsletter
            '''</Summary>
            <ApiMember(Description:="The recipient of the newsletter")>
            Public Overridable Property Receiver As String

            '''<Summary>
            '''The sender of the newsletter
            '''</Summary>
            <ApiMember(Description:="The sender of the newsletter")>
            Public Overridable Property Sender As String

            '''<Summary>
            '''The title or subject of the newsletter
            '''</Summary>
            <ApiMember(Description:="The title or subject of the newsletter")>
            Public Overridable Property MessageTitle As String

            '''<Summary>
            '''The body content of the newsletter
            '''</Summary>
            <ApiMember(Description:="The body content of the newsletter")>
            Public Overridable Property MessageBody As String

            '''<Summary>
            '''Whether the newsletter was successfully sent
            '''</Summary>
            <ApiMember(Description:="Whether the newsletter was successfully sent")>
            Public Overridable Property Sent As Boolean

            '''<Summary>
            '''The date when the newsletter was created
            '''</Summary>
            <ApiMember(Description:="The date when the newsletter was created")>
            Public Overridable Property Created As Date
        End Class

        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class GDPRCustomerQuery
            Implements ICompany
            '''<Summary>
            '''Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown 
            '''</Summary>
            <ApiMember(Description:="Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired:=true, ParameterType:="query")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Id of the customer
            '''</Summary>
            <ApiMember(Description:="Id of the customer", IsRequired:=true, ParameterType:="path")>
            Public Overridable Property CustomerId As Guid
        End Class

        Public Partial Class GDPRCustomerQueryResponse
            Public Sub New()
                Bookings = New List(Of GDPRCustomerBookingsResponse)
                MessageLog = New List(Of GDPRCustomerMessageLogResponse)
                CustomerComment = New List(Of GDPRCustomerCommentsResponse)
                NewsletterLog = New List(Of GDPRCustomerNewsletterLogResponse)
            End Sub

            '''<Summary>
            '''List of all bookings associated with the customer
            '''</Summary>
            <ApiMember(Description:="List of all bookings associated with the customer")>
            Public Overridable Property Bookings As List(Of GDPRCustomerBookingsResponse)

            '''<Summary>
            '''List of all message logs associated with the customer
            '''</Summary>
            <ApiMember(Description:="List of all message logs associated with the customer")>
            Public Overridable Property MessageLog As List(Of GDPRCustomerMessageLogResponse)

            '''<Summary>
            '''The user profile information for the customer
            '''</Summary>
            <ApiMember(Description:="The user profile information for the customer")>
            Public Overridable Property UserProfile As UserProfileResponse

            '''<Summary>
            '''Detailed customer information
            '''</Summary>
            <ApiMember(Description:="Detailed customer information")>
            Public Overridable Property Customer As GDPRCustomerInfoResponse

            '''<Summary>
            '''List of all comments associated with the customer
            '''</Summary>
            <ApiMember(Description:="List of all comments associated with the customer")>
            Public Overridable Property CustomerComment As List(Of GDPRCustomerCommentsResponse)

            '''<Summary>
            '''List of all newsletter logs associated with the customer
            '''</Summary>
            <ApiMember(Description:="List of all newsletter logs associated with the customer")>
            Public Overridable Property NewsletterLog As List(Of GDPRCustomerNewsletterLogResponse)

            '''<Summary>
            '''Response status information
            '''</Summary>
            <ApiMember(Description:="Response status information")>
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class InvoiceAddressResponse
            Public Overridable Property InvoiceAddressId As Guid
            Public Overridable Property UserId As Nullable(Of Guid)
            Public Overridable Property CorporateIdentityNumber As String
            Public Overridable Property InvoiceAddress1 As String
            Public Overridable Property InvoiceAddress2 As String
            Public Overridable Property InvoiceCity As String
            Public Overridable Property InvoicePostalCode As String
            Public Overridable Property InvoiceCountryCode As String
        End Class

        Public Partial Class UserProfileResponse
            Public Overridable Property Id As Guid
            Public Overridable Property Firstname As String
            Public Overridable Property Lastname As String
            Public Overridable Property Phone As String
            Public Overridable Property Email As String
            Public Overridable Property InvoiceAddress As InvoiceAddressResponse
        End Class
    End Namespace
End Namespace

VB.NET GDPRCustomerQuery DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /gdpr/customers/{CustomerId} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Bookings":[{"Id":0,"ServiceId":0,"StatusId":0,"UnbookedOn":"0001-01-01T00:00:00","UnbookedComments":"String","BookedComments":"String","BookedBy":"String","Comments":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String","CommentsToCustomer":"String"}],"MessageLog":[{"Id":0,"BookingId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","CreatedBy":"String","Sent":false,"SentDate":"0001-01-01T00:00:00","SendMethodId":0}],"UserProfile":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","InvoiceAddress":{"UserId":"00000000-0000-0000-0000-000000000000","CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"}},"Customer":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","Active":false,"FacebookUsername":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String"},"CustomerComment":[{"Id":0,"Comments":"String"}],"NewsletterLog":[{"Id":0,"NewslettersId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","Sent":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}