BokaMera.API.Host

<back to all web services

CreateServicePrice

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/services/prices/Create a priceCreate a new price on the service
CreateServicePrice Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
ServiceIdbodyintNoThe service id
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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /services/prices/ HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","ServiceId":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: application/json
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}