curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves/external-id-3' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"userId": "external-user-id-3",
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves/external-id-3"
payload = {
"userId": "external-user-id-3",
"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/external-id-3',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: 'external-user-id-3',
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave request deleted successfully",
"deletedId": "external-id-3"
}
}
{
"error": "LeaveNotFoundError",
"message": "Leave request with external ID 'external-id-3' not found",
"code": "ZC004"
}
{
"status": 400,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "User ID is required"
}
User Leaves
Delete Leave
Deletes a leave request from your COR instance using its external ID
DELETE
/
v2
/
integrations
/
leaves
/
{id}
curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves/external-id-3' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"userId": "external-user-id-3",
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves/external-id-3"
payload = {
"userId": "external-user-id-3",
"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/external-id-3',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: 'external-user-id-3',
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave request deleted successfully",
"deletedId": "external-id-3"
}
}
{
"error": "LeaveNotFoundError",
"message": "Leave request with external ID 'external-id-3' not found",
"code": "ZC004"
}
{
"status": 400,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "User ID is required"
}
Deletes a leave request from your COR instance using its external ID. This removes both the leave request and the integration mapping.
Path Parameters
string
required
External leave request ID that was used when creating the leave request
Request Body Requirements
string
required
External user ID. The user must have been previously created through the integrations API.
Known Errors
LeaveNotFoundError— No leave request found with the specified external ID for this sourceValidationError— Missing requiredmetadata.sourceoruserIdfieldUserNotFoundError— The specified user does not exist in the integration mappings
curl --location --request DELETE 'https://integrations.projectcor.com/v2/integrations/leaves/external-id-3' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"userId": "external-user-id-3",
"metadata": {
"source": "GLOBANT"
}
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/leaves/external-id-3"
payload = {
"userId": "external-user-id-3",
"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/external-id-3',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: 'external-user-id-3',
metadata: {
source: 'GLOBANT'
}
})
}
);
console.log(response.status);
{
"statusCode": 200,
"status": "success",
"data": {
"message": "Leave request deleted successfully",
"deletedId": "external-id-3"
}
}
{
"error": "LeaveNotFoundError",
"message": "Leave request with external ID 'external-id-3' not found",
"code": "ZC004"
}
{
"status": 400,
"name": "COR_CUSTOM_ERROR",
"code": "ZC002",
"message": "User ID is required"
}
Was this page helpful?
⌘I

