Set leave types
- Print
- PDF
Set leave types
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Description
Sets and gets leave types based on your company’s personnel policy.
Get leave types
Gets all leave types.
Request URL
GET https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/settingLeave
Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid. x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-apigw-api-key | API key issued by API Gatewayx-ncp-apigw-api-key:{API Gateway API Key} |
x-ncp-iam-access-key | Access Key ID issued from the NAVER CLOUD PLATFORM portal. x-ncp-iam-access-key:{Account Access Key} |
x-ncp-apigw-signature-v1 | Signature encrypted with your Access Key ID and Secret Key. x-ncp-apigw-signature-v1:{API Gateway Signature} |
Content-Type | Set the request body content type to application/json.Content-Type: application/json |
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
Request example
GET https://workplace.apigw.ntruss.com/organization/apigw/v1/company/187d83ad-4038-45b6-8e7c-59eca16fdc46/settingLeave
Response example
{
"timestamp": "2019-12-13 17:51:11",
"status": 200,
"error": null,
"message": null,
"path": "/organization/apigw/v1/company/aecd6274-e826-4f85-88ee-e46668f46941/settingLeave",
"body": [
{
"tenantId": "aecd6274-e826-4f85-88ee-e46668f46941",
"companyId": "aecd6274-e826-4f85-88ee-e46668f46941",
"name": "육아휴직",
"i18nNames": {
"zh_CN": "产假",
"ja_JP": "育児休職",
"ko_KR": "육아휴직",
"zh_TW": "育嬰假",
"en_US": "Maternity leave"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": null,
"sortOrder": "1",
"tid": null
},
{
"tenantId": "aecd6274-e826-4f85-88ee-e46668f46941",
"companyId": "aecd6274-e826-4f85-88ee-e46668f46941",
"name": "업무상상병휴직",
"i18nNames": {
"zh_CN": "业务上病假",
"ja_JP": "業務上傷病休職",
"ko_KR": "업무상상병휴직",
"zh_TW": "因公傷休假",
"en_US": "Sick Leave caused on the job"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": null,
"sortOrder": "2",
"tid": null
}
]
}
Create leave types
Creates a leave type.
Request URL
POST https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/settingLeave/{externalKey}
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | Additional property’s external key |
Request body parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
name | String | 100 | Y | Property name |
i18nNames | Map | N | Property name in multiple languages Map<Locale, String> i18nNames | |
payYn | String | Y | Indicates whether to reflect salaries. | |
workDcalcYn | String | N | Indicates whether to calculate the number of working days. | |
sortOrder | Int | N | Order |
Request example
POST 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",
"name" : "안식휴직",
"i18nNames" : {
"en_US" : "restLeaveAbsence"
},
"payYn" : "PAID",
"workDcalcYn" : "Y",
"sortOrder" : 10
}
Response example
{
"timestamp": "2019-12-13 18:07:54",
"status": 200,
"error": null,
"message": null,
"path": "/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey",
"agsettingLeaveVO": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직",
"i18nNames": {
"en_US": "restLeaveAbsence"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": "absenceleaveExternalkey",
"sortOrder": "10",
"tid": "absenceleaveExternalkey"
},
"body": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직",
"i18nNames": {
"en_US": "restLeaveAbsence"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": "absenceleaveExternalkey",
"sortOrder": "10",
"tid": "absenceleaveExternalkey"
}
}
Edit leave types
Edits a leave type.
Request URL
PUT https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/settingLeave/{externalKey}
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | Additional property’s external key |
Request body parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
name | String | 100 | Y | Property name |
i18nNames | Map | N | Property name in multiple languages Map<Locale, String> i18nNames | |
payYn | String | Y | Indicates whether to reflect salaries. | |
workDcalcYn | String | N | Indicates whether to calculate the number of working days. | |
sortOrder | Int | N | Order |
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",
"name" : "안식휴직수정",
"i18nNames" : {
"en_US" : "restLeaveAbsenceV2"
},
"payYn" : "NPAID",
"workDcalcYn" : "N",
"sortOrder" : 20
}
Response example
{
"timestamp": "2019-12-13 18:07:54",
"status": 200,
"error": null,
"message": null,
"path": "/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey",
"agsettingLeaveVO": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": "absenceleaveExternalkey",
"sortOrder": "10",
"tid": "absenceleaveExternalkey"
},
"body": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "PAID",
"workDcalcYn": "Y",
"externalKey": "absenceleaveExternalkey",
"sortOrder": "10",
"tid": "absenceleaveExternalkey"
}
}
Delete leave types
Deletes a leave type.
Request URL
DELETE https://workplace.apigw.ntruss.com/organization/apigw/v1/company/{companyId}/settingLeave/{externalKey}
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId). Developers > Basic Settings > API Key |
externalKey | String | 36 | Y | Additional property’s external key |
Request path parameters
Parameter | Type | Length | Required | Description |
---|---|---|---|---|
companyId | String | 36 | Y | API key (CompanyId) |
externalKey | String | 36 | Y | Leave type key (externalKey) |
Request example
DELETE https://workplace.apigw.ntruss.com/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey22
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=
{
"timestamp": "2019-12-13 18:33:03",
"status": 200,
"error": null,
"message": null,
"path": "/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey22",
"agsettingLeaveVO": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "NPAID",
"workDcalcYn": "N",
"externalKey": "absenceleaveExternalkey",
"sortOrder": null,
"tid": "absenceleaveExternalkey"
},
"body": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "NPAID",
"workDcalcYn": "N",
"externalKey": "absenceleaveExternalkey22",
"sortOrder": null,
"tid": "absenceleaveExternalkey22"
}
}
Response example
{
"timestamp": "2019-12-15 23:51:03",
"status": 200,
"error": null,
"message": null,
"path": "/organization/apigw/v1/company/e721e2da-29ee-4782-9672-3d2b150ac1a6/settingLeave/absenceleaveExternalkey22",
"agsettingLeaveVO": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "NPAID",
"workDcalcYn": "N",
"externalKey": "absenceleaveExternalkey22",
"sortOrder": null,
"tid": "absenceleaveExternalkey22"
},
"body": {
"tenantId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"companyId": "e721e2da-29ee-4782-9672-3d2b150ac1a6",
"name": "안식휴직수정",
"i18nNames": {
"en_US": "restLeaveAbsenceV2"
},
"payYn": "NPAID",
"workDcalcYn": "N",
"externalKey": "absenceleaveExternalkey22",
"sortOrder": null,
"tid": "absenceleaveExternalkey22"
}
}
Response
It returns an HTTP status code in the response body.
HTTP status code | Response message | Description |
---|---|---|
200 | OK | Success |
201 | Created | Resource successfully created. |
400 | Bad Request | Failure (It is usually used to respond to the request format that the server cannot understand.) |
500 | Internal Server Error | General server error. Whereas 4xx error codes represent client-side errors, 5xx error codes represent server-side errors. |
Was this article helpful?