BokaMera.API.Host

<back to all web services

UpdateDateSchedule

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/schedules/date/{Id}Update date scheduleUpdate date schedule to the company for the currently logged in user, only administrators are allowed to add schedules.
UpdateDateSchedule Parameters:
NameParameterData TypeRequiredDescription
IdpathintYesId of the schedule to update
CompanyIdbodyGuid?NoThe company id, if empty will use the company id for the user you are logged in with.
NamebodystringYesThe schedule name
DescriptionbodystringYesThe schedule description
Activebodybool?NoIf schedule is active or not
NumberOfScheduleDaysbodyintYesThe number of days the schedule is valid from todays date
ScheduleDatesbodyList<AddDateScheduleDate>YesThe dates for the schedule. This is the actual timeslots.
ResourcesbodyList<AddScheduleResource>YesIf the schedule is only connected to some resources, add them here. If empty, it will be used by all resources.
ServicesbodyList<AddScheduleService>YesSet 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
NameformstringYesName of the schedule
DescriptionformstringYesDescription 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>YesSchedule dates
ResourcesformList<ScheduleResources>YesThe resources that is connected to the schedule
ServicesformList<ScheduleServices>YesThe services that is connected to the schedule
UpdatedDateformDateTimeYesThe timestamp when the schedule was updated
CreatedDateformDateTimeYesThe timestamp when the schedule was created
ResponseStatusformResponseStatusYes
DateScheduleDateResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
FromformDateTimeNo
ToformDateTimeNo
ResponseStatusformResponseStatusYes
ScheduleResources Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYesName of the resource
ImageUrlformUriYesThe image url of the resource
ScheduleServices Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringYesName of the service
ImageUrlformUriYesThe image url of the service

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.

PUT /schedules/date/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Id":0,"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: application/json
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"}}}