Create or update booking closing schedules
patch
/rest/ofscCapacity/v1/bookingClosingSchedule
This operation creates or updates the booking closing schedules for one or more capacity areas.
Request
This section describes the request body parameters for this operation.
Root Schema : bookingClosingScheduleList
Type:
object
The collection of closing schedules for bookings.
Show Source
Nested Schema : items
Type:
Show Source
array
-
Array of:
object Booking Closing Schedule
Title:
Booking Closing Schedule
Nested Schema : Booking Closing Schedule
Type:
object
Title:
Show Source
Booking Closing Schedule
-
area:
string
Title:
Area
Minimum Length:1
Maximum Length:40
The label of the area from which the booking is closed. -
category:
string
Title:
Category
The label of the capacity category for which the booking is closed. If this field is not returned, then the bookings for all categories are closed. -
closeTime:
string
Title:
Close Time
The time at which the booking is closed. This time corresponds to the timezone of the capacity area. -
dayOffset:
integer
Title:
Day Offset
Minimum Value:1
Maximum Value:255
The offset determines the day on which the booking is closed. For example, if "1" is returned, then the booking for tomorrow is closed today. -
endTime:
string
Title:
End Time
The end time of the booking closing schedule.[: ] Valid values for hours: [0 to 48]. The dash sign after 24, for example, 24 - represents overnight work. Minutes are optional. Valid values for minutes: [0 to 59]. -
startTime:
string
Title:
Start Time
The start time of the booking closing schedule. If Start Time and End Time values are not returned, then it means that the bookings are closed for the entire day. This operation checks if a specified time interval is supported or configured for the area. The intervals that are not currently configured are not returned, even if the database contains such records. -
workZone:
string
Title:
Work Zone
The label of the work zone from which the booking is closed. If this field is not returned, then the bookings are closed for all work zones (even if a particular work zone does not have its own close time).
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation.
Nested Schema : results
Type:
Show Source
object
-
errors:
array errors
The array of failed operations.
-
notChangedFieldCount:
integer
The number of fields for which the values were not changed when the operation is performed. Only the fields that were passed in the request are counted.
-
updatedFieldCount:
integer
The number of fields for which the values were changed when the operation is performed. Only the fields that were passed in the request are counted.
Nested Schema : items
Type:
Show Source
object
-
errorDetail:
object errorDetail
The details of the error.
-
operation:
object operation
The operation that caused the error.
Nested Schema : errorDetail
Type:
object
The details of the error.
Show Source
-
code:
string
The code of the error.
-
message:
string
The description of the error.
Nested Schema : operation
Type:
object
The operation that caused the error.
Show Source
-
area:
string
The label of the capacity area for which the operation is performed. It is not returned if the transaction fails.
-
category:
string
The label of the capacity category for which the operation is performed. It is not returned if the transaction fails.
-
dayOffset:
integer
The offset of the day for which the operation is performed.
-
endTime:
string
The time at which the operation is closed.
-
startTime:
string
The time at which the operation is started.
-
workZone:
string
The label of the work zone for which the operation is performed.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to update a booking closing schedule by submitting a PATCH request on the REST resource.
Example of Request Header
The following shows an example of the request header.
PATCH /rest/ofscCapacity/v1/bookingClosingSchedule Connection: close Accept-Encoding: gzip,deflate Authorization: Basic bXlyb290QHFhNTUwMzox Host: <instance_name>.fs.ocs.oraclecloud.com User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Example of Request Body
The following example shows the contents of the request body in JSON format.
{"items": [ { "area": "CapacityArea", "category": "TC", "dayOffset": 1, "startTime": "12:00", "endTime": "18:00", "closeTime": "12:00:00" }, { "area": "CapacityArea", "category": "DI", "closeTime": "22:00:00" }, { "area": "CapacityArea", "dayOffset": 1, "category": "TC", "startTime": "8:00", "endTime": "12:00", "closeTime": "10:00:00" } ]}
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Wed, 23 Aug 2017 12:44:47 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Access-Control-Allow-Credentials: true Strict-Transport-Security: max-age=31536000; includeSubDomains;
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "results": { "updatedFieldCount": 3, "notChangedFieldCount": 0, "errors": [] } }