| 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 | Yes | The schedule name |
| Description | body | string | Yes | 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> | Yes | The dates for the schedule. This is the actual timeslots. |
| Resources | body | List<AddScheduleResource> | Yes | 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> | Yes | 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 | Yes | Name of the schedule |
| Description | form | string | Yes | 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> | Yes | Schedule dates |
| Resources | form | List<ScheduleResources> | Yes | The resources that is connected to the schedule |
| Services | form | List<ScheduleServices> | Yes | 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 | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| From | form | DateTime | No | |
| To | form | DateTime | No | |
| ResponseStatus | form | ResponseStatus | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | Name of the resource |
| ImageUrl | form | Uri | Yes | The image url of the resource |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| Name | form | string | Yes | Name of the service |
| ImageUrl | form | Uri | Yes | The image url of the service |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
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/jsv
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
}
}
}