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:
objectTitle:
Booking Status Request ListThe array of booking statuses.
Show Source
Nested Schema : bookingStatusCollection
Type:
Show Source
object-
area:
string
Title:
AreaMinimum Length:1Maximum Length:40The label of the capacity area. -
date:
string(date)
Title:
TitleThe date on which the booking status is updated.Example:2020-07-22 -
statuses:
array Statuses
Title:
StatusesThe array of booking statuses.
Nested Schema : bookingStatusNode
Type:
Show Source
object-
category:
string
Title:
CategoryThe label of the capacity category for which the booking status must be closed. -
state:
string
Title:
StateAllowed Values:[ "open", "closed" ]The state of the booking status, that is, open or closed. -
timeFrom:
string
Title:
Time FromThe start of the time interval (in HH:MM format) from where the booking statuses must be closed. -
timeTo:
string
Title:
Time ToThe end of the time interval (in HH:MM format) at which the booking statuses must be closed. -
workZone:
string
Title:
Work ZoneThe label of the work zone for which the booking status must be closed.
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : ResultBookingStatusObject
Type:
Show Source
object-
results:
object Results
Title:
ResultsAn array containing the results of the operation.
Nested Schema : Results
Type:
objectTitle:
ResultsAn array containing the results of the operation.
Show Source
-
errors:
array Errors
Title:
ErrorsThe array of failed operations. -
notChangedFieldCount:
integer
Title:
Not Changed Field CountThe 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 CountThe 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 DetailThe details of the error. -
operation:
object Operation
Title:
OperationThe operation that caused the error.
Nested Schema : Error Detail
Type:
objectTitle:
Error DetailThe details of the error.
Show Source
-
code:
string
Title:
CodeThe code of the error. -
message:
string
Title:
MessageThe description of the error.
Nested Schema : Operation
Type:
objectTitle:
OperationThe operation that caused the error.
Show Source
-
area:
string
Title:
AreaThe label of the capacity area for which the operation is performed. It is not returned if the transaction fails. -
category:
string
Title:
CategoryThe label of the capacity category for which the operation is performed. It is not returned if the transaction fails. -
date:
integer
Title:
DateThe date on which the operation is performed. It is not returned if the transaction fails. -
endTime:
string
Title:
End TimeThe end time at which the operation is closed. -
startTime:
string
Title:
Start TimeThe start time at which the operation is started. -
workZone:
string
Title:
Work ZoneThe 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": []
}
}