# Sesame HR

> Read employee records, office assignments, and leave settings.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/sesame-hr

## Actions

### Get a job title

Get a job title.

**Inputs**

- Job charge ID (`job_charge_id`, text, required): Identifier of the job charge level

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": {
      "editable": true,
      "id": "example",
      "name": "example"
    },
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### Get a location

Get a location.

**Inputs**

- Location (`location_id`, text, required): Location id

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": {
      "address": "example",
      "companyId": "example",
      "coordinates": {
        "latitude": 1,
        "longitude": 1
      },
      "createdAt": "example",
      "id": "example",
      "name": "example",
      "radius": 1,
      "updatedAt": "example"
    },
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### Get an employee

Get an employee.

**Inputs**

- Employee (`employee_id`, text, required): Employee ID

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": {
      "accountNumber": "example",
      "address": "example",
      "beneficiaryName": "example",
      "bic": "example",
      "children": 1,
      "city": "example",
      "code": 1,
      "company": {
        "createdAt": "example",
        "id": "example",
        "language": "example",
        "name": "example",
        "notificationEmail": "example",
        "updatedAt": "example"
      },
      "contractId": "example",
      "contributionGroupId": "example",
      "country": "example",
      "createdAt": "example",
      "customFields": [
        {}
      ],
      "dateOfBirth": "example",
      "description": "example",
      "disability": 1,
      "email": "example",
      "emergencyPhone": "example",
      "firstName": "example",
      "gender": "female",
      "id": "example",
      "identityNumberType": "dni",
      "imageProfileURL": "example",
      "integrationCode": "example",
      "jobChargeCompetencies": "example",
      "jobChargeDescription": "example",
      "jobChargeId": "example",
      "jobChargeName": "example",
      "language": "example",
      "lastName": "example",
      "legalEntity": {
        "id": "example",
        "name": "example"
      },
      "mainRecruiter": {
        "email": "example",
        "firstName": "example",
        "id": "example",
        "imageProfileURL": "example",
        "lastName": "example",
        "secondLastName": "example",
        "workCheckTypeColor": "example",
        "workCheckTypeName": "example",
        "workStatus": "online"
      },
      "maritalStatus": "example",
      "nationalities": [
        "example"
      ],
      "nationality": "example",
      "nfc": "example",
      "nid": "example",
      "personalMail": "example",
      "phone": "example",
      "pin": 1,
      "postalCode": "example",
      "pricePerHour": 1,
      "professionalCategoryCode": "example",
      "professionalCategoryDescription": "example",
      "province": "example",
      "salaryRange": "example",
      "secondLastName": "example",
      "secondaryIdentityNumberType": "dni",
      "secondaryNid": "example",
      "ssn": "example",
      "status": "active",
      "studyLevel": "example",
      "updatedAt": "example",
      "workPhone": "example",
      "workStatus": "online",
      "workStatusUpdatedAt": "example"
    },
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### Get an office

Get an office.

**Inputs**

- Office (`office_id`, text, required): Find office by Id

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": {
      "address": "example",
      "archivedAt": "example",
      "coordinates": {
        "latitude": 1,
        "longitude": 1
      },
      "defaultEmployeesDateTimeZone": "example",
      "description": "example",
      "id": "example",
      "isArchived": true,
      "isDeleted": true,
      "name": "example",
      "radio": 1
    },
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### Get company information

Get company information.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": {
      "company": {
        "createdAt": "example",
        "id": "example",
        "language": "example",
        "name": "example",
        "notificationEmail": "example",
        "updatedAt": "example"
      }
    },
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List absence types

List absence types.

**Inputs**

- Status (`status`, text): Absence type status. One of: `active`, `inactive`.
- Limit (`limit`, number): Limit results
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "accumulative": true,
        "category": "sick_leave",
        "color": "example",
        "company": {},
        "createdAt": "example",
        "creationDateNextYear": "example",
        "customId": "example",
        "deletedAt": "example",
        "documentMode": "mandatory",
        "id": "example",
        "maxDateToTakeAbsence": "example",
        "maxPerPeriod": {},
        "name": "example",
        "needsValidation": true,
        "pickMode": "by_days",
        "remuneratedType": "remunerated",
        "status": "active",
        "type": "normal",
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List custom fields

List custom fields.

**Inputs**

- Limit (`limit`, number): Limit custom fields
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "companyId": "example",
        "createdAt": "example",
        "id": "example",
        "name": "example",
        "slug": "example",
        "type": "text",
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List department assignments

List department assignments.

**Inputs**

- Employee ID (`employee_id`, text): Find Assignation by employeeId
- Department ID (`department_id`, text): Find Assignation by departmentId
- Limit (`limit`, number): Limit assignations
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "department": {},
        "employee": {},
        "id": "example",
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List departments

List departments.

**Inputs**

- Name (`name`, text): Find Department by name
- Limit (`limit`, number): Limit departments
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List employee managers

List employee managers.

**Inputs**

- Employee ID (`employee_id`, text): Find employee managers by employeeId
- Limit (`limit`, number): Limit departments
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "employee": {},
        "id": "example",
        "manager": {},
        "order": 0,
        "permission": "checksManageRequestsAndIncidences",
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List employees

List employees.

**Inputs**

- Email (`email`, text): Find Employee by email
- Limit (`limit`, number): Limit employees
- Page (`page`, number): Request a specific page
- Status (`status`, text): <b>Supported operators:</b> in <b>Example:</b> status[in]=active,inactive By default, only <b>active</b> employees are returned. One of: `active`, `inactive`.

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "accountNumber": "example",
        "address": "example",
        "beneficiaryName": "example",
        "bic": "example",
        "children": 1,
        "city": "example",
        "code": 1,
        "company": {},
        "contractId": "example",
        "contributionGroupId": "example",
        "country": "example",
        "createdAt": "example",
        "customFields": [
          {}
        ],
        "dateOfBirth": "example",
        "description": "example",
        "disability": 1,
        "email": "example",
        "emergencyPhone": "example",
        "firstName": "example",
        "gender": "female",
        "id": "example",
        "identityNumberType": "dni",
        "imageProfileURL": "example",
        "integrationCode": "example",
        "jobChargeCompetencies": "example",
        "jobChargeDescription": "example",
        "jobChargeId": "example",
        "jobChargeName": "example",
        "language": "example",
        "lastName": "example",
        "legalEntity": {},
        "mainRecruiter": {},
        "maritalStatus": "example",
        "nationalities": [
          "example"
        ],
        "nationality": "example",
        "nfc": "example",
        "nid": "example",
        "personalMail": "example",
        "phone": "example",
        "pin": 1,
        "postalCode": "example",
        "pricePerHour": 1,
        "professionalCategoryCode": "example",
        "professionalCategoryDescription": "example",
        "province": "example",
        "salaryRange": "example",
        "secondLastName": "example",
        "secondaryIdentityNumberType": "dni",
        "secondaryNid": "example",
        "ssn": "example",
        "status": "active",
        "studyLevel": "example",
        "updatedAt": "example",
        "workPhone": "example",
        "workStatus": "online",
        "workStatusUpdatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List entity groups

List entity groups.

**Inputs**

- Employee ID (`employee_id`, text): finds entity groups by employeeId
- Limit (`limit`, number): Limit assignations
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "costCenter": true,
        "description": "example",
        "employeesCount": 1,
        "groupId": "example",
        "id": "example",
        "name": "example",
        "parentId": "example",
        "showGroup": true
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List holiday calendars

List holiday calendars.

**Inputs**

- Employee ID (`employee_id`, text, required): Employee ID
- Limit (`limit`, number): Limit results
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "dayOff": {},
        "employee": {}
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List job titles

List job titles.

**Inputs**

- Name (`name`, text): Find job charges whose `Job charge - Level` name contains the given text
- Limit (`limit`, number): Limit job charges
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "editable": true,
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List locations

List locations.

**Inputs**

- Page (`page`, number): Page number. At least 1.
- Limit (`limit`, number): Items per page. At least 1.

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "address": "example",
        "companyId": "example",
        "coordinates": {},
        "createdAt": "example",
        "id": "example",
        "name": "example",
        "radius": 1,
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List office assignments

List office assignments.

**Inputs**

- Employee ID (`employee_id`, text): Find Assignation by employeeId
- Office ID (`office_id`, text): Find Assignation by officeId
- Limit (`limit`, number): Limit assignations
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "employee": {},
        "id": "example",
        "isMainOffice": true,
        "office": {},
        "updatedAt": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List offices

List offices.

**Inputs**

- Name (`name`, text): Find office by name
- Limit (`limit`, number): Limit offices
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "address": "example",
        "archivedAt": "example",
        "coordinates": {},
        "defaultEmployeesDateTimeZone": "example",
        "description": "example",
        "id": "example",
        "isArchived": true,
        "isDeleted": true,
        "name": "example",
        "radio": 1
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List roles

List roles.

**Inputs**

- Limit (`limit`, number): Limit departments
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```

### List roles assigned to an employee

List roles assigned to an employee.

**Inputs**

- Employee ID (`employee_id`, text, required): Employee Id
- Limit (`limit`, number): Limit departments
- Page (`page`, number): Request a specific page

**Outputs**

- `data` (object): The response from Sesame HR.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "affectedEntityId": "example",
        "affectedEntityType": "example",
        "id": "example",
        "role": {}
      }
    ],
    "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "perPage": 1,
      "total": 1
    }
  }
}
```
