cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/employees/emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.employees.get_employee("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4")
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.employees.getEmployee('emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->employees->getEmployee('emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.employees.employees_dto.EmployeesDto.Employee;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Employee> response = client.employees().getEmployee("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Employees.GetEmployeeAsync("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.employees.getEmployee(
'emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Employees().GetEmployee(context.Background(), "emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4", nil, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"employee": {
"activity_logs": "<array>",
"code": "<string>",
"contacts": [
{
"address": null,
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"email": {
"address": "<string>",
"email_opted_out": true
},
"fax": null,
"id": "<string>",
"last_updated_by": null,
"last_updated_on": null,
"mobile": null,
"name": {
"designation": null,
"first": "<string>",
"last": "<string>",
"middle": null,
"salutation": null
},
"object": "<string>",
"phone": null,
"status": "<string>",
"type": "<string>",
"version": 123
}
],
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"custom_attributes": "<array>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"description": "<string>",
"display_name": "<string>",
"email_address": "<string>",
"href": "<string>",
"id": "<string>",
"image_uuid": null,
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"version": 123
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Employees
Retrieve an employee
Retrieves one employee by its emp_ id.
GET
/
employees
/
{employee_id}
cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/employees/emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.employees.get_employee("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4")
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.employees.getEmployee('emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->employees->getEmployee('emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.employees.employees_dto.EmployeesDto.Employee;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Employee> response = client.employees().getEmployee("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Employees.GetEmployeeAsync("emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.employees.getEmployee(
'emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Employees().GetEmployee(context.Background(), "emp_7b3c9d1e2f4a4b5c8d6e7f8091a2b3c4", nil, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"employee": {
"activity_logs": "<array>",
"code": "<string>",
"contacts": [
{
"address": null,
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"email": {
"address": "<string>",
"email_opted_out": true
},
"fax": null,
"id": "<string>",
"last_updated_by": null,
"last_updated_on": null,
"mobile": null,
"name": {
"designation": null,
"first": "<string>",
"last": "<string>",
"middle": null,
"salutation": null
},
"object": "<string>",
"phone": null,
"status": "<string>",
"type": "<string>",
"version": 123
}
],
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"custom_attributes": "<array>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"description": "<string>",
"display_name": "<string>",
"email_address": "<string>",
"href": "<string>",
"id": "<string>",
"image_uuid": null,
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"version": 123
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Returns the employee under
employee, including contacts, custom_attributes and activity_logs.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token.