Update booking statuses
patch
/rest/ofscCapacity/v1/bookingStatuses
This operation updates the booking statuses (that is, open or closed) based on the specified request parameters.
Request
The schema of the request body parameters.
Root Schema : Booking Status Request List
Type:
object
Title:
Booking Status Request List
The array of booking statuses.
Show Source
Nested Schema : bookingStatusCollection
Type:
Show Source
object
-
area:
string
Title:
Area
Minimum Length:1
Maximum Length:40
The label of the capacity area. -
date:
string(date)
Title:
Title
The date on which the booking status is updated.Example:2020-07-22
-
statuses:
array Statuses
Title:
Statuses
The array of booking statuses.
Nested Schema : bookingStatusNode
Type:
Show Source
object
-
category:
string
Title:
Category
The label of the capacity category for which the booking status must be closed. -
state:
string
Title:
State
Allowed Values:[ "open", "closed" ]
The state of the booking status, that is, open or closed. -
timeFrom:
string
Title:
Time From
The start of the time interval (in HH:MM format) from where the booking statuses must be closed. -
timeTo:
string
Title:
Time To
The end of the time interval (in HH:MM format) at which the booking statuses must be closed. -
workZone:
string
Title:
Work Zone
The label of the work zone for which the booking status must be closed.
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation.
Root Schema : ResultBookingStatusObject
Type:
Show Source
object
-
results:
object Results
Title:
Results
An array containing the results of the operation.
Nested Schema : Results
Type:
object
Title:
Results
An array containing the results of the operation.
Show Source
-
errors:
array Errors
Title:
Errors
The array of failed operations. -
notChangedFieldCount:
integer
Title:
Not Changed Field Count
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
Title:
Updated Field Count
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 Error Detail
Title:
Error Detail
The details of the error. -
operation:
object Operation
Title:
Operation
The operation that caused the error.
Nested Schema : Error Detail
Type:
object
Title:
Error Detail
The details of the error.
Show Source
-
code:
string
Title:
Code
The code of the error. -
message:
string
Title:
Message
The description of the error.
Nested Schema : Operation
Type:
object
Title:
Operation
The operation that caused the error.
Show Source
-
area:
string
Title:
Area
The label of the capacity area for which the operation is performed. It is not returned if the transaction fails. -
category:
string
Title:
Category
The label of the capacity category for which the operation is performed. It is not returned if the transaction fails. -
date:
integer
Title:
Date
The date on which the operation is performed. It is not returned if the transaction fails. -
endTime:
string
Title:
End Time
The end time at which the operation is closed. -
startTime:
string
Title:
Start Time
The start time at which the operation is started. -
workZone:
string
Title:
Work Zone
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 status 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/bookingStatuses 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": [{ "date": "2017-08-23", "area": "CapacityArea", "statuses": [ { "category": "IN", "state": "closed" } ] }]}
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 13:09:35 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": 2, "notChangedFieldCount": 0, "errors": [] } }