GET | /users | Get user information | Get information about the currently logged in user |
---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type CodeLockSystemType =
| Sample = 0
| RcoM5 = 1
| AxemaVaka = 2
| VanderbiltOmnis = 3
| ParakeyParakey = 4
| AmidoDax = 5
| TelkeyTelkey = 6
| TechSolutionsSiedle = 7
| Accessy = 8
| Zesec = 9
| Enabla = 10
[<AllowNullLiteral>]
type CompanyBookingSettings() =
member val EnableMobileApp:Boolean = new Boolean() with get,set
member val BookingReceiptMessage:String = null with get,set
member val ShowFreeTimesLeft:Boolean = new Boolean() with get,set
member val EnableShowBookedTimes:Boolean = new Boolean() with get,set
member val BookingAgreement:String = null with get,set
///<summary>
///The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber
///</summary>
[<ApiMember(DataType="int", Description="The settings for how to display week number. 1 = ShowWeekNumberFromDate, 2 = ShowWeekNumberToDate, 3 = ShowWeekNumberFromToDate, 4 = DontShowWeekNumber ")>]
member val WeekNumberSetting:Int32 = new Int32() with get,set
member val ShowBookedTimes:Boolean = new Boolean() with get,set
///<summary>
///The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings
///</summary>
[<ApiMember(Description="The payment provider id. 1 = Payson Checkout 1.0, 2= Payson Checkout 2.0 ... To get the full payment provider for the company call GET /payment/settings")>]
member val PaymentProviderId:Int32 = new Int32() with get,set
///<summary>
///If it's only allowed for existing customers to book
///</summary>
[<ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")>]
member val BookOnlyOnExistingCustomers:Boolean = new Boolean() with get,set
///<summary>
///If payment is enabled
///</summary>
[<ApiMember(DataType="boolean", Description="If payment is enabled")>]
member val PaymentEnabled:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type CompanySystemSettings() =
///<summary>
///If the booking is active or not
///</summary>
[<ApiMember(DataType="bool", Description="If the booking is active or not")>]
member val Active:Boolean = new Boolean() with get,set
///<summary>
///If the booking is not active, what message to show to the customers
///</summary>
[<ApiMember(DataType="string", Description="If the booking is not active, what message to show to the customers")>]
member val InactiveMessage:String = null with get,set
///<summary>
///If the company should be visible in search results on hompage
///</summary>
[<ApiMember(DataType="bool", Description="If the company should be visible in search results on hompage")>]
member val Searchable:Boolean = new Boolean() with get,set
///<summary>
///If you have a google analytics account and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a google analytics account and want to track your customers behaviors.")>]
member val GATrackingId:String = null with get,set
///<summary>
///If you have a google Ads Conversion Id account and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a google Ads Conversion Id account and want to track your customers behaviors.")>]
member val GoogleAdsConversionId:String = null with get,set
///<summary>
///If you have a LinkedIn account and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a LinkedIn account and want to track your customers behaviors.")>]
member val LinkedinTagId:String = null with get,set
///<summary>
///If you have a Google Ads Conversion Label and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a Google Ads Conversion Label and want to track your customers behaviors.")>]
member val GoogleAdsConversionLabel:String = null with get,set
///<summary>
///If you have a google tag manager account and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a google tag manager account and want to track your customers behaviors.")>]
member val GTMTrackingId:String = null with get,set
///<summary>
///If you have a facebook account and want to track your customers behaviors.
///</summary>
[<ApiMember(DataType="string", Description="If you have a facebook account and want to track your customers behaviors.")>]
member val FacebookPixelId:String = null with get,set
///<summary>
///If you want your customers to be albe to change language on your homepage
///</summary>
[<ApiMember(DataType="bool", Description="If you want your customers to be albe to change language on your homepage")>]
member val MultiLanguage:Boolean = new Boolean() with get,set
///<summary>
///If the company should be visible on the marketplace
///</summary>
[<ApiMember(DataType="bool", Description="If the company should be visible on the marketplace")>]
member val ShowOnMarketplace:Boolean = new Boolean() with get,set
///<summary>
///If you want your own written text on your homepage to be translated using google analytics when a user changes language
///</summary>
[<ApiMember(DataType="bool", Description="If you want your own written text on your homepage to be translated using google analytics when a user changes language")>]
member val EnableAPITranslation:Boolean = new Boolean() with get,set
///<summary>
///What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN
///</summary>
[<ApiMember(DataType="string", Description="What is the standard language your homepage information is written in. Select from the different countries, ie. SE,NO,EN")>]
member val DefaultLanguage:String = null with get,set
///<summary>
///If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR.
///</summary>
[<ApiMember(Description="If you want to allow to send customer information in the tracking events to the external providers. Note you as a company are responsible for informing your customers and handling the data in terms of GDPR. ")>]
member val SendCustomerInformationToExternalProviders:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type CompanyWidgetSettings() =
///<summary>
///The service layouts id.
///</summary>
[<ApiMember(Description="The service layouts id.")>]
member val ServiceLayoutId:Int32 = new Int32() with get,set
///<summary>
///The time layouts id.
///</summary>
[<ApiMember(Description="The time layouts id.")>]
member val TimeLayoutId:Int32 = new Int32() with get,set
///<summary>
///The booking layouts id.
///</summary>
[<ApiMember(Description="The booking layouts id.")>]
member val BookingLayoutId:Int32 = new Int32() with get,set
///<summary>
///The primary color of the booking widget.
///</summary>
[<ApiMember(Description="The primary color of the booking widget.")>]
member val PrimaryColor:String = null with get,set
///<summary>
///If you should show the service image in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the service image in the booking widget.")>]
member val ShowServiceImage:Boolean = new Boolean() with get,set
///<summary>
///If you should show the rebate code field in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the rebate code field in the booking widget.")>]
member val ShowRebateCodeField:Boolean = new Boolean() with get,set
///<summary>
///If you should show the next available time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the next available time in the booking widget.")>]
member val ShowNextAvailableTime:Boolean = new Boolean() with get,set
///<summary>
///If you should show the end time in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the end time in the booking widget.")>]
member val ShowEndTime:Boolean = new Boolean() with get,set
///<summary>
///What text to show on booked time slots. Default text is Booked
///</summary>
[<ApiMember(Description="What text to show on booked time slots. Default text is Booked")>]
member val BookedTimeSlotText:String = null with get,set
///<summary>
///If the widget should be displayed in dark theme
///</summary>
[<ApiMember(Description="If the widget should be displayed in dark theme")>]
member val DarkTheme:Boolean = new Boolean() with get,set
///<summary>
///If you should show the subscribe to newsletter checkbox in the booking widget.
///</summary>
[<ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")>]
member val ShowSubscribeToNewsletter:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type HomepageSettingsResponse() =
///<summary>
///The text for homepage heading
///</summary>
[<ApiMember(Description="The text for homepage heading")>]
member val HomepageHeading:String = null with get,set
///<summary>
///The text for homepage startpage heading
///</summary>
[<ApiMember(Description="The text for homepage startpage heading")>]
member val WelcomePageHeading:String = null with get,set
///<summary>
///The text for homepage startpage body
///</summary>
[<ApiMember(Description="The text for homepage startpage body")>]
member val WelcomePageBody:String = null with get,set
///<summary>
///The text for homepage about us page heading
///</summary>
[<ApiMember(Description="The text for homepage about us page heading")>]
member val AboutUsPageHeading:String = null with get,set
///<summary>
///The text for homepage about us page body
///</summary>
[<ApiMember(Description="The text for homepage about us page body")>]
member val AboutUsPageBody:String = null with get,set
///<summary>
///The startpage image url
///</summary>
[<ApiMember(Description="The startpage image url")>]
member val ImageUrl:Uri = null with get,set
///<summary>
///The cover image url
///</summary>
[<ApiMember(Description="The cover image url")>]
member val CoverImage:Uri = null with get,set
///<summary>
///Show rating on the page
///</summary>
[<ApiMember(Description="Show rating on the page")>]
member val ShowRating:Boolean = new Boolean() with get,set
///<summary>
///The template for the homepage
///</summary>
[<ApiMember(Description="The template for the homepage")>]
member val HomePageTemplateId:Int32 = new Int32() with get,set
///<summary>
///The hero section style for the homepage
///</summary>
[<ApiMember(Description="The hero section style for the homepage")>]
member val HeroSectionStyleId:Int32 = new Int32() with get,set
///<summary>
///Enable the BokaMera Homepage
///</summary>
[<ApiMember(Description="Enable the BokaMera Homepage")>]
member val EnableHomepage:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type CompanyRatingSummary() =
///<summary>
///The average rating score
///</summary>
[<ApiMember(Description="The average rating score")>]
member val AverageScore:Double = new Double() with get,set
///<summary>
///The number of ratings of score 1
///</summary>
[<ApiMember(Description="The number of ratings of score 1")>]
member val RatingScore1Count:Int32 = new Int32() with get,set
///<summary>
///The number of ratings of score 2
///</summary>
[<ApiMember(Description="The number of ratings of score 2")>]
member val RatingScore2Count:Int32 = new Int32() with get,set
///<summary>
///The number of ratings of score 3
///</summary>
[<ApiMember(Description="The number of ratings of score 3")>]
member val RatingScore3Count:Int32 = new Int32() with get,set
///<summary>
///The number of ratings of score 4
///</summary>
[<ApiMember(Description="The number of ratings of score 4")>]
member val RaingScore4Count:Int32 = new Int32() with get,set
///<summary>
///The number of ratings of score 5
///</summary>
[<ApiMember(Description="The number of ratings of score 5")>]
member val RatingScore5Count:Int32 = new Int32() with get,set
///<summary>
///The number of ratings
///</summary>
[<ApiMember(Description="The number of ratings")>]
member val Count:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type RatingReviewResponse() =
///<summary>
///The title for the review
///</summary>
[<ApiMember(Description="The title for the review")>]
member val Title:String = null with get,set
///<summary>
///The description for the review
///</summary>
[<ApiMember(Description="The description for the review")>]
member val Description:String = null with get,set
///<summary>
///The rating score
///</summary>
[<ApiMember(Description="The rating score")>]
member val RatingScore:Int32 = new Int32() with get,set
///<summary>
///The review author
///</summary>
[<ApiMember(Description="The review author")>]
member val Author:String = null with get,set
///<summary>
///The created date
///</summary>
[<ApiMember(Description="The created date")>]
member val Created:DateTime = new DateTime() with get,set
///<summary>
///The review answer from the company
///</summary>
[<ApiMember(Description="The review answer from the company")>]
member val ReviewAnswer:String = null with get,set
[<AllowNullLiteral>]
type CustomFieldValueResponse() =
member val Value:String = null with get,set
[<AllowNullLiteral>]
type CustomFieldConfigData() =
///<summary>
///Custom field id
///</summary>
[<ApiMember(Description="Custom field id")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///Configuration name. Example: 'Number of persons'.
///</summary>
[<ApiMember(Description="Configuration name. Example: 'Number of persons'.")>]
member val Name:String = null with get,set
///<summary>
///Custom field description. Example: 'For how many persons is this booking?'
///</summary>
[<ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")>]
member val Description:String = null with get,set
///<summary>
///Field width. Example: 20 for 20px
///</summary>
[<ApiMember(Description="Field width. Example: 20 for 20px")>]
member val Width:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
///</summary>
[<ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>]
member val DataType:String = null with get,set
///<summary>
///Default value of the field. Example: '3'
///</summary>
[<ApiMember(Description="Default value of the field. Example: '3'")>]
member val DefaultValue:String = null with get,set
///<summary>
///Determines if the field is required to have a value or not
///</summary>
[<ApiMember(Description="Determines if the field is required to have a value or not")>]
member val IsMandatory:Boolean = new Boolean() with get,set
///<summary>
///Error message shown to the user if the field data is required but not entered
///</summary>
[<ApiMember(Description="Error message shown to the user if the field data is required but not entered")>]
member val MandatoryErrorMessage:String = null with get,set
///<summary>
///Max lenght of the field
///</summary>
[<ApiMember(Description="Max lenght of the field")>]
member val MaxLength:Int32 = new Int32() with get,set
///<summary>
///If the field should have multiple lines
///</summary>
[<ApiMember(Description="If the field should have multiple lines")>]
member val MultipleLineText:Boolean = new Boolean() with get,set
///<summary>
///Regular expression used for validation of the field
///</summary>
[<ApiMember(Description="Regular expression used for validation of the field")>]
member val RegEx:String = null with get,set
///<summary>
///Error message shown if the regular expression validation failed
///</summary>
[<ApiMember(Description="Error message shown if the regular expression validation failed")>]
member val RegExErrorMessage:String = null with get,set
///<summary>
///The values to select from if Datatype is DropDown for this custom field
///</summary>
[<ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")>]
member val Values:ResizeArray<CustomFieldValueResponse> = new ResizeArray<CustomFieldValueResponse>() with get,set
[<AllowNullLiteral>]
type CompanyQueryResponse() =
member val Id:Guid = new Guid() with get,set
member val Name:String = null with get,set
///<summary>
///The organisation number will only be visible if your owner to the company
///</summary>
[<ApiMember(DataType="string", Description="The organisation number will only be visible if your owner to the company")>]
member val OrganisationNumber:String = null with get,set
///<summary>
///What type of company. If it's used for personal use or as a company.
///</summary>
[<ApiMember(DataType="int", Description="What type of company. If it's used for personal use or as a company.")>]
member val TypeId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Details:String = null with get,set
member val CategoryId:Int32 = new Int32() with get,set
member val Category:String = null with get,set
member val LogoType:Uri = null with get,set
member val CoverImage:Uri = null with get,set
member val Street1:String = null with get,set
member val Street2:String = null with get,set
member val ZipCode:String = null with get,set
member val City:String = null with get,set
member val CountryId:String = null with get,set
member val Longitude:String = null with get,set
member val Latitude:String = null with get,set
member val Distance:Nullable<Double> = new Nullable<Double>() with get,set
member val Phone:String = null with get,set
member val Email:String = null with get,set
member val Homepage:String = null with get,set
member val SitePath:String = null with get,set
member val Active:Boolean = new Boolean() with get,set
member val CodeLockSystem:Nullable<CodeLockSystemType> = new Nullable<CodeLockSystemType>() with get,set
member val IsFreeAccount:Boolean = new Boolean() with get,set
///<summary>
///Will show when the company was updated, note it will only be shown if your logged in as admin for the company.
///</summary>
[<ApiMember(DataType="datetime", Description="Will show when the company was updated, note it will only be shown if your logged in as admin for the company.")>]
member val Updated:Nullable<DateTime> = new Nullable<DateTime>() with get,set
///<summary>
///Will show when the company was created, note it will only be shown if your logged in as admin for the company.
///</summary>
[<ApiMember(DataType="datetime", Description="Will show when the company was created, note it will only be shown if your logged in as admin for the company.")>]
member val Created:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val StatusId:Int32 = new Int32() with get,set
///<summary>
///If the company is marked as favourite for the logged in user
///</summary>
[<ApiMember(DataType="boolean", Description="If the company is marked as favourite for the logged in user")>]
member val IsFavorite:Boolean = new Boolean() with get,set
member val BookingAgreements:String = null with get,set
member val BookingSettings:CompanyBookingSettings = null with get,set
member val SystemSettings:CompanySystemSettings = null with get,set
member val WidgetSettings:CompanyWidgetSettings = null with get,set
member val HomepageSettings:HomepageSettingsResponse = null with get,set
member val RatingSummary:CompanyRatingSummary = null with get,set
member val Reviews:ResizeArray<RatingReviewResponse> = new ResizeArray<RatingReviewResponse>() with get,set
member val CustomerCustomFields:ResizeArray<CustomFieldConfigData> = new ResizeArray<CustomFieldConfigData>() with get,set
member val ResponseStatus:ResponseStatus = null with get,set
[<AllowNullLiteral>]
type UserFavorites() =
member val CompanyId:Guid = new Guid() with get,set
member val Company:CompanyQueryResponse = null with get,set
[<AllowNullLiteral>]
type UserProfileResponse() =
member val Id:Guid = new Guid() with get,set
member val Firstname:String = null with get,set
member val Lastname:String = null with get,set
member val Phone:String = null with get,set
member val Email:String = null with get,set
[<AllowNullLiteral>]
type AdminProfile() =
member val CompanyId:Guid = new Guid() with get,set
member val Id:Guid = new Guid() with get,set
member val Firstname:String = null with get,set
member val Lastname:String = null with get,set
member val Email:String = null with get,set
member val WorkerId:String = null with get,set
member val Phone:String = null with get,set
[<AllowNullLiteral>]
type CustomFieldDataResponse() =
member val Id:Int32 = new Int32() with get,set
member val Column:String = null with get,set
member val Name:String = null with get,set
member val Description:String = null with get,set
member val Value:String = null with get,set
///<summary>
///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
///</summary>
[<ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")>]
member val DataType:String = null with get,set
[<AllowNullLiteral>]
type CompanyCustomerResponse() =
member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val CompanyName:String = null with get,set
member val CustomerId:Nullable<Guid> = new Nullable<Guid>() with get,set
member val SubscribedToNewsletter:Boolean = new Boolean() with get,set
member val CustomFieldValues:ResizeArray<CustomFieldDataResponse> = new ResizeArray<CustomFieldDataResponse>() with get,set
[<AllowNullLiteral>]
type CurrentUserQueryResponse() =
///<summary>
///The user id for your profile.
///</summary>
[<ApiMember(Description="The user id for your profile.")>]
member val UserId:Guid = new Guid() with get,set
member val Favorites:ResizeArray<UserFavorites> = new ResizeArray<UserFavorites>() with get,set
member val UserProfile:UserProfileResponse = null with get,set
member val CustomerProfile:UserProfileResponse = null with get,set
member val AdminProfile:AdminProfile = null with get,set
member val CompanyCustomers:ResizeArray<CompanyCustomerResponse> = new ResizeArray<CompanyCustomerResponse>() with get,set
[<ApiResponse(Description="Returned if the service was called without an existing session", StatusCode=401)>]
[<ValidateRequest(Validator="IsAuthenticated")>]
[<AllowNullLiteral>]
type CurrentUserQuery() =
///<summary>
///If you want to include the users favorites
///</summary>
[<ApiMember(DataType="boolean", Description="If you want to include the users favorites", ParameterType="query")>]
member val IncludeFavorites:Boolean = new Boolean() with get,set
member val IncludeCompanyCustomers:Boolean = new Boolean() with get,set
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 /users HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Favorites: [ { Company: { Name: String, OrganisationNumber: String, TypeId: 0, Details: String, CategoryId: 0, Category: String, Street1: String, Street2: String, ZipCode: String, City: String, CountryId: String, Longitude: String, Latitude: String, Distance: 0, Phone: String, Email: String, Homepage: String, SitePath: String, Active: False, CodeLockSystem: Sample, IsFreeAccount: False, Updated: "0001-01-01T00:00:00", Created: "0001-01-01T00:00:00", StatusId: 0, IsFavorite: False, BookingAgreements: String, BookingSettings: { EnableMobileApp: False, BookingReceiptMessage: String, ShowFreeTimesLeft: False, EnableShowBookedTimes: False, BookingAgreement: String, WeekNumberSetting: 0, ShowBookedTimes: False, PaymentProviderId: 0, BookOnlyOnExistingCustomers: False, PaymentEnabled: False }, SystemSettings: { Active: False, InactiveMessage: String, Searchable: False, GATrackingId: String, GoogleAdsConversionId: String, LinkedinTagId: String, GoogleAdsConversionLabel: String, GTMTrackingId: String, FacebookPixelId: String, MultiLanguage: False, ShowOnMarketplace: False, EnableAPITranslation: False, DefaultLanguage: String, SendCustomerInformationToExternalProviders: False }, WidgetSettings: { ServiceLayoutId: 0, TimeLayoutId: 0, BookingLayoutId: 0, PrimaryColor: String, ShowServiceImage: False, ShowRebateCodeField: False, ShowNextAvailableTime: False, ShowEndTime: False, BookedTimeSlotText: String, DarkTheme: False, ShowSubscribeToNewsletter: False }, HomepageSettings: { HomepageHeading: String, WelcomePageHeading: String, WelcomePageBody: String, AboutUsPageHeading: String, AboutUsPageBody: String, ShowRating: False, HomePageTemplateId: 0, HeroSectionStyleId: 0, EnableHomepage: False }, RatingSummary: { AverageScore: 0, RatingScore1Count: 0, RatingScore2Count: 0, RatingScore3Count: 0, RaingScore4Count: 0, RatingScore5Count: 0, Count: 0 }, Reviews: [ { Title: String, Description: String, RatingScore: 0, Author: String, ReviewAnswer: String } ], CustomerCustomFields: [ { "Id": 0, "Name": "String", "Description": "String", "Width": 0, "DataType": "String", "DefaultValue": "String", "IsMandatory": false, "MandatoryErrorMessage": "String", "MaxLength": 0, "MultipleLineText": false, "RegEx": "String", "RegExErrorMessage": "String", "Values": [ { "Value": "String" } ] } ], ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } } } ], UserProfile: { Firstname: String, Lastname: String, Phone: String, Email: String }, CustomerProfile: { Firstname: String, Lastname: String, Phone: String, Email: String }, AdminProfile: { Firstname: String, Lastname: String, Email: String, WorkerId: String, Phone: String }, CompanyCustomers: [ { CompanyId: 00000000-0000-0000-0000-000000000000, CompanyName: String, CustomerId: 00000000-0000-0000-0000-000000000000, SubscribedToNewsletter: False, CustomFieldValues: [ { Id: 0, Column: String, Name: String, Description: String, Value: String, DataType: String } ] } ] }