Leave Classification v2
- Print
- PDF
Leave Classification v2
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Description
API that sets and searches the leave classification according to the customer's personnel policy.
Leave Classification Creation API
Create leave classification settings.
Request URL
POST https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/settingLeave/{externalKey}
Request Path Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (companyId) Developers > Basic settings > Connection key |
externalKey | String | 36 | Y | Additional information external key |
Request Body Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
name | String | 100 | Y | Leave classification name |
i18nNames | Map | N | Leave classification multilingual map<Locale, String> i18nNames | |
displayOrder | int | - | Y | Display order of leave classification |
includingSalary | boolean | 10 | N | Status of payroll inclusion (default value: N) |
calculationWorkingDay | boolean | 10 | N | Status of work day inclusion (default value: N) |
Request Example
POST https://workplace.apigw.ntruss.com/organization/apigw/v2/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey
HOST: workplace.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp:1505290625682
x-ncp-apigw-api-key:DUxjP4HYTP8V7khBkgywdDHQjKuaYWGrppHKpvdv
x-ncp-iam-access-key:D78BB444D6D3C84CA38A
x-ncp-apigw-signature-v1:WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": "settingLeaveTest1",
"name": "Developers Test",
"i18nNames": {
"ko_KR": "Developers Test",
"ja_JP": "Developers Test",
"en_US": "Developers Test",
"zh_CN": "Developers Test",
"zh_TW": ""
},
"leaveCd": null,
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 1
}
Response Example
HTTP/1.1 201 OK
Server: nginx
Date: Wed, 12 Sep 2020 01:18:11 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": "settingLeaveTest1",
"name": "Developers Test2",
"i18nNames": {
"ko_KR": "Developers Test",
"ja_JP": "Developers Test",
"en_US": "Developers Test",
"zh_CN": "Developers Test",
"zh_TW": ""
},
"leaveCd": "8fd73398-b809-40bd-a71c-195769eefc45",
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 1
}
Leave Classification Edit API
Edit leave classification settings.
Request URL
PUT https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/settingLeave/{externalKey}
Request Path Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (companyId) Developers > Basic settings > Connection key |
externalKey | String | 36 | Y | Additional information external key |
Request Body Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
name | String | 100 | Y | Leave classification name |
i18nNames | Map | N | Leave classification multilingual map<Locale, String> i18nNames | |
displayOrder | int | - | Y | Display order of leave classification |
includingSalary | boolean | 10 | N | Status of payroll inclusion (default value: N) |
calculationWorkingDay | boolean | 10 | N | Status of work day inclusion (default value: N) |
Request Example
PUT https://workplace.apigw.ntruss.com/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey
HOST: workplace.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp:1505290625682
x-ncp-apigw-api-key:DUxjP4HYTP8V7khBkgywdDHQjKuaYWGrppHKpvdv
x-ncp-iam-access-key:D78BB444D6D3C84CA38A
x-ncp-apigw-signature-v1:WTPItrmMIfLUk/UyUIyoQbA/z5hq9o3G8eQMolUzTEo=
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": "settingLeaveTest1",
"name": "Developers Test2",
"i18nNames": {
"ko_KR": "Developers Test",
"ja_JP": "Developers Test",
"en_US": "Developers Test",
"zh_CN": "Developers Test",
"zh_TW": ""
},
"leaveCd": null,
"includingSalary": true,
"calculationWorkingDay": false,
"displayOrder": 99
}
Response Example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01:18:11 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": "settingLeaveTest1",
"name": "Developers Test2",
"i18nNames": {
"ko_KR": "Developers Test",
"ja_JP": "Developers Test",
"en_US": "Developers Test",
"zh_CN": "Developers Test",
"zh_TW": ""
},
"leaveCd": null,
"includingSalary": true,
"calculationWorkingDay": false,
"displayOrder": 99
}
Leave Classification Deletion API
Delete leave classification settings.
Request URL
DELETE https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/settingLeave/{externalKey}
Request Path Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (companyId) Developers > Basic settings > Connection key |
externalKey | String | 36 | Y | Additional information external key |
Leave Classification Search API
Search the requested leave classification information.
Request URL
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/settingLeave/{externalKey}
Request Header
Header name | Description |
---|---|
x-ncp-apigw-timestamp | Number of milliseconds that have elapsed since January 1, 1970 00:00:00. If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | Key value issued by API gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Value of access key ID issued on NAVER Cloud Platform portalx-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with the access key ID value and secret keyx-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Specify the request body content type as application/JSONContent-Type: application/json |
Request Path Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (companyId) Developers > Basic settings > Connection key |
Request Example
GET https://workplace.apigw.ntruss.com/organization/apigw/v1/company/187d83ad-4038-45b6-8e7c-59eca16fdc46/settingLeave/settingLeaveTest1
Response Example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01:18:11 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": "settingLeaveTest1",
"name": "Developers Test2",
"i18nNames": {
"ko_KR": "Developers Test",
"ja_JP": "Developers Test",
"en_US": "Developers Test",
"zh_CN": "Developers Test",
"zh_TW": ""
},
"leaveCd": "8fd73398-b809-40bd-a71c-195769eefc45",
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 99
}
Leave Classification List Search API
Search the requested leave classification list.
Request URL
GET https://workplace.apigw.ntruss.com/organization/apigw/v2/company/{companyId}/settingLeave
Request Header
Header name | Description |
---|---|
x-ncp-apigw-timestamp | Number of milliseconds that have elapsed since January 1, 1970 00:00:00.<br /> If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid.x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | Key value issued by API gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Value of access key ID issued on NAVER Cloud Platform portalx-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with the access key ID value and secret keyx-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Specify the request body content type as application/JSONContent-Type: application/json |
Request Path Parameters
Parameter | Type | Size | Requirement status | Description |
---|---|---|---|---|
companyId | String | 36 | Y | Connection key (companyId) Developers > Basic settings > Connection key |
Request Example
GET https://workplace.apigw.ntruss.com/organization/apigw/v1/company/187d83ad-4038-45b6-8e7c-59eca16fdc46/settingLeave
Response Example
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2020 01:18:11 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 68d1o68pm4cr63gc3169gm4p34
{
"elements": [
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": null,
"name": "Sick leave from work",
"i18nNames": {
"ko_KR": "",
"ja_JP": "",
"en_US": "",
"zh_CN": "",
"zh_TW": ""
},
"leaveCd": "e0557908-6557-474e-8c7c-e146cb1c9596",
"includingSalary": true,
"calculationWorkingDay": false,
"used": false,
"displayOrder": 1
},
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": null,
"name": "Parental leave",
"i18nNames": {
"ko_KR": "Parental leave",
"ja_JP": "",
"en_US": "",
"zh_CN": "",
"zh_TW": ""
},
"leaveCd": "268d6f39-8918-4285-b24b-43bc44d13c32",
"includingSalary": true,
"calculationWorkingDay": false,
"used": false,
"displayOrder": 2
},
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": null,
"name": "Parental leave",
"i18nNames": {
"ko_KR": "Parental leave",
"ja_JP": "",
"en_US": "",
"zh_CN": "",
"zh_TW": ""
},
"leaveCd": "cce7afd2-dbae-4050-b051-bda60c09b529",
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 2
},
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": null,
"name": "Unpaid leave",
"i18nNames": {
"ko_KR": "Unpaid leave",
"ja_JP": "",
"en_US": "",
"zh_CN": "",
"zh_TW": ""
},
"leaveCd": "7ca204a4-c175-4f63-bf5d-b76c72ed0a03",
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 3
},
{
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"externalKey": null,
"name": "Sick leave (80%)",
"i18nNames": {
"ko_KR": "Sick leave (80%)",
"ja_JP": "",
"en_US": "",
"zh_CN": "",
"zh_TW": ""
},
"leaveCd": "0f975ff7-ca28-4510-8ea7-3236f8bc0d11",
"includingSalary": true,
"calculationWorkingDay": false,
"used": true,
"displayOrder": 4
}
],
"totalCount": 12
}
Response
Returned as an HTTP status code and delivered as body information.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | General request made successfully |
201 | Created | Response code for the success of resource creation |
400 | Bad Request | Used for failed general request (usually used to respond to a request format that the server can't understand) |
500 | Internal Server Error | - Response code for general server error<br/>If 4xx error codes are used to represent client-side errors, <br/>5xx error codes are used to represent server-side errors. |
Was this article helpful?