Leave Classification v2
    • PDF

    Leave Classification v2

    • PDF

    Article Summary

    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

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YConnection key (companyId) Developers > Basic settings > Connection key
    externalKeyString36YAdditional information external key

    Request Body Parameters

    ParameterTypeSizeRequirement statusDescription
    nameString100YLeave classification name
    i18nNamesMapNLeave classification multilingual map<Locale, String> i18nNames
    displayOrderint-YDisplay order of leave classification
    includingSalaryboolean10NStatus of payroll inclusion (default value: N)
    calculationWorkingDayboolean10NStatus 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

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YConnection key (companyId) Developers > Basic settings > Connection key
    externalKeyString36YAdditional information external key

    Request Body Parameters

    ParameterTypeSizeRequirement statusDescription
    nameString100YLeave classification name
    i18nNamesMapNLeave classification multilingual map<Locale, String> i18nNames
    displayOrderint-YDisplay order of leave classification
    includingSalaryboolean10NStatus of payroll inclusion (default value: N)
    calculationWorkingDayboolean10NStatus 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

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YConnection key (companyId) Developers > Basic settings > Connection key
    externalKeyString36YAdditional 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 nameDescription
    x-ncp-apigw-timestampNumber 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-keyKey value issued by API gateway
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-keyValue of access key ID issued on NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v1Signature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v1:{API Gateway Signature}
    Content-TypeSpecify the request body content type as application/JSON
    Content-Type: application/json

    Request Path Parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YConnection 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 nameDescription
    x-ncp-apigw-timestampNumber 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-keyKey value issued by API gateway
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-keyValue of access key ID issued on NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v1Signature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v1:{API Gateway Signature}
    Content-TypeSpecify the request body content type as application/JSON
    Content-Type: application/json

    Request Path Parameters

    ParameterTypeSizeRequirement statusDescription
    companyIdString36YConnection 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 codeResponse messageDescription
    200OKGeneral request made successfully
    201CreatedResponse code for the success of resource creation
    400Bad RequestUsed for failed general request (usually used to respond to a request format that the server can't understand)
    500Internal 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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.