Skip to main content
PUT
https://integrations.projectcor.com
/
v2
/
integrations
/
leaves
/
{id}
curl --location --request PUT '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",
  "leaveTypeId": "external-type-3",
  "start": "2026-05-13T00:00:00-00:00",
  "end": "2026-05-13T23:59:00-00:00",
  "allDay": true,
  "metadata": {
    "source": "GLOBANT"
  }
}'
{
  "statusCode": 200,
  "status": "success",
  "data": {
    "id": 12345,
    "userId": 67890,
    "leaveTypeId": 54321,
    "start": "2026-05-13T00:00:00-00:00",
    "end": "2026-05-13T23:59:00-00:00",
    "allDay": true,
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T11:45:00Z",
    "status": "pending"
  }
}
Updates an existing leave request in your COR instance using its external ID. The user and leave type must have been previously created through the integrations API.

Path Parameters

id
string
required
External leave request ID that was used when creating the leave request

Request Body Requirements

metadata
object
required
userId
string
required
External user ID. The user must have been previously created through the integrations API.
leaveTypeId
string
required
External leave type ID. The leave type must have been previously created through the integrations API.
start
string
required
Updated start date and time in ISO 8601 format (e.g., “2026-05-13T00:00:00-00:00”)
end
string
required
Updated end date and time in ISO 8601 format (e.g., “2026-05-13T23:59:00-00:00”)
allDay
boolean
required
Whether the leave is for the entire day. When true, the time portion is typically ignored.

Known Errors

  • ZC001 — Entity is not associated (leave request with the specified external ID not found)
  • LeaveNotFoundError — No leave request found with the specified external ID for this source
  • ValidationError — Missing required fields
  • UserNotFoundError — The specified user does not exist in the integration mappings
  • LeaveTypeNotFoundError — The specified leave type does not exist in the integration mappings
  • InvalidDateRangeError — End date must be after or equal to start date
curl --location --request PUT '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",
  "leaveTypeId": "external-type-3",
  "start": "2026-05-13T00:00:00-00:00",
  "end": "2026-05-13T23:59:00-00:00",
  "allDay": true,
  "metadata": {
    "source": "GLOBANT"
  }
}'
{
  "statusCode": 200,
  "status": "success",
  "data": {
    "id": 12345,
    "userId": 67890,
    "leaveTypeId": 54321,
    "start": "2026-05-13T00:00:00-00:00",
    "end": "2026-05-13T23:59:00-00:00",
    "allDay": true,
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T11:45:00Z",
    "status": "pending"
  }
}