Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /schedules/date/{Id} | Update date schedule | Update date schedule to the company for the currently logged in user, only administrators are allowed to add schedules. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | path | int | Yes | Id of the schedule to update |
CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. |
Name | body | string | No | The schedule name |
Description | body | string | No | The schedule description |
Active | body | bool? | No | If schedule is active or not |
NumberOfScheduleDays | body | int | Yes | The number of days the schedule is valid from todays date |
ScheduleDates | body | List<AddDateScheduleDate> | No | The dates for the schedule. This is the actual timeslots. |
Resources | body | List<AddScheduleResource> | No | If the schedule is only connected to some resources, add them here. If empty, it will be used by all resources. |
Services | body | List<AddScheduleService> | No | Set what services the schedule should be connected to. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
From | form | DateTime | Yes | The from date for the timeslot |
To | form | DateTime | Yes | The to date for the timeslot |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | Yes | The resource id |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | Yes | The service id |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | The schedule id |
Name | form | string | No | Name of the schedule |
Description | form | string | No | Description of the schedule |
Active | form | bool | No | If the schedule is active or not |
IsResourceSpecific | form | bool? | Yes | If the schedule is only connected to some specific resources. Note: You must have IncludeResources property to see this. |
ScheduleDates | form | List<DateScheduleDateResponse> | No | Schedule dates |
Resources | form | List<ScheduleResources> | No | The resources that is connected to the schedule |
Services | form | List<ScheduleServices> | No | The services that is connected to the schedule |
UpdatedDate | form | DateTime | Yes | The timestamp when the schedule was updated |
CreatedDate | form | DateTime | Yes | The timestamp when the schedule was created |
ResponseStatus | form | ResponseStatus | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
From | form | DateTime | No | |
To | form | DateTime | No | |
ResponseStatus | form | ResponseStatus | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | Name of the resource |
ImageUrl | form | Uri | No | The image url of the resource |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | Name of the service |
ImageUrl | form | Uri | No | The image url of the service |
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
Content-Type: text/jsonl
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: text/jsonl 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"}}}