Skip to main content
POST
/
companies
/
{companyId}
/
employees
/
{employeeId}
/
migrate
Migrates an employee from one company to another within the same corporation
curl --request POST \
  --url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/migrate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "newCompanyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "legalId": "<string>",
  "name": "<string>",
  "surname": "<string>",
  "birthDate": "2023-12-25",
  "grossSalary": {
    "amountInCents": 4500000,
    "currency": "EUR"
  },
  "hiringDate": "2023-12-25",
  "taxRegime": "general",
  "internalId": "<string>",
  "costCenter": "<string>",
  "payrollCompany": "<string>",
  "metadata": {
    "department": "Finance",
    "manager": "Jane Doe",
    "office": "Madrid"
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Overview

Migrate an employee from one company to another within the same Corporation. This will terminate the employee on the original company and will create a new one on the new company.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

companyId
string<uuid>
required

The unique identifier of the company

employeeId
string<uuid>
required

The unique identifier of the employee

Body

application/json

Employee data neeeded for the new company

newCompanyId
string<uuid>
required

The id of the destination company

email
string<email>
required

The employee's email address

The employee's legal identifier

name
string
required

The employee's first name

surname
string
required

The employee's surname

birthDate
string<date>
required

The employee's date of birth in ISO 8601 format (YYYY-MM-DD)

grossSalary
object
required

The employee's gross salary details

Example:
{
"amountInCents": 4500000,
"currency": "EUR"
}
hiringDate
string<date>
required

The date when the employee was hired in ISO 8601 format (YYYY-MM-DD)

taxRegime
enum<string>
required

The employee's tax regime

Available options:
general,
basque,
navarrese,
biscayan
internalId
string

Your internal identifier for the employee

costCenter
string

The cost centre associated with this employee

payrollCompany
string

The company handling the employee's payroll, if different from the main company

metadata
object

Additional metadata for the employee (key-value pairs)

Example:
{
"department": "Finance",
"manager": "Jane Doe",
"office": "Madrid"
}

Response

The employee was already on the destination company. No migration was needed

id
string<uuid>

The unique identifier of the employee