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
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
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 .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.

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

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

{"Id":0,"ServiceId":0,"Price":0,"CurrencyId":"String","PriceSign":"String","VAT":0,"Category":"String","PriceText":"String","DaysOfWeek":[{"DayOfWeekId":0,"DotNetDayOfWeekId":0,"DayOfWeek":"String"}],"FromTime":"00:00:00","ToTime":"00:00:00","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}