BokaMera.API.Host

<back to all web services

UpdateCompanyUser

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/administrators/{Id}Update administrator on your companyIf you want to update a administrator to your company.
UpdateCompanyUser Parameters:
NameParameterData TypeRequiredDescription
CompanyIdqueryGuid?NoEnter the company and id for the application user, if blank company id and you are an admin, your company id will be used.
IdpathGuidYesEnter the user id for the administrator.
FirstnamebodystringYes
LastnamebodystringYes
PhonebodystringYes
EmailbodystringYes
ResourceIdbodyint?No
RolesbodyList<AddCompanyUserRolesResponse>Yes
WorkerIdbodyint?No
SendPushNotificationbodybool?NoIf the admin should receive Push notification when booked
SendPushNotificationReminderbodybool?NoIf the resource should receive Push notification reminders on bookings
AddCompanyUserRolesResponse Parameters:
NameParameterData TypeRequiredDescription
RoleIdformGuidNo
CompanyUserQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
CompanyIdformGuidNo
FirstnameformstringYes
LastnameformstringYes
EmailformstringYes
PhoneformstringYes
WorkerIdformstringYes
ResourceIdformint?No
ResourceformCompanyUserResourceYesThe resource information connected to the administrator.
RolesformList<CompanyUserRolesQueryResponse>YesThe roles that are connected to the administrator.
SendPushNotificationformboolNoIf the admin should receive Push notification when booked
SendPushNotificationReminderformboolNoIf the admin should receive Push notification reminders on bookings
ActiveformboolNo
CreatedformDateTimeNo
UpdatedformDateTimeNo
CompanyUserResource Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe resource id
NameformstringYesThe resource name
ActiveformboolNoThe resource status
DescriptionformstringYesThe resource description
EmailformstringYesThe resource email
PhoneformstringYesThe resource phone
ColorformstringYesThe resource color
ImageUrlformUriYesThe resource image
EmailNotificationformboolNoIf the resource want to receive email notifications
SMSNotificationformboolNoIf the resource want to receive sms notifications
EmailReminderformboolNoIf the resource want to receive email reminders
SMSReminderformboolNoIf the resource want to receive sms reminders
CompanyUserRolesQueryResponse Parameters:
NameParameterData TypeRequiredDescription
RoleIdformGuidNo
NameformstringYes
DescriptionformstringYes

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /administrators/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyId: 00000000-0000-0000-0000-000000000000,
	Firstname: String,
	Lastname: String,
	Phone: String,
	Email: String,
	ResourceId: 0,
	Roles: 
	[
		{
			
		}
	],
	WorkerId: 0,
	SendPushNotification: False,
	SendPushNotificationReminder: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Firstname: String,
	Lastname: String,
	Email: String,
	Phone: String,
	WorkerId: String,
	ResourceId: 0,
	Resource: 
	{
		Id: 0,
		Name: String,
		Active: False,
		Description: String,
		Email: String,
		Phone: String,
		Color: String,
		EmailNotification: False,
		SMSNotification: False,
		EmailReminder: False,
		SMSReminder: False
	},
	Roles: 
	[
		{
			Name: String,
			Description: String
		}
	],
	SendPushNotification: False,
	SendPushNotificationReminder: False,
	Active: False
}