PATCH

Use the PATCH HTTP method to update data in a resource. You can update only the fields specified in the request body.

  • Execute the PATCH request on the resource URL.
  • Set the Content-Type header to application/vnd.oracle.adf.resourceitem+json.

In this example, the blood type of a worker is updated.

Request

PATCH https://<host>:<port>/hcmRestApi/resources/11.13.18.05/workers/00020000000EACED000577080000000000000018
Content-Type: application/vnd.oracle.adf.resourceitem+json
{
  "BloodType": "A+"
}

Response

The server updates the blood type of the worker and responds with status code 200 and the ETag value in the response header. The response body contains the current representation of the resource item.

200 OK
Etag: "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A6578700000001477040000"

{
 
 
  (...)
 
  "BloodType": "A+",
 
  (...)
 
  "links": [
    {
      "rel": "self",
      "href": "../workers/00020000000EACED000577080000000000000",
      "name": "workers",
      "kind": "item",
      "properties": {
        "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A6578700000001477040000"
      }
    },
     
    (...)
 
  ]
}