BokaMera.API.Host

<back to all web services

UpdateServicePrice

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/services/prices/{Id}Update a priceUpdate a price on a service
UpdateServicePrice Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
IdpathintYesId of the price
PricebodydoubleNoThe price
CurrencyIdbodystringNoThe price currency
CalculationTypeIdbodyintNoThe price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day
VATbodydecimalNoThe price VAT in percent
CategorybodystringNoThe price category if price has a category
FrombodyDateTimeNoThe valid from date for the price.
TobodyDateTimeNoThe valid to date for the price.
DaysOfWeekbodyint[]NoIf the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
FromTimebodyTimeSpan?NoIf the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
ToTimebodyTimeSpan?NoIf the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
ServicePriceResponse Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidNoThe company id
IdformintNoThe price id
ServiceIdformintNoThe service id
PriceformdoubleNoThe price
CalculationTypeIdformintNoThe price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day
CurrencyIdformstringNoThe price currency
PriceSignformstringNoThe price sign
VATformdecimalNoThe price VAT in percent
CategoryformstringNoThe price category if price has a category
PriceTextformstringNoThe price text to display
FromformDateTimeNoThe valid from date for the price.
ToformDateTimeNoThe valid to date for the price.
DaysOfWeekformList<DayOfWeekDto>NoIf the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
FromTimeformTimeSpan?NoIf the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
ToTimeformTimeSpan?NoIf the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
ServiceformServiceInfoResponseNo
IsTimeSpecificformboolNoIf the price is only valid for a specific time span
IsDaysOfWeekSpecificformboolNoIf the price is only valid for specific days of week
IsWeightedformboolNoIf the price is Weighted
DayOfWeekDto Parameters:
NameParameterData TypeRequiredDescription
DayOfWeekIdformintNo
DotNetDayOfWeekIdformintNo
DayOfWeekformstringNo
ServiceInfoResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo
ImageUrlformUriNo
LengthInMinutesformint?No
MaxNumberOfSpotsPerBookingformintNo
GroupBookingformGroupBookingSettingsNo
MultipleResourceformMultipleResourceSettingsNo
IsGroupBookingformboolNo
IsPaymentEnabledformboolNo
GroupBookingSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo
MultipleResourceSettings Parameters:
NameParameterData TypeRequiredDescription
ActiveformboolNo
MinformintNo
MaxformintNo

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 /services/prices/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyId: 00000000-0000-0000-0000-000000000000,
	Id: 0,
	Price: 0,
	CurrencyId: String,
	CalculationTypeId: 0,
	VAT: 0,
	Category: String,
	DaysOfWeek: 
	[
		0
	],
	FromTime: PT0S,
	ToTime: PT0S
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	ServiceId: 0,
	Price: 0,
	CalculationTypeId: 0,
	CurrencyId: String,
	PriceSign: String,
	VAT: 0,
	Category: String,
	PriceText: String,
	DaysOfWeek: 
	[
		{
			DayOfWeekId: 0,
			DotNetDayOfWeekId: 0,
			DayOfWeek: String
		}
	],
	FromTime: PT0S,
	ToTime: PT0S,
	Service: 
	{
		Id: 0,
		Name: String,
		Description: String,
		LengthInMinutes: 0,
		MaxNumberOfSpotsPerBooking: 0,
		GroupBooking: 
		{
			Active: False,
			Min: 0,
			Max: 0
		},
		MultipleResource: 
		{
			Active: False,
			Min: 0,
			Max: 0
		},
		IsGroupBooking: False,
		IsPaymentEnabled: False
	},
	IsTimeSpecific: False,
	IsDaysOfWeekSpecific: False,
	IsWeighted: False
}