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

export class GDPRCustomerBookingsResponse
{
    public CompanyId: string;
    public Id: number;
    public CustomerId: string;
    public ServiceId: number;
    public StatusId: number;
    public From: string;
    public To: string;
    public UnbookedOn?: string;
    public UnbookedComments: string;
    public BookedComments: string;
    public BookedBy: string;
    public Comments: string;
    public TextField1: string;
    public TextField2: string;
    public TextField3: string;
    public TextField4: string;
    public TextField5: string;
    public TextField6: string;
    public TextField7: string;
    public TextField8: string;
    public TextField9: string;
    public TextField10: string;
    public TextField11: string;
    public TextField12: string;
    public TextField13: string;
    public TextField14: string;
    public TextField15: string;
    public TextField16: string;
    public TextField17: string;
    public TextField18: string;
    public TextField19: string;
    public TextField20: string;
    public UpdatedDate: string;
    public CreatedDate: string;
    public CommentsToCustomer: string;

    public constructor(init?: Partial<GDPRCustomerBookingsResponse>) { (Object as any).assign(this, init); }
}

export class GDPRCustomerMessageLogResponse
{
    public CompanyId: string;
    public Id: number;
    public BookingId?: number;
    public Receiver: string;
    public Sender: string;
    public MessageTitle: string;
    public MessageBody: string;
    public CreatedBy: string;
    public Created: string;
    public Sent: boolean;
    public SentDate?: string;
    public SendMethodId: number;

    public constructor(init?: Partial<GDPRCustomerMessageLogResponse>) { (Object as any).assign(this, init); }
}

export class UserProfileResponse
{
    public Id: string;
    public Firstname: string;
    public Lastname: string;
    public Phone: string;
    public Email: string;

    public constructor(init?: Partial<UserProfileResponse>) { (Object as any).assign(this, init); }
}

export class GDPRCustomerInfoResponse
{
    public UserId: string;
    public Firstname: string;
    public Lastname: string;
    public Phone: string;
    public Email: string;
    public Active: boolean;
    public FacebookUsername: string;
    public TextField1: string;
    public TextField2: string;
    public TextField3: string;
    public TextField4: string;
    public TextField5: string;
    public TextField6: string;
    public TextField7: string;
    public TextField8: string;
    public TextField9: string;
    public TextField10: string;
    public TextField11: string;
    public TextField12: string;
    public TextField13: string;
    public TextField14: string;
    public TextField15: string;
    public TextField16: string;
    public TextField17: string;
    public TextField18: string;
    public TextField19: string;
    public TextField20: string;
    public Updated: string;
    public Created: string;

    public constructor(init?: Partial<GDPRCustomerInfoResponse>) { (Object as any).assign(this, init); }
}

export class GDPRCustomerCommentsResponse
{
    public CompanyId: string;
    public Id: number;
    public CustomerId: string;
    public Comments: string;
    public Updated: string;
    public Created: string;
    public ImageUrl: string;

    public constructor(init?: Partial<GDPRCustomerCommentsResponse>) { (Object as any).assign(this, init); }
}

export class GDPRCustomerNewsletterLogResponse
{
    public CompanyId: string;
    public Id: number;
    public NewslettersId?: number;
    public Receiver: string;
    public Sender: string;
    public MessageTitle: string;
    public MessageBody: string;
    public Sent: boolean;
    public Created: string;

    public constructor(init?: Partial<GDPRCustomerNewsletterLogResponse>) { (Object as any).assign(this, init); }
}

export class GDPRCustomerQueryResponse
{
    public Bookings: GDPRCustomerBookingsResponse[];
    public MessageLog: GDPRCustomerMessageLogResponse[];
    public UserProfile: UserProfileResponse;
    public Customer: GDPRCustomerInfoResponse;
    public CustomerComment: GDPRCustomerCommentsResponse[];
    public NewsletterLog: GDPRCustomerNewsletterLogResponse[];
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<GDPRCustomerQueryResponse>) { (Object as any).assign(this, init); }
}

// @ValidateRequest(Validator="IsAuthenticated")
export class GDPRCustomerQuery implements ICompany
{
    /** @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  */
    // @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 CompanyId: string;

    /** @description Id of the customer */
    // @ApiMember(Description="Id of the customer", IsRequired=true, ParameterType="path")
    public CustomerId: string;

    public constructor(init?: Partial<GDPRCustomerQuery>) { (Object as any).assign(this, init); }
}

TypeScript 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: 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"}}}