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
import Foundation
import ServiceStack

// @ValidateRequest(Validator="IsAuthenticated")
public class GDPRCustomerQuery : ICompany, Codable
{
    /**
    * 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 
    */
    // @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 var companyId:String?

    /**
    * Id of the customer
    */
    // @ApiMember(Description="Id of the customer", IsRequired=true, ParameterType="path")
    public var customerId:String

    required public init(){}
}

public class GDPRCustomerQueryResponse : Codable
{
    /**
    * List of all bookings associated with the customer
    */
    // @ApiMember(Description="List of all bookings associated with the customer")
    public var bookings:[GDPRCustomerBookingsResponse] = []

    /**
    * List of all message logs associated with the customer
    */
    // @ApiMember(Description="List of all message logs associated with the customer")
    public var messageLog:[GDPRCustomerMessageLogResponse] = []

    /**
    * The user profile information for the customer
    */
    // @ApiMember(Description="The user profile information for the customer")
    public var userProfile:UserProfileResponse

    /**
    * Detailed customer information
    */
    // @ApiMember(Description="Detailed customer information")
    public var customer:GDPRCustomerInfoResponse

    /**
    * List of all comments associated with the customer
    */
    // @ApiMember(Description="List of all comments associated with the customer")
    public var customerComment:[GDPRCustomerCommentsResponse] = []

    /**
    * List of all newsletter logs associated with the customer
    */
    // @ApiMember(Description="List of all newsletter logs associated with the customer")
    public var newsletterLog:[GDPRCustomerNewsletterLogResponse] = []

    /**
    * Response status information
    */
    // @ApiMember(Description="Response status information")
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class GDPRCustomerBookingsResponse : Codable
{
    /**
    * The company ID associated with this booking
    */
    // @ApiMember(Description="The company ID associated with this booking")
    public var companyId:String

    /**
    * The unique identifier of the booking
    */
    // @ApiMember(Description="The unique identifier of the booking")
    public var id:Int

    /**
    * The customer ID associated with this booking
    */
    // @ApiMember(Description="The customer ID associated with this booking")
    public var customerId:String

    /**
    * The service ID for this booking
    */
    // @ApiMember(Description="The service ID for this booking")
    public var serviceId:Int

    /**
    * The current status of the booking
    */
    // @ApiMember(Description="The current status of the booking")
    public var statusId:Int

    /**
    * The start date and time of the booking
    */
    // @ApiMember(Description="The start date and time of the booking")
    public var from:Date

    /**
    * The end date and time of the booking
    */
    // @ApiMember(Description="The end date and time of the booking")
    public var to:Date

    /**
    * The date when the booking was cancelled or unbooked
    */
    // @ApiMember(Description="The date when the booking was cancelled or unbooked")
    public var unbookedOn:Date?

    /**
    * Comments added when the booking was cancelled
    */
    // @ApiMember(Description="Comments added when the booking was cancelled")
    public var unbookedComments:String

    /**
    * Comments added when the booking was created
    */
    // @ApiMember(Description="Comments added when the booking was created")
    public var bookedComments:String

    /**
    * The name of the person who made the booking
    */
    // @ApiMember(Description="The name of the person who made the booking")
    public var bookedBy:String

    /**
    * General comments about the booking
    */
    // @ApiMember(Description="General comments about the booking")
    public var comments:String

    /**
    * Custom text field 1
    */
    // @ApiMember(Description="Custom text field 1")
    public var textField1:String

    /**
    * Custom text field 2
    */
    // @ApiMember(Description="Custom text field 2")
    public var textField2:String

    /**
    * Custom text field 3
    */
    // @ApiMember(Description="Custom text field 3")
    public var textField3:String

    /**
    * Custom text field 4
    */
    // @ApiMember(Description="Custom text field 4")
    public var textField4:String

    /**
    * Custom text field 5
    */
    // @ApiMember(Description="Custom text field 5")
    public var textField5:String

    /**
    * Custom text field 6
    */
    // @ApiMember(Description="Custom text field 6")
    public var textField6:String

    /**
    * Custom text field 7
    */
    // @ApiMember(Description="Custom text field 7")
    public var textField7:String

    /**
    * Custom text field 8
    */
    // @ApiMember(Description="Custom text field 8")
    public var textField8:String

    /**
    * Custom text field 9
    */
    // @ApiMember(Description="Custom text field 9")
    public var textField9:String

    /**
    * Custom text field 10
    */
    // @ApiMember(Description="Custom text field 10")
    public var textField10:String

    /**
    * Custom text field 11
    */
    // @ApiMember(Description="Custom text field 11")
    public var textField11:String

    /**
    * Custom text field 12
    */
    // @ApiMember(Description="Custom text field 12")
    public var textField12:String

    /**
    * Custom text field 13
    */
    // @ApiMember(Description="Custom text field 13")
    public var textField13:String

    /**
    * Custom text field 14
    */
    // @ApiMember(Description="Custom text field 14")
    public var textField14:String

    /**
    * Custom text field 15
    */
    // @ApiMember(Description="Custom text field 15")
    public var textField15:String

    /**
    * Custom text field 16
    */
    // @ApiMember(Description="Custom text field 16")
    public var textField16:String

    /**
    * Custom text field 17
    */
    // @ApiMember(Description="Custom text field 17")
    public var textField17:String

    /**
    * Custom text field 18
    */
    // @ApiMember(Description="Custom text field 18")
    public var textField18:String

    /**
    * Custom text field 19
    */
    // @ApiMember(Description="Custom text field 19")
    public var textField19:String

    /**
    * Custom text field 20
    */
    // @ApiMember(Description="Custom text field 20")
    public var textField20:String

    /**
    * The date when the booking was last updated
    */
    // @ApiMember(Description="The date when the booking was last updated")
    public var updatedDate:Date

    /**
    * The date when the booking was created
    */
    // @ApiMember(Description="The date when the booking was created")
    public var createdDate:Date

    /**
    * Comments sent to the customer about this booking
    */
    // @ApiMember(Description="Comments sent to the customer about this booking")
    public var commentsToCustomer:String

    required public init(){}
}

public class GDPRCustomerMessageLogResponse : Codable
{
    /**
    * The company ID associated with this message
    */
    // @ApiMember(Description="The company ID associated with this message")
    public var companyId:String

    /**
    * The unique identifier of the message
    */
    // @ApiMember(Description="The unique identifier of the message")
    public var id:Int

    /**
    * The booking ID this message is related to, if any
    */
    // @ApiMember(Description="The booking ID this message is related to, if any")
    public var bookingId:Int?

    /**
    * The recipient of the message
    */
    // @ApiMember(Description="The recipient of the message")
    public var receiver:String

    /**
    * The sender of the message
    */
    // @ApiMember(Description="The sender of the message")
    public var sender:String

    /**
    * The title or subject of the message
    */
    // @ApiMember(Description="The title or subject of the message")
    public var messageTitle:String

    /**
    * The body content of the message
    */
    // @ApiMember(Description="The body content of the message")
    public var messageBody:String

    /**
    * The name of the person who created the message
    */
    // @ApiMember(Description="The name of the person who created the message")
    public var createdBy:String

    /**
    * The date when the message was created
    */
    // @ApiMember(Description="The date when the message was created")
    public var created:Date

    /**
    * Whether the message was successfully sent
    */
    // @ApiMember(Description="Whether the message was successfully sent")
    public var sent:Bool

    /**
    * The date when the message was sent
    */
    // @ApiMember(Description="The date when the message was sent")
    public var sentDate:Date?

    /**
    * The method used to send the message (e.g., email, SMS)
    */
    // @ApiMember(Description="The method used to send the message (e.g., email, SMS)")
    public var sendMethodId:Int

    required public init(){}
}

public class UserProfileResponse : Codable
{
    public var id:String
    public var firstname:String
    public var lastname:String
    public var phone:String
    public var email:String
    public var invoiceAddress:InvoiceAddressResponse

    required public init(){}
}

public class InvoiceAddressResponse : Codable
{
    public var invoiceAddressId:String
    public var userId:String?
    public var corporateIdentityNumber:String
    public var invoiceAddress1:String
    public var invoiceAddress2:String
    public var invoiceCity:String
    public var invoicePostalCode:String
    public var invoiceCountryCode:String

    required public init(){}
}

public class GDPRCustomerInfoResponse : Codable
{
    /**
    * The unique identifier of the user
    */
    // @ApiMember(Description="The unique identifier of the user")
    public var userId:String

    /**
    * The user's first name
    */
    // @ApiMember(Description="The user's first name")
    public var firstname:String

    /**
    * The user's last name
    */
    // @ApiMember(Description="The user's last name")
    public var lastname:String

    /**
    * The user's phone number
    */
    // @ApiMember(Description="The user's phone number")
    public var phone:String

    /**
    * The user's email address
    */
    // @ApiMember(Description="The user's email address")
    public var email:String

    /**
    * Whether the user account is currently active
    */
    // @ApiMember(Description="Whether the user account is currently active")
    public var active:Bool

    /**
    * The user's Facebook username
    */
    // @ApiMember(Description="The user's Facebook username")
    public var facebookUsername:String

    /**
    * Custom text field 1
    */
    // @ApiMember(Description="Custom text field 1")
    public var textField1:String

    /**
    * Custom text field 2
    */
    // @ApiMember(Description="Custom text field 2")
    public var textField2:String

    /**
    * Custom text field 3
    */
    // @ApiMember(Description="Custom text field 3")
    public var textField3:String

    /**
    * Custom text field 4
    */
    // @ApiMember(Description="Custom text field 4")
    public var textField4:String

    /**
    * Custom text field 5
    */
    // @ApiMember(Description="Custom text field 5")
    public var textField5:String

    /**
    * Custom text field 6
    */
    // @ApiMember(Description="Custom text field 6")
    public var textField6:String

    /**
    * Custom text field 7
    */
    // @ApiMember(Description="Custom text field 7")
    public var textField7:String

    /**
    * Custom text field 8
    */
    // @ApiMember(Description="Custom text field 8")
    public var textField8:String

    /**
    * Custom text field 9
    */
    // @ApiMember(Description="Custom text field 9")
    public var textField9:String

    /**
    * Custom text field 10
    */
    // @ApiMember(Description="Custom text field 10")
    public var textField10:String

    /**
    * Custom text field 11
    */
    // @ApiMember(Description="Custom text field 11")
    public var textField11:String

    /**
    * Custom text field 12
    */
    // @ApiMember(Description="Custom text field 12")
    public var textField12:String

    /**
    * Custom text field 13
    */
    // @ApiMember(Description="Custom text field 13")
    public var textField13:String

    /**
    * Custom text field 14
    */
    // @ApiMember(Description="Custom text field 14")
    public var textField14:String

    /**
    * Custom text field 15
    */
    // @ApiMember(Description="Custom text field 15")
    public var textField15:String

    /**
    * Custom text field 16
    */
    // @ApiMember(Description="Custom text field 16")
    public var textField16:String

    /**
    * Custom text field 17
    */
    // @ApiMember(Description="Custom text field 17")
    public var textField17:String

    /**
    * Custom text field 18
    */
    // @ApiMember(Description="Custom text field 18")
    public var textField18:String

    /**
    * Custom text field 19
    */
    // @ApiMember(Description="Custom text field 19")
    public var textField19:String

    /**
    * Custom text field 20
    */
    // @ApiMember(Description="Custom text field 20")
    public var textField20:String

    /**
    * The date when the customer information was last updated
    */
    // @ApiMember(Description="The date when the customer information was last updated")
    public var updated:Date

    /**
    * The date when the customer information was created
    */
    // @ApiMember(Description="The date when the customer information was created")
    public var created:Date

    required public init(){}
}

public class GDPRCustomerCommentsResponse : Codable
{
    /**
    * The company ID associated with this comment
    */
    // @ApiMember(Description="The company ID associated with this comment")
    public var companyId:String

    /**
    * The unique identifier of the comment
    */
    // @ApiMember(Description="The unique identifier of the comment")
    public var id:Int

    /**
    * The customer ID this comment is associated with
    */
    // @ApiMember(Description="The customer ID this comment is associated with")
    public var customerId:String

    /**
    * The content of the comment
    */
    // @ApiMember(Description="The content of the comment")
    public var comments:String

    /**
    * The date when the comment was last updated
    */
    // @ApiMember(Description="The date when the comment was last updated")
    public var updated:Date

    /**
    * The date when the comment was created
    */
    // @ApiMember(Description="The date when the comment was created")
    public var created:Date

    /**
    * URL to any image associated with the comment
    */
    // @ApiMember(Description="URL to any image associated with the comment")
    public var imageUrl:Uri

    required public init(){}
}

public class GDPRCustomerNewsletterLogResponse : Codable
{
    /**
    * The company ID associated with this newsletter
    */
    // @ApiMember(Description="The company ID associated with this newsletter")
    public var companyId:String

    /**
    * The unique identifier of the newsletter log entry
    */
    // @ApiMember(Description="The unique identifier of the newsletter log entry")
    public var id:Int

    /**
    * The newsletter ID this log entry is related to, if any
    */
    // @ApiMember(Description="The newsletter ID this log entry is related to, if any")
    public var newslettersId:Int?

    /**
    * The recipient of the newsletter
    */
    // @ApiMember(Description="The recipient of the newsletter")
    public var receiver:String

    /**
    * The sender of the newsletter
    */
    // @ApiMember(Description="The sender of the newsletter")
    public var sender:String

    /**
    * The title or subject of the newsletter
    */
    // @ApiMember(Description="The title or subject of the newsletter")
    public var messageTitle:String

    /**
    * The body content of the newsletter
    */
    // @ApiMember(Description="The body content of the newsletter")
    public var messageBody:String

    /**
    * Whether the newsletter was successfully sent
    */
    // @ApiMember(Description="Whether the newsletter was successfully sent")
    public var sent:Bool

    /**
    * The date when the newsletter was created
    */
    // @ApiMember(Description="The date when the newsletter was created")
    public var created:Date

    required public init(){}
}


Swift GDPRCustomerQuery 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 /gdpr/customers/{CustomerId} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GDPRCustomerQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Bookings>
    <GDPRCustomerBookingsResponse>
      <BookedBy>String</BookedBy>
      <BookedComments>String</BookedComments>
      <Comments>String</Comments>
      <CommentsToCustomer>String</CommentsToCustomer>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <From>0001-01-01T00:00:00</From>
      <Id>0</Id>
      <ServiceId>0</ServiceId>
      <StatusId>0</StatusId>
      <TextField1>String</TextField1>
      <TextField10>String</TextField10>
      <TextField11>String</TextField11>
      <TextField12>String</TextField12>
      <TextField13>String</TextField13>
      <TextField14>String</TextField14>
      <TextField15>String</TextField15>
      <TextField16>String</TextField16>
      <TextField17>String</TextField17>
      <TextField18>String</TextField18>
      <TextField19>String</TextField19>
      <TextField2>String</TextField2>
      <TextField20>String</TextField20>
      <TextField3>String</TextField3>
      <TextField4>String</TextField4>
      <TextField5>String</TextField5>
      <TextField6>String</TextField6>
      <TextField7>String</TextField7>
      <TextField8>String</TextField8>
      <TextField9>String</TextField9>
      <To>0001-01-01T00:00:00</To>
      <UnbookedComments>String</UnbookedComments>
      <UnbookedOn>0001-01-01T00:00:00</UnbookedOn>
      <UpdatedDate>0001-01-01T00:00:00</UpdatedDate>
    </GDPRCustomerBookingsResponse>
  </Bookings>
  <Customer>
    <Active>false</Active>
    <Created>0001-01-01T00:00:00</Created>
    <Email>String</Email>
    <FacebookUsername>String</FacebookUsername>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
    <TextField1>String</TextField1>
    <TextField10>String</TextField10>
    <TextField11>String</TextField11>
    <TextField12>String</TextField12>
    <TextField13>String</TextField13>
    <TextField14>String</TextField14>
    <TextField15>String</TextField15>
    <TextField16>String</TextField16>
    <TextField17>String</TextField17>
    <TextField18>String</TextField18>
    <TextField19>String</TextField19>
    <TextField2>String</TextField2>
    <TextField20>String</TextField20>
    <TextField3>String</TextField3>
    <TextField4>String</TextField4>
    <TextField5>String</TextField5>
    <TextField6>String</TextField6>
    <TextField7>String</TextField7>
    <TextField8>String</TextField8>
    <TextField9>String</TextField9>
    <Updated>0001-01-01T00:00:00</Updated>
    <UserId>00000000-0000-0000-0000-000000000000</UserId>
  </Customer>
  <CustomerComment>
    <GDPRCustomerCommentsResponse>
      <Comments>String</Comments>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Updated>0001-01-01T00:00:00</Updated>
    </GDPRCustomerCommentsResponse>
  </CustomerComment>
  <MessageLog>
    <GDPRCustomerMessageLogResponse>
      <BookingId>0</BookingId>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <CreatedBy>String</CreatedBy>
      <Id>0</Id>
      <MessageBody>String</MessageBody>
      <MessageTitle>String</MessageTitle>
      <Receiver>String</Receiver>
      <SendMethodId>0</SendMethodId>
      <Sender>String</Sender>
      <Sent>false</Sent>
      <SentDate>0001-01-01T00:00:00</SentDate>
    </GDPRCustomerMessageLogResponse>
  </MessageLog>
  <NewsletterLog>
    <GDPRCustomerNewsletterLogResponse>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Created>0001-01-01T00:00:00</Created>
      <Id>0</Id>
      <MessageBody>String</MessageBody>
      <MessageTitle>String</MessageTitle>
      <NewslettersId>0</NewslettersId>
      <Receiver>String</Receiver>
      <Sender>String</Sender>
      <Sent>false</Sent>
    </GDPRCustomerNewsletterLogResponse>
  </NewsletterLog>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <UserProfile>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <InvoiceAddress>
      <CorporateIdentityNumber>String</CorporateIdentityNumber>
      <InvoiceAddress1>String</InvoiceAddress1>
      <InvoiceAddress2>String</InvoiceAddress2>
      <InvoiceAddressId>00000000-0000-0000-0000-000000000000</InvoiceAddressId>
      <InvoiceCity>String</InvoiceCity>
      <InvoiceCountryCode>String</InvoiceCountryCode>
      <InvoicePostalCode>String</InvoicePostalCode>
      <UserId>00000000-0000-0000-0000-000000000000</UserId>
    </InvoiceAddress>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
  </UserProfile>
</GDPRCustomerQueryResponse>