# Quinyx API

Version: v3

## Servers

Production
```
https://api.{region}.quinyx.com
```

Variables:
- `region`
  Default: "eu"
  Enum: "eu", "na"

RC
```
https://api.{region}.rc.quinyx.com
```

Variables:
- `region`
  Default: "eu"
  Enum: "eu", "na"

## Security

### OAuth2ClientCredentials

OAuth2 Client Credentials flow. See https://developer.quinyx.com/api/v3/authentication

Type: oauth2
Token URL: /oauth/v3/token
Scopes:
- `hr:agreements:create`: 
- `hr:agreements:delete`: 
- `hr:agreements:read`: 
- `hr:agreements:update`: 
- `hr:employees:create`: 
- `hr:employees:delete`: 
- `hr:employees:read`: 
- `hr:employees:update`: 
- `organization:groups:create`: 
- `organization:groups:delete`: 
- `organization:groups:read`: 
- `organization:groups:update`: 
- `hr:role-assignments:create`: 
- `hr:role-assignments:delete`: 
- `hr:role-assignments:read`: 
- `hr:role-assignments:update`: 
- `organization:roles:read`: 
- `schedule:shifts:read`: 
- `statistics:nominal-hours-reports:create`: 
- `statistics:nominal-hours-reports:read`: 

## Download OpenAPI description

 - [Quinyx API](https://developer.quinyx.com/_bundle/api/v3/specs/quinyx-public-api-v3.yaml)

## Access Token

 - [POST /oauth/v3/token](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/access-token/gettoken.md): Operation returns the OAuth2 token that can be used in API calls
## Group

 - [GET /organization/v3/groups/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/group/getgroup.md): Returns a group by ID.
 - [PUT /organization/v3/groups/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/group/updategroup.md): Updates the specified group with the provided attributes and returns the updated group.
 - [DELETE /organization/v3/groups/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/group/deletegroup.md): Permanently deletes the specified group and all associated data, including but not limited to employees, shifts, and punches.
 - [GET /organization/v3/groups](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/group/getgroups.md): Returns a paginated list of groups.
 - [POST /organization/v3/groups](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/group/creategroup.md): Creates a new group and returns the created group.
## Role

 - [GET /organization/v3/roles](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role/getroles.md): Returns a paginated list of roles.
 - [GET /organization/v3/roles/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role/getrole.md): Returns a role by ID.
## Employee

 - [GET /hr/v3/employees/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/getemployee.md): Retrieves a single employee by its identifier.
 - [PUT /hr/v3/employees/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/updateemployee.md): Updates the specified employee with the provided attributes and returns it. An `email`, `badgeNumber` or `employment.cardNumber` already used by another employee is answered with a conflict. Each valu
 - [DELETE /hr/v3/employees/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/deleteemployee.md): Permanently deletes an employee
 - [PATCH /hr/v3/employees/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/patchemployee.md): Partially updates the specified employee with the provided attributes and returns it. The request body is a JSON Merge Patch (RFC 7396) shaped like the employee the corresponding `GET` returns. A prop
 - [GET /hr/v3/employees](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/getemployees.md): Returns a paginated list of employees.
 - [POST /hr/v3/employees](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/employee/createemployee.md): Creates and returns the created employee. An `email`, `badgeNumber` or `employment.cardNumber` already used by another employee is answered with a conflict. Each value must have the JSON type the sche
## Agreement

 - [GET /hr/v3preview1/agreements](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/agreement/getagreements.md): Returns a paginated list of agreements. At least one of employeeId, badgeNumber, groupId or templateId is required.
 - [POST /hr/v3preview1/agreements](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/agreement/createagreement.md): Creates an agreement for an employee and returns it. Only the required fields have to be sent; every other value is taken from the agreement template named by details.templateId. Supply an xrefId to m
 - [GET /hr/v3preview1/agreements/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/agreement/getagreement.md): Returns a single agreement
 - [DELETE /hr/v3preview1/agreements/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/agreement/deleteagreement.md): Permanently deletes an agreement
 - [PATCH /hr/v3preview1/agreements/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/agreement/patchagreement.md): Applies a JSON Merge Patch (RFC 7396) to the agreement and returns the whole agreement as it now is. Only the properties in the request change: a property left out is kept as it is, and a property set
## Role Assignment

 - [GET /hr/v3/role-assignments](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role-assignment/listroleassignments.md): Returns a paginated list of role assignments.
 - [POST /hr/v3/role-assignments](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role-assignment/createroleassignment.md): Creates a new role assignment for an employee.
 - [DELETE /hr/v3/role-assignments/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role-assignment/deleteroleassignment.md): Deletes a role assignment by ID.
 - [PATCH /hr/v3/role-assignments/{id}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/role-assignment/updateroleassignment.md): Updates the start date and/or end date of a role assignment.
## Shift

 - [GET /schedule/v3/shifts](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/shift/getshifts.md): Returns shifts using cursor-based pagination. Supports: - Numeric internal IDs - External IDs using prefix 'xrefId:' - Employee badge numbers using prefix 'badgeNumber:' - Timezone override via Prefer
## Nominal Hours Report

 - [GET /statistics/v3preview1/nominal-hours-reports](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/nominal-hours-report/listreports.md): The customer's reports, newest first. Follow pagination.nextPageToken until it is absent.
 - [POST /statistics/v3preview1/nominal-hours-reports](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/nominal-hours-report/createreport.md): Accepts a report for the period and, optionally, employees and groups. The report is generated in the background: poll the Location until the status is terminal.
 - [GET /statistics/v3preview1/nominal-hours-reports/{reportId}](https://developer.quinyx.com/api/v3/specs/quinyx-public-api-v3/nominal-hours-report/getreport.md): Status of the report and, once it succeeded, a download link valid for 15 minutes. The link differs on every read: do not cache or persist it.
