Employees

Get employees

GET/v2/employees
Query parameters
Header parameters
Response

Success

Body
Resultsnullable array of Adopto.Common.Api.Dto.Settings.EmployeeWriteRead (object)
Countinteger (int32)
Pageinteger (int32)
PerPageinteger (int32)
PagesAdopto.Common.Api.Dto.Paging.Pages (object)
IdResultsnullable array of Adopto.Common.Api.Dto.Settings.EmployeeWriteRead (object)
OriginalCountnullable integer (int32)
Request
const response = await fetch('/v2/employees', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "Results": [
    {
      "FirstName": "text",
      "LastName": "text",
      "Name": "text",
      "Email": "text",
      "ExternalId": "text",
      "Uid": "123e4567-e89b-12d3-a456-426614174000",
      "Department": {
        "Name": "text"
      },
      "LastEmail": "2024-11-21T06:29:12.285Z"
    }
  ],
  "Pages": {
    "First": "text",
    "Prev": "text",
    "Next": "text",
    "Last": "text"
  },
  "IdResults": [
    {
      "FirstName": "text",
      "LastName": "text",
      "Name": "text",
      "Email": "text",
      "ExternalId": "text",
      "Uid": "123e4567-e89b-12d3-a456-426614174000",
      "Department": {
        "Name": "text"
      },
      "LastEmail": "2024-11-21T06:29:12.285Z"
    }
  ]
}

Create employee

POST/v2/employees
Header parameters
Body
Idinteger (int32)
FirstNamenullable string
LastNamenullable string
Namenullable string
Emailnullable string
ExternalIdnullable string
Uidstring (uuid)
DepartmentAdopto.Common.Api.Dto.DepartmentSimpleReadOnly (object)
LastEmailnullable string (date-time)
Response

Created

Body
Idinteger (int32)
FirstNamenullable string
LastNamenullable string
Namenullable string
Emailnullable string
ExternalIdnullable string
Uidstring (uuid)
DepartmentAdopto.Common.Api.Dto.DepartmentSimpleReadOnly (object)
LastEmailnullable string (date-time)
Request
const response = await fetch('/v2/employees', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "FirstName": "text",
  "LastName": "text",
  "Name": "text",
  "Email": "text",
  "ExternalId": "text",
  "Uid": "123e4567-e89b-12d3-a456-426614174000",
  "Department": {
    "Name": "text"
  },
  "LastEmail": "2024-11-21T06:29:12.285Z"
}

Get employee

GET/v2/employees/{id}
Path parameters
id*integer (int32)
Header parameters
Response

Success

Body
Idinteger (int32)
FirstNamenullable string
LastNamenullable string
Namenullable string
Emailnullable string
ExternalIdnullable string
Uidstring (uuid)
DepartmentAdopto.Common.Api.Dto.DepartmentSimpleReadOnly (object)
LastEmailnullable string (date-time)
Request
const response = await fetch('/v2/employees/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "FirstName": "text",
  "LastName": "text",
  "Name": "text",
  "Email": "text",
  "ExternalId": "text",
  "Uid": "123e4567-e89b-12d3-a456-426614174000",
  "Department": {
    "Name": "text"
  },
  "LastEmail": "2024-11-21T06:29:12.285Z"
}

Save employee

PUT/v2/employees/{id}
Path parameters
id*integer (int32)
Header parameters
Body
Idinteger (int32)
FirstNamenullable string
LastNamenullable string
Namenullable string
Emailnullable string
ExternalIdnullable string
Uidstring (uuid)
DepartmentAdopto.Common.Api.Dto.DepartmentSimpleReadOnly (object)
LastEmailnullable string (date-time)
Response

Success

Request
const response = await fetch('/v2/employees/{id}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "Message": "text",
  "Errors": [
    {
      "Field": "text",
      "Message": "text"
    }
  ]
}

Delete employee

DELETE/v2/employees/{id}
Path parameters
id*integer (int32)
Header parameters
Response

No Content

Request
const response = await fetch('/v2/employees/{id}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "Message": "text",
  "Errors": [
    {
      "Field": "text",
      "Message": "text"
    }
  ]
}

Sync all employees

POST/v2/employees/sync
Header parameters
Body
FirstNamenullable string
LastNamenullable string
Emailnullable string
ExternalIdnullable string
Departmentnullable string
Response

Created

Request
const response = await fetch('/v2/employees/sync', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify([
      {}
    ]),
});
const data = await response.json();
Response
{
  "Message": "text",
  "Errors": [
    {
      "Field": "text",
      "Message": "text"
    }
  ]
}

Last updated