In this example, we will review how delete holidays.
We will delete the holiday ID-4506
that was previously created.
...api/v1/holidays/ID-4506/invalidate
The dependent update is set to true
when the 4-eye process is required for holidays. If the 4-eye process is disabled, the dependent update is set to false
.
You can only delete holidays with a future date. When a holiday is deleted, the holiday record remains in the system with its status updated to deleted
.
To delete existing holidays, call the following endpoint:
https://holiday-api.sandbox.tuumplatform.com/
The sample request body is as follows:
curl --location 'https://holiday-api.sandbox.tuumplatform.com/api/v1/holidays/ID-4506/invalidate' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiT2ZmaWNlciBUZXN0IiwiZW1wbG95ZWVJZCI6IklELTEwMDAiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHBpcnlEVGltZSI6IjIwMjQtMTItMjNUMTU6MTI6MTgiLCJleHAiOjE3MzQ5NjY3MzgsInJvbGVzIjpbIkFETUlOIl19.DWfBaqaYai89dx7v9by4Tn0ZPloxrSZZGf7htkd_ytw' \
--header 'Content-Type: application/json' \
--data '{
"dependentUpdatesRequired": "false"
}'
Below you will find the response to the sample request:
As a result, the holiday ID-4505
was marked as deleted.
"dependentUpdatesRequired": "false"
{
"dependentUpdatesRequired": "false"
}