Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /gdpr/customers/{CustomerId} | Get all customer information stored on the customer | Get all information stored on the customer |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
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 virtual Guid CompanyId { get; set; }
///<summary>
///The unique identifier of the booking
///</summary>
[ApiMember(Description="The unique identifier of the booking")]
public virtual int Id { get; set; }
///<summary>
///The customer ID associated with this booking
///</summary>
[ApiMember(Description="The customer ID associated with this booking")]
public virtual Guid CustomerId { get; set; }
///<summary>
///The service ID for this booking
///</summary>
[ApiMember(Description="The service ID for this booking")]
public virtual int ServiceId { get; set; }
///<summary>
///The current status of the booking
///</summary>
[ApiMember(Description="The current status of the booking")]
public virtual int StatusId { get; set; }
///<summary>
///The start date and time of the booking
///</summary>
[ApiMember(Description="The start date and time of the booking")]
public virtual DateTime From { get; set; }
///<summary>
///The end date and time of the booking
///</summary>
[ApiMember(Description="The end date and time of the booking")]
public virtual DateTime To { get; set; }
///<summary>
///The date when the booking was cancelled or unbooked
///</summary>
[ApiMember(Description="The date when the booking was cancelled or unbooked")]
public virtual DateTime? UnbookedOn { get; set; }
///<summary>
///Comments added when the booking was cancelled
///</summary>
[ApiMember(Description="Comments added when the booking was cancelled")]
public virtual string UnbookedComments { get; set; }
///<summary>
///Comments added when the booking was created
///</summary>
[ApiMember(Description="Comments added when the booking was created")]
public virtual string BookedComments { get; set; }
///<summary>
///The name of the person who made the booking
///</summary>
[ApiMember(Description="The name of the person who made the booking")]
public virtual string BookedBy { get; set; }
///<summary>
///General comments about the booking
///</summary>
[ApiMember(Description="General comments about the booking")]
public virtual string Comments { get; set; }
///<summary>
///Custom text field 1
///</summary>
[ApiMember(Description="Custom text field 1")]
public virtual string TextField1 { get; set; }
///<summary>
///Custom text field 2
///</summary>
[ApiMember(Description="Custom text field 2")]
public virtual string TextField2 { get; set; }
///<summary>
///Custom text field 3
///</summary>
[ApiMember(Description="Custom text field 3")]
public virtual string TextField3 { get; set; }
///<summary>
///Custom text field 4
///</summary>
[ApiMember(Description="Custom text field 4")]
public virtual string TextField4 { get; set; }
///<summary>
///Custom text field 5
///</summary>
[ApiMember(Description="Custom text field 5")]
public virtual string TextField5 { get; set; }
///<summary>
///Custom text field 6
///</summary>
[ApiMember(Description="Custom text field 6")]
public virtual string TextField6 { get; set; }
///<summary>
///Custom text field 7
///</summary>
[ApiMember(Description="Custom text field 7")]
public virtual string TextField7 { get; set; }
///<summary>
///Custom text field 8
///</summary>
[ApiMember(Description="Custom text field 8")]
public virtual string TextField8 { get; set; }
///<summary>
///Custom text field 9
///</summary>
[ApiMember(Description="Custom text field 9")]
public virtual string TextField9 { get; set; }
///<summary>
///Custom text field 10
///</summary>
[ApiMember(Description="Custom text field 10")]
public virtual string TextField10 { get; set; }
///<summary>
///Custom text field 11
///</summary>
[ApiMember(Description="Custom text field 11")]
public virtual string TextField11 { get; set; }
///<summary>
///Custom text field 12
///</summary>
[ApiMember(Description="Custom text field 12")]
public virtual string TextField12 { get; set; }
///<summary>
///Custom text field 13
///</summary>
[ApiMember(Description="Custom text field 13")]
public virtual string TextField13 { get; set; }
///<summary>
///Custom text field 14
///</summary>
[ApiMember(Description="Custom text field 14")]
public virtual string TextField14 { get; set; }
///<summary>
///Custom text field 15
///</summary>
[ApiMember(Description="Custom text field 15")]
public virtual string TextField15 { get; set; }
///<summary>
///Custom text field 16
///</summary>
[ApiMember(Description="Custom text field 16")]
public virtual string TextField16 { get; set; }
///<summary>
///Custom text field 17
///</summary>
[ApiMember(Description="Custom text field 17")]
public virtual string TextField17 { get; set; }
///<summary>
///Custom text field 18
///</summary>
[ApiMember(Description="Custom text field 18")]
public virtual string TextField18 { get; set; }
///<summary>
///Custom text field 19
///</summary>
[ApiMember(Description="Custom text field 19")]
public virtual string TextField19 { get; set; }
///<summary>
///Custom text field 20
///</summary>
[ApiMember(Description="Custom text field 20")]
public virtual string TextField20 { get; set; }
///<summary>
///The date when the booking was last updated
///</summary>
[ApiMember(Description="The date when the booking was last updated")]
public virtual DateTime UpdatedDate { get; set; }
///<summary>
///The date when the booking was created
///</summary>
[ApiMember(Description="The date when the booking was created")]
public virtual DateTime CreatedDate { get; set; }
///<summary>
///Comments sent to the customer about this booking
///</summary>
[ApiMember(Description="Comments sent to the customer about this booking")]
public virtual string CommentsToCustomer { get; set; }
}
public partial class GDPRCustomerCommentsResponse
{
///<summary>
///The company ID associated with this comment
///</summary>
[ApiMember(Description="The company ID associated with this comment")]
public virtual Guid CompanyId { get; set; }
///<summary>
///The unique identifier of the comment
///</summary>
[ApiMember(Description="The unique identifier of the comment")]
public virtual int Id { get; set; }
///<summary>
///The customer ID this comment is associated with
///</summary>
[ApiMember(Description="The customer ID this comment is associated with")]
public virtual Guid CustomerId { get; set; }
///<summary>
///The content of the comment
///</summary>
[ApiMember(Description="The content of the comment")]
public virtual string Comments { get; set; }
///<summary>
///The date when the comment was last updated
///</summary>
[ApiMember(Description="The date when the comment was last updated")]
public virtual DateTime Updated { get; set; }
///<summary>
///The date when the comment was created
///</summary>
[ApiMember(Description="The date when the comment was created")]
public virtual DateTime Created { get; set; }
///<summary>
///URL to any image associated with the comment
///</summary>
[ApiMember(Description="URL to any image associated with the comment")]
public virtual Uri ImageUrl { get; set; }
}
public partial class GDPRCustomerInfoResponse
{
///<summary>
///The unique identifier of the user
///</summary>
[ApiMember(Description="The unique identifier of the user")]
public virtual Guid UserId { get; set; }
///<summary>
///The user's first name
///</summary>
[ApiMember(Description="The user's first name")]
public virtual string Firstname { get; set; }
///<summary>
///The user's last name
///</summary>
[ApiMember(Description="The user's last name")]
public virtual string Lastname { get; set; }
///<summary>
///The user's phone number
///</summary>
[ApiMember(Description="The user's phone number")]
public virtual string Phone { get; set; }
///<summary>
///The user's email address
///</summary>
[ApiMember(Description="The user's email address")]
public virtual string Email { get; set; }
///<summary>
///Whether the user account is currently active
///</summary>
[ApiMember(Description="Whether the user account is currently active")]
public virtual bool Active { get; set; }
///<summary>
///The user's Facebook username
///</summary>
[ApiMember(Description="The user's Facebook username")]
public virtual string FacebookUsername { get; set; }
///<summary>
///Custom text field 1
///</summary>
[ApiMember(Description="Custom text field 1")]
public virtual string TextField1 { get; set; }
///<summary>
///Custom text field 2
///</summary>
[ApiMember(Description="Custom text field 2")]
public virtual string TextField2 { get; set; }
///<summary>
///Custom text field 3
///</summary>
[ApiMember(Description="Custom text field 3")]
public virtual string TextField3 { get; set; }
///<summary>
///Custom text field 4
///</summary>
[ApiMember(Description="Custom text field 4")]
public virtual string TextField4 { get; set; }
///<summary>
///Custom text field 5
///</summary>
[ApiMember(Description="Custom text field 5")]
public virtual string TextField5 { get; set; }
///<summary>
///Custom text field 6
///</summary>
[ApiMember(Description="Custom text field 6")]
public virtual string TextField6 { get; set; }
///<summary>
///Custom text field 7
///</summary>
[ApiMember(Description="Custom text field 7")]
public virtual string TextField7 { get; set; }
///<summary>
///Custom text field 8
///</summary>
[ApiMember(Description="Custom text field 8")]
public virtual string TextField8 { get; set; }
///<summary>
///Custom text field 9
///</summary>
[ApiMember(Description="Custom text field 9")]
public virtual string TextField9 { get; set; }
///<summary>
///Custom text field 10
///</summary>
[ApiMember(Description="Custom text field 10")]
public virtual string TextField10 { get; set; }
///<summary>
///Custom text field 11
///</summary>
[ApiMember(Description="Custom text field 11")]
public virtual string TextField11 { get; set; }
///<summary>
///Custom text field 12
///</summary>
[ApiMember(Description="Custom text field 12")]
public virtual string TextField12 { get; set; }
///<summary>
///Custom text field 13
///</summary>
[ApiMember(Description="Custom text field 13")]
public virtual string TextField13 { get; set; }
///<summary>
///Custom text field 14
///</summary>
[ApiMember(Description="Custom text field 14")]
public virtual string TextField14 { get; set; }
///<summary>
///Custom text field 15
///</summary>
[ApiMember(Description="Custom text field 15")]
public virtual string TextField15 { get; set; }
///<summary>
///Custom text field 16
///</summary>
[ApiMember(Description="Custom text field 16")]
public virtual string TextField16 { get; set; }
///<summary>
///Custom text field 17
///</summary>
[ApiMember(Description="Custom text field 17")]
public virtual string TextField17 { get; set; }
///<summary>
///Custom text field 18
///</summary>
[ApiMember(Description="Custom text field 18")]
public virtual string TextField18 { get; set; }
///<summary>
///Custom text field 19
///</summary>
[ApiMember(Description="Custom text field 19")]
public virtual string TextField19 { get; set; }
///<summary>
///Custom text field 20
///</summary>
[ApiMember(Description="Custom text field 20")]
public virtual string TextField20 { get; set; }
///<summary>
///The date when the customer information was last updated
///</summary>
[ApiMember(Description="The date when the customer information was last updated")]
public virtual DateTime Updated { get; set; }
///<summary>
///The date when the customer information was created
///</summary>
[ApiMember(Description="The date when the customer information was created")]
public virtual DateTime Created { get; set; }
}
public partial class GDPRCustomerMessageLogResponse
{
///<summary>
///The company ID associated with this message
///</summary>
[ApiMember(Description="The company ID associated with this message")]
public virtual Guid CompanyId { get; set; }
///<summary>
///The unique identifier of the message
///</summary>
[ApiMember(Description="The unique identifier of the message")]
public virtual int Id { get; set; }
///<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 virtual int? BookingId { get; set; }
///<summary>
///The recipient of the message
///</summary>
[ApiMember(Description="The recipient of the message")]
public virtual string Receiver { get; set; }
///<summary>
///The sender of the message
///</summary>
[ApiMember(Description="The sender of the message")]
public virtual string Sender { get; set; }
///<summary>
///The title or subject of the message
///</summary>
[ApiMember(Description="The title or subject of the message")]
public virtual string MessageTitle { get; set; }
///<summary>
///The body content of the message
///</summary>
[ApiMember(Description="The body content of the message")]
public virtual string MessageBody { get; set; }
///<summary>
///The name of the person who created the message
///</summary>
[ApiMember(Description="The name of the person who created the message")]
public virtual string CreatedBy { get; set; }
///<summary>
///The date when the message was created
///</summary>
[ApiMember(Description="The date when the message was created")]
public virtual DateTime Created { get; set; }
///<summary>
///Whether the message was successfully sent
///</summary>
[ApiMember(Description="Whether the message was successfully sent")]
public virtual bool Sent { get; set; }
///<summary>
///The date when the message was sent
///</summary>
[ApiMember(Description="The date when the message was sent")]
public virtual DateTime? SentDate { get; set; }
///<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 virtual int SendMethodId { get; set; }
}
public partial class GDPRCustomerNewsletterLogResponse
{
///<summary>
///The company ID associated with this newsletter
///</summary>
[ApiMember(Description="The company ID associated with this newsletter")]
public virtual Guid CompanyId { get; set; }
///<summary>
///The unique identifier of the newsletter log entry
///</summary>
[ApiMember(Description="The unique identifier of the newsletter log entry")]
public virtual int Id { get; set; }
///<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 virtual int? NewslettersId { get; set; }
///<summary>
///The recipient of the newsletter
///</summary>
[ApiMember(Description="The recipient of the newsletter")]
public virtual string Receiver { get; set; }
///<summary>
///The sender of the newsletter
///</summary>
[ApiMember(Description="The sender of the newsletter")]
public virtual string Sender { get; set; }
///<summary>
///The title or subject of the newsletter
///</summary>
[ApiMember(Description="The title or subject of the newsletter")]
public virtual string MessageTitle { get; set; }
///<summary>
///The body content of the newsletter
///</summary>
[ApiMember(Description="The body content of the newsletter")]
public virtual string MessageBody { get; set; }
///<summary>
///Whether the newsletter was successfully sent
///</summary>
[ApiMember(Description="Whether the newsletter was successfully sent")]
public virtual bool Sent { get; set; }
///<summary>
///The date when the newsletter was created
///</summary>
[ApiMember(Description="The date when the newsletter was created")]
public virtual DateTime Created { get; set; }
}
[ValidateRequest("IsAuthenticated")]
public partial class GDPRCustomerQuery
: 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 virtual Guid? CompanyId { get; set; }
///<summary>
///Id of the customer
///</summary>
[ApiMember(Description="Id of the customer", IsRequired=true, ParameterType="path")]
public virtual Guid CustomerId { get; set; }
}
public partial class GDPRCustomerQueryResponse
{
public GDPRCustomerQueryResponse()
{
Bookings = new List<GDPRCustomerBookingsResponse>{};
MessageLog = new List<GDPRCustomerMessageLogResponse>{};
CustomerComment = new List<GDPRCustomerCommentsResponse>{};
NewsletterLog = new List<GDPRCustomerNewsletterLogResponse>{};
}
///<summary>
///List of all bookings associated with the customer
///</summary>
[ApiMember(Description="List of all bookings associated with the customer")]
public virtual List<GDPRCustomerBookingsResponse> Bookings { get; set; }
///<summary>
///List of all message logs associated with the customer
///</summary>
[ApiMember(Description="List of all message logs associated with the customer")]
public virtual List<GDPRCustomerMessageLogResponse> MessageLog { get; set; }
///<summary>
///The user profile information for the customer
///</summary>
[ApiMember(Description="The user profile information for the customer")]
public virtual UserProfileResponse UserProfile { get; set; }
///<summary>
///Detailed customer information
///</summary>
[ApiMember(Description="Detailed customer information")]
public virtual GDPRCustomerInfoResponse Customer { get; set; }
///<summary>
///List of all comments associated with the customer
///</summary>
[ApiMember(Description="List of all comments associated with the customer")]
public virtual List<GDPRCustomerCommentsResponse> CustomerComment { get; set; }
///<summary>
///List of all newsletter logs associated with the customer
///</summary>
[ApiMember(Description="List of all newsletter logs associated with the customer")]
public virtual List<GDPRCustomerNewsletterLogResponse> NewsletterLog { get; set; }
///<summary>
///Response status information
///</summary>
[ApiMember(Description="Response status information")]
public virtual ResponseStatus ResponseStatus { get; set; }
}
public partial class InvoiceAddressResponse
{
public virtual Guid InvoiceAddressId { get; set; }
public virtual Guid? UserId { get; set; }
public virtual string CorporateIdentityNumber { get; set; }
public virtual string InvoiceAddress1 { get; set; }
public virtual string InvoiceAddress2 { get; set; }
public virtual string InvoiceCity { get; set; }
public virtual string InvoicePostalCode { get; set; }
public virtual string InvoiceCountryCode { get; set; }
}
public partial class UserProfileResponse
{
public virtual Guid Id { get; set; }
public virtual string Firstname { get; set; }
public virtual string Lastname { get; set; }
public virtual string Phone { get; set; }
public virtual string Email { get; set; }
public virtual InvoiceAddressResponse InvoiceAddress { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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: api.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>