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

Body ()
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 : items
Type: array
Show Source
Nested Schema : bookingStatusCollection
Type: object
Show Source
Nested Schema : Statuses
Type: array
Title: Statuses
The array of booking statuses.
Show Source
Nested Schema : bookingStatusNode
Type: object
Show Source
  • Title: Category
    The label of the capacity category for which the booking status must be closed.
  • Title: State
    Allowed Values: [ "open", "closed" ]
    The state of the booking status, that is, open or closed.
  • Title: Time From
    The start of the time interval (in HH:MM format) from where the booking statuses must be closed.
  • Title: Time To
    The end of the time interval (in HH:MM format) at which the booking statuses must be closed.
  • Title: Work Zone
    The label of the work zone for which the booking status must be closed.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : ResultBookingStatusObject
Type: object
Show Source
Nested Schema : Results
Type: object
Title: Results
An array containing the results of the operation.
Show Source
  • Errors
    Title: Errors
    The array of failed operations.
  • 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.
  • 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 : Errors
Type: array
Title: Errors
The array of failed operations.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
The details of the error.
Show Source
Nested Schema : Operation
Type: object
Title: Operation
The operation that caused the error.
Show Source
  • Title: Area
    The label of the capacity area for which the operation is performed. It is not returned if the transaction fails.
  • Title: Category
    The label of the capacity category for which the operation is performed. It is not returned if the transaction fails.
  • Title: Date
    The date on which the operation is performed. It is not returned if the transaction fails.
  • Title: End Time
    The end time at which the operation is closed.
  • Title: Start Time
    The start time at which the operation is started.
  • 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.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

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": []
    }
}
Back to Top