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
{
public virtual Guid CompanyId { get; set; }
public virtual int Id { get; set; }
public virtual Guid CustomerId { get; set; }
public virtual int ServiceId { get; set; }
public virtual int StatusId { get; set; }
public virtual DateTime From { get; set; }
public virtual DateTime To { get; set; }
public virtual DateTime? UnbookedOn { get; set; }
public virtual string UnbookedComments { get; set; }
public virtual string BookedComments { get; set; }
public virtual string BookedBy { get; set; }
public virtual string Comments { get; set; }
public virtual string TextField1 { get; set; }
public virtual string TextField2 { get; set; }
public virtual string TextField3 { get; set; }
public virtual string TextField4 { get; set; }
public virtual string TextField5 { get; set; }
public virtual string TextField6 { get; set; }
public virtual string TextField7 { get; set; }
public virtual string TextField8 { get; set; }
public virtual string TextField9 { get; set; }
public virtual string TextField10 { get; set; }
public virtual string TextField11 { get; set; }
public virtual string TextField12 { get; set; }
public virtual string TextField13 { get; set; }
public virtual string TextField14 { get; set; }
public virtual string TextField15 { get; set; }
public virtual string TextField16 { get; set; }
public virtual string TextField17 { get; set; }
public virtual string TextField18 { get; set; }
public virtual string TextField19 { get; set; }
public virtual string TextField20 { get; set; }
public virtual DateTime UpdatedDate { get; set; }
public virtual DateTime CreatedDate { get; set; }
public virtual string CommentsToCustomer { get; set; }
}
public partial class GDPRCustomerCommentsResponse
{
public virtual Guid CompanyId { get; set; }
public virtual int Id { get; set; }
public virtual Guid CustomerId { get; set; }
public virtual string Comments { get; set; }
public virtual DateTime Updated { get; set; }
public virtual DateTime Created { get; set; }
public virtual Uri ImageUrl { get; set; }
}
public partial class GDPRCustomerInfoResponse
{
public virtual Guid UserId { 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 bool Active { get; set; }
public virtual string FacebookUsername { get; set; }
public virtual string TextField1 { get; set; }
public virtual string TextField2 { get; set; }
public virtual string TextField3 { get; set; }
public virtual string TextField4 { get; set; }
public virtual string TextField5 { get; set; }
public virtual string TextField6 { get; set; }
public virtual string TextField7 { get; set; }
public virtual string TextField8 { get; set; }
public virtual string TextField9 { get; set; }
public virtual string TextField10 { get; set; }
public virtual string TextField11 { get; set; }
public virtual string TextField12 { get; set; }
public virtual string TextField13 { get; set; }
public virtual string TextField14 { get; set; }
public virtual string TextField15 { get; set; }
public virtual string TextField16 { get; set; }
public virtual string TextField17 { get; set; }
public virtual string TextField18 { get; set; }
public virtual string TextField19 { get; set; }
public virtual string TextField20 { get; set; }
public virtual DateTime Updated { get; set; }
public virtual DateTime Created { get; set; }
}
public partial class GDPRCustomerMessageLogResponse
{
public virtual Guid CompanyId { get; set; }
public virtual int Id { get; set; }
public virtual int? BookingId { get; set; }
public virtual string Receiver { get; set; }
public virtual string Sender { get; set; }
public virtual string MessageTitle { get; set; }
public virtual string MessageBody { get; set; }
public virtual string CreatedBy { get; set; }
public virtual DateTime Created { get; set; }
public virtual bool Sent { get; set; }
public virtual DateTime? SentDate { get; set; }
public virtual int SendMethodId { get; set; }
}
public partial class GDPRCustomerNewsletterLogResponse
{
public virtual Guid CompanyId { get; set; }
public virtual int Id { get; set; }
public virtual int? NewslettersId { get; set; }
public virtual string Receiver { get; set; }
public virtual string Sender { get; set; }
public virtual string MessageTitle { get; set; }
public virtual string MessageBody { get; set; }
public virtual bool Sent { get; set; }
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>{};
}
public virtual List<GDPRCustomerBookingsResponse> Bookings { get; set; }
public virtual List<GDPRCustomerMessageLogResponse> MessageLog { get; set; }
public virtual UserProfileResponse UserProfile { get; set; }
public virtual GDPRCustomerInfoResponse Customer { get; set; }
public virtual List<GDPRCustomerCommentsResponse> CustomerComment { get; set; }
public virtual List<GDPRCustomerNewsletterLogResponse> NewsletterLog { get; set; }
public virtual ResponseStatus ResponseStatus { 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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=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: api.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"},"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"}}}