Skip to main content
POST
https://integrations.projectcor.com
/
v2
/
integrations
/
leaves
curl --location 'https://integrations.projectcor.com/v2/integrations/leaves' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "id": "external-id-3",
  "userId": "external-user-id-3",
  "leaveTypeId": "external-type-3",
  "start": "2026-05-11T00:00:00-00:00",
  "end": "2026-05-11T23:59:00-00:00",
  "allDay": true
}'
{
  "statusCode": 201,
  "status": "success",
  "data": {
    "id": 12345,
    "userId": 67890,
    "leaveTypeId": 54321,
    "start": "2026-05-11T00:00:00-00:00",
    "end": "2026-05-11T23:59:00-00:00",
    "allDay": true,
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "status": "pending"
  }
}
Creates a new leave request in your COR instance through the integrations service. The user and leave type must have been previously created through the integrations API.

Request Body Requirements

metadata
object
required
id
string
required
External leave request ID from your source system
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
Start date and time in ISO 8601 format (e.g., “2026-05-11T00:00:00-00:00”)
end
string
required
End date and time in ISO 8601 format (e.g., “2026-05-11T23: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

  • 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
  • DuplicateExternalIdError — A leave request with this external ID already exists for this source
curl --location 'https://integrations.projectcor.com/v2/integrations/leaves' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "id": "external-id-3",
  "userId": "external-user-id-3",
  "leaveTypeId": "external-type-3",
  "start": "2026-05-11T00:00:00-00:00",
  "end": "2026-05-11T23:59:00-00:00",
  "allDay": true
}'
{
  "statusCode": 201,
  "status": "success",
  "data": {
    "id": 12345,
    "userId": 67890,
    "leaveTypeId": 54321,
    "start": "2026-05-11T00:00:00-00:00",
    "end": "2026-05-11T23:59:00-00:00",
    "allDay": true,
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "status": "pending"
  }
}