Skip to main content
POST
https://integrations.projectcor.com
/
v2
/
integrations
/
leaves-types
curl --location 'https://integrations.projectcor.com/v2/integrations/leaves-types' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "id": "type external",
  "name": "Custom name"
}'
{
  "statusCode": 201,
  "status": "success",
  "data": {
    "id": 12345,
    "name": "Custom name",
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "active": true
  }
}
Creates a new leave type in your COR instance through the integrations service.

Request Body Requirements

metadata
object
required
id
string
required
External leave type ID from your source system
name
string
required
Leave type name

Known Errors

  • ValidationError — Missing required fields
  • DuplicateExternalIdError — A leave type with this external ID already exists for this source
curl --location 'https://integrations.projectcor.com/v2/integrations/leaves-types' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "id": "type external",
  "name": "Custom name"
}'
{
  "statusCode": 201,
  "status": "success",
  "data": {
    "id": 12345,
    "name": "Custom name",
    "company_id": 2336,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "active": true
  }
}