Moves an employee to a different benefit model
curl --request POST \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move"
payload = { "modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'modelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move"
payload := strings.NewReader("{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"message": "body/modelId must match format \"uuid\""
}{
"message": "Benefit model 97104a5d-e7fb-4506-8f04-ccca51a58e8a not found."
}{
"message": "Employee cannot be moved to this benefit model"
}{
"message": "Internal server error"
}Employees
Move employee
POST
/
companies
/
{companyId}
/
employees
/
{employeeId}
/
move
Moves an employee to a different benefit model
curl --request POST \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move"
payload = { "modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'modelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move"
payload := strings.NewReader("{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/move")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"modelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"message": "body/modelId must match format \"uuid\""
}{
"message": "Benefit model 97104a5d-e7fb-4506-8f04-ccca51a58e8a not found."
}{
"message": "Employee cannot be moved to this benefit model"
}{
"message": "Internal server error"
}Overview
Move an employee to a different benefit model within the same company. On success, the endpoint returns204 No Content with an empty body — the employee’s benefit model has been updated and no further payload is returned.
Error responses
| Status | When it happens |
|---|---|
400 Bad Request | The request body is missing modelId or it is not a valid UUID. |
404 Not Found | The destination benefit model ID does not exist for the company. |
409 Conflict | The employee cannot be moved to the given benefit model (e.g. incompatible benefit configuration). |
500 Internal Server Error | An unexpected error occurred while processing the request. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the company
The unique identifier of the employee
Body
application/json
The destination benefit model for the employee
The unique identifier of the destination benefit model
Response
Employee moved successfully