BokaMera.API.Host

<back to all web services

CreateDateSchedule

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/schedules/dateAdd new date scheduleAdd new date schedule to the company for the currently logged in user, only administrators are allowed to add schedules.
CreateDateSchedule Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
NamebodystringNoThe schedule name
DescriptionbodystringNoThe schedule description
ActivebodyboolNoIf schedule is active or not
NumberOfScheduleDaysbodyintYesThe number of days the schedule is valid from todays date
ScheduleDatesbodyList<AddDateScheduleDate>NoThe dates for the schedule. This is the actual timeslots.
ResourcesbodyList<AddScheduleResource>NoIf the schedule is only connected to some resources, add them here. If empty, it will be used by all resources.
ServicesbodyList<AddScheduleService>NoSet what services the schedule should be connected to.
AddDateScheduleDate Parameters:
NameParameterData TypeRequiredDescription
FromformDateTimeYesThe from date for the timeslot
ToformDateTimeYesThe to date for the timeslot
AddScheduleResource Parameters:
NameParameterData TypeRequiredDescription
IdformintYesThe resource id
AddScheduleService Parameters:
NameParameterData TypeRequiredDescription
IdformintYesThe service id
DateScheduleQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNoThe schedule id
NameformstringNoName of the schedule
DescriptionformstringNoDescription of the schedule
ActiveformboolNoIf the schedule is active or not
IsResourceSpecificformbool?YesIf the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this.
ScheduleDatesformList<DateScheduleDateResponse>NoSchedule dates
ResourcesformList<ScheduleResources>NoThe resources that is connected to the schedule
ServicesformList<ScheduleServices>NoThe services that is connected to the schedule
UpdatedDateformDateTimeYesThe timestamp when the schedule was updated
CreatedDateformDateTimeYesThe timestamp when the schedule was created
ResponseStatusformResponseStatusNo
DateScheduleDateResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
FromformDateTimeNo
ToformDateTimeNo
ResponseStatusformResponseStatusNo
ScheduleResources Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNoName of the resource
ImageUrlformUriNoThe image url of the resource
ScheduleServices Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNoName of the service
ImageUrlformUriNoThe image url of the service

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.

POST /schedules/date HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Name":"String","Description":"String","Active":false,"NumberOfScheduleDays":0,"ScheduleDates":[{}],"Resources":[{"Id":0}],"Services":[{"Id":0}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Id":0,"Name":"String","Description":"String","Active":false,"IsResourceSpecific":false,"ScheduleDates":[{"Id":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Resources":[{"Id":0,"Name":"String"}],"Services":[{"Id":0,"Name":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}