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 |
---|
"use strict";
export class GDPRCustomerBookingsResponse {
/** @param {{CompanyId?:string,Id?:number,CustomerId?:string,ServiceId?:number,StatusId?:number,From?:string,To?:string,UnbookedOn?:string,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,UpdatedDate?:string,CreatedDate?:string,CommentsToCustomer?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company ID associated with this booking */
CompanyId;
/**
* @type {number}
* @description The unique identifier of the booking */
Id;
/**
* @type {string}
* @description The customer ID associated with this booking */
CustomerId;
/**
* @type {number}
* @description The service ID for this booking */
ServiceId;
/**
* @type {number}
* @description The current status of the booking */
StatusId;
/**
* @type {string}
* @description The start date and time of the booking */
From;
/**
* @type {string}
* @description The end date and time of the booking */
To;
/**
* @type {?string}
* @description The date when the booking was cancelled or unbooked */
UnbookedOn;
/**
* @type {string}
* @description Comments added when the booking was cancelled */
UnbookedComments;
/**
* @type {string}
* @description Comments added when the booking was created */
BookedComments;
/**
* @type {string}
* @description The name of the person who made the booking */
BookedBy;
/**
* @type {string}
* @description General comments about the booking */
Comments;
/**
* @type {string}
* @description Custom text field 1 */
TextField1;
/**
* @type {string}
* @description Custom text field 2 */
TextField2;
/**
* @type {string}
* @description Custom text field 3 */
TextField3;
/**
* @type {string}
* @description Custom text field 4 */
TextField4;
/**
* @type {string}
* @description Custom text field 5 */
TextField5;
/**
* @type {string}
* @description Custom text field 6 */
TextField6;
/**
* @type {string}
* @description Custom text field 7 */
TextField7;
/**
* @type {string}
* @description Custom text field 8 */
TextField8;
/**
* @type {string}
* @description Custom text field 9 */
TextField9;
/**
* @type {string}
* @description Custom text field 10 */
TextField10;
/**
* @type {string}
* @description Custom text field 11 */
TextField11;
/**
* @type {string}
* @description Custom text field 12 */
TextField12;
/**
* @type {string}
* @description Custom text field 13 */
TextField13;
/**
* @type {string}
* @description Custom text field 14 */
TextField14;
/**
* @type {string}
* @description Custom text field 15 */
TextField15;
/**
* @type {string}
* @description Custom text field 16 */
TextField16;
/**
* @type {string}
* @description Custom text field 17 */
TextField17;
/**
* @type {string}
* @description Custom text field 18 */
TextField18;
/**
* @type {string}
* @description Custom text field 19 */
TextField19;
/**
* @type {string}
* @description Custom text field 20 */
TextField20;
/**
* @type {string}
* @description The date when the booking was last updated */
UpdatedDate;
/**
* @type {string}
* @description The date when the booking was created */
CreatedDate;
/**
* @type {string}
* @description Comments sent to the customer about this booking */
CommentsToCustomer;
}
export class GDPRCustomerMessageLogResponse {
/** @param {{CompanyId?:string,Id?:number,BookingId?:number,Receiver?:string,Sender?:string,MessageTitle?:string,MessageBody?:string,CreatedBy?:string,Created?:string,Sent?:boolean,SentDate?:string,SendMethodId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company ID associated with this message */
CompanyId;
/**
* @type {number}
* @description The unique identifier of the message */
Id;
/**
* @type {?number}
* @description The booking ID this message is related to, if any */
BookingId;
/**
* @type {string}
* @description The recipient of the message */
Receiver;
/**
* @type {string}
* @description The sender of the message */
Sender;
/**
* @type {string}
* @description The title or subject of the message */
MessageTitle;
/**
* @type {string}
* @description The body content of the message */
MessageBody;
/**
* @type {string}
* @description The name of the person who created the message */
CreatedBy;
/**
* @type {string}
* @description The date when the message was created */
Created;
/**
* @type {boolean}
* @description Whether the message was successfully sent */
Sent;
/**
* @type {?string}
* @description The date when the message was sent */
SentDate;
/**
* @type {number}
* @description The method used to send the message (e.g., email, SMS) */
SendMethodId;
}
export class InvoiceAddressResponse {
/** @param {{InvoiceAddressId?:string,UserId?:string,CorporateIdentityNumber?:string,InvoiceAddress1?:string,InvoiceAddress2?:string,InvoiceCity?:string,InvoicePostalCode?:string,InvoiceCountryCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
InvoiceAddressId;
/** @type {?string} */
UserId;
/** @type {string} */
CorporateIdentityNumber;
/** @type {string} */
InvoiceAddress1;
/** @type {string} */
InvoiceAddress2;
/** @type {string} */
InvoiceCity;
/** @type {string} */
InvoicePostalCode;
/** @type {string} */
InvoiceCountryCode;
}
export class UserProfileResponse {
/** @param {{Id?:string,Firstname?:string,Lastname?:string,Phone?:string,Email?:string,InvoiceAddress?:InvoiceAddressResponse}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Firstname;
/** @type {string} */
Lastname;
/** @type {string} */
Phone;
/** @type {string} */
Email;
/** @type {InvoiceAddressResponse} */
InvoiceAddress;
}
export class GDPRCustomerInfoResponse {
/** @param {{UserId?:string,Firstname?:string,Lastname?:string,Phone?:string,Email?:string,Active?:boolean,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,Updated?:string,Created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The unique identifier of the user */
UserId;
/**
* @type {string}
* @description The user's first name */
Firstname;
/**
* @type {string}
* @description The user's last name */
Lastname;
/**
* @type {string}
* @description The user's phone number */
Phone;
/**
* @type {string}
* @description The user's email address */
Email;
/**
* @type {boolean}
* @description Whether the user account is currently active */
Active;
/**
* @type {string}
* @description The user's Facebook username */
FacebookUsername;
/**
* @type {string}
* @description Custom text field 1 */
TextField1;
/**
* @type {string}
* @description Custom text field 2 */
TextField2;
/**
* @type {string}
* @description Custom text field 3 */
TextField3;
/**
* @type {string}
* @description Custom text field 4 */
TextField4;
/**
* @type {string}
* @description Custom text field 5 */
TextField5;
/**
* @type {string}
* @description Custom text field 6 */
TextField6;
/**
* @type {string}
* @description Custom text field 7 */
TextField7;
/**
* @type {string}
* @description Custom text field 8 */
TextField8;
/**
* @type {string}
* @description Custom text field 9 */
TextField9;
/**
* @type {string}
* @description Custom text field 10 */
TextField10;
/**
* @type {string}
* @description Custom text field 11 */
TextField11;
/**
* @type {string}
* @description Custom text field 12 */
TextField12;
/**
* @type {string}
* @description Custom text field 13 */
TextField13;
/**
* @type {string}
* @description Custom text field 14 */
TextField14;
/**
* @type {string}
* @description Custom text field 15 */
TextField15;
/**
* @type {string}
* @description Custom text field 16 */
TextField16;
/**
* @type {string}
* @description Custom text field 17 */
TextField17;
/**
* @type {string}
* @description Custom text field 18 */
TextField18;
/**
* @type {string}
* @description Custom text field 19 */
TextField19;
/**
* @type {string}
* @description Custom text field 20 */
TextField20;
/**
* @type {string}
* @description The date when the customer information was last updated */
Updated;
/**
* @type {string}
* @description The date when the customer information was created */
Created;
}
export class GDPRCustomerCommentsResponse {
/** @param {{CompanyId?:string,Id?:number,CustomerId?:string,Comments?:string,Updated?:string,Created?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company ID associated with this comment */
CompanyId;
/**
* @type {number}
* @description The unique identifier of the comment */
Id;
/**
* @type {string}
* @description The customer ID this comment is associated with */
CustomerId;
/**
* @type {string}
* @description The content of the comment */
Comments;
/**
* @type {string}
* @description The date when the comment was last updated */
Updated;
/**
* @type {string}
* @description The date when the comment was created */
Created;
/**
* @type {string}
* @description URL to any image associated with the comment */
ImageUrl;
}
export class GDPRCustomerNewsletterLogResponse {
/** @param {{CompanyId?:string,Id?:number,NewslettersId?:number,Receiver?:string,Sender?:string,MessageTitle?:string,MessageBody?:string,Sent?:boolean,Created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company ID associated with this newsletter */
CompanyId;
/**
* @type {number}
* @description The unique identifier of the newsletter log entry */
Id;
/**
* @type {?number}
* @description The newsletter ID this log entry is related to, if any */
NewslettersId;
/**
* @type {string}
* @description The recipient of the newsletter */
Receiver;
/**
* @type {string}
* @description The sender of the newsletter */
Sender;
/**
* @type {string}
* @description The title or subject of the newsletter */
MessageTitle;
/**
* @type {string}
* @description The body content of the newsletter */
MessageBody;
/**
* @type {boolean}
* @description Whether the newsletter was successfully sent */
Sent;
/**
* @type {string}
* @description The date when the newsletter was created */
Created;
}
export class GDPRCustomerQueryResponse {
/** @param {{Bookings?:GDPRCustomerBookingsResponse[],MessageLog?:GDPRCustomerMessageLogResponse[],UserProfile?:UserProfileResponse,Customer?:GDPRCustomerInfoResponse,CustomerComment?:GDPRCustomerCommentsResponse[],NewsletterLog?:GDPRCustomerNewsletterLogResponse[],ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {GDPRCustomerBookingsResponse[]}
* @description List of all bookings associated with the customer */
Bookings;
/**
* @type {GDPRCustomerMessageLogResponse[]}
* @description List of all message logs associated with the customer */
MessageLog;
/**
* @type {UserProfileResponse}
* @description The user profile information for the customer */
UserProfile;
/**
* @type {GDPRCustomerInfoResponse}
* @description Detailed customer information */
Customer;
/**
* @type {GDPRCustomerCommentsResponse[]}
* @description List of all comments associated with the customer */
CustomerComment;
/**
* @type {GDPRCustomerNewsletterLogResponse[]}
* @description List of all newsletter logs associated with the customer */
NewsletterLog;
/**
* @type {ResponseStatus}
* @description Response status information */
ResponseStatus;
}
export class GDPRCustomerQuery {
/** @param {{CompanyId?:string,CustomerId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @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 */
CompanyId;
/**
* @type {string}
* @description Id of the customer */
CustomerId;
}
JavaScript GDPRCustomerQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
HTTP/1.1 200 OK Content-Type: text/jsv 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 } } }