curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external"
payload = {
"metadata": {
"source": "GLOBANT"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.status_code)
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave type deleted successfully",
"deletedId": "type external"
}
}
{
"error": "LeaveTypeNotFoundError",
"message": "Leave type with external ID 'type external' not found",
"code": "ZC004"
}
{
"status": 409,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "Cannot delete leave type that is in use"
}
User Leaves
Delete Leave Type
Deletes a leave type from your COR instance using its external ID
DELETE
/
v2
/
integrations
/
leaves-types
/
{id}
curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external"
payload = {
"metadata": {
"source": "GLOBANT"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.status_code)
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave type deleted successfully",
"deletedId": "type external"
}
}
{
"error": "LeaveTypeNotFoundError",
"message": "Leave type with external ID 'type external' not found",
"code": "ZC004"
}
{
"status": 409,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "Cannot delete leave type that is in use"
}
Deletes a leave type from your COR instance using its external ID. This removes both the leave type and the integration mapping. Cannot delete leave types that are currently in use by existing leave requests.
Path Parameters
string
required
External leave type ID that was used when creating the leave type
Request Body Requirements
Known Errors
LeaveTypeNotFoundError— No leave type found with the specified external ID for this sourceValidationError— Missing requiredmetadata.sourcefieldDeletionError— Leave type cannot be deleted due to existing leave request associations
curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external"
payload = {
"metadata": {
"source": "GLOBANT"
}
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.status_code)
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/leaves-types/type%20external',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave type deleted successfully",
"deletedId": "type external"
}
}
{
"error": "LeaveTypeNotFoundError",
"message": "Leave type with external ID 'type external' not found",
"code": "ZC004"
}
{
"status": 409,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "Cannot delete leave type that is in use"
}
Was this page helpful?
⌘I

