Add Employment Types

    Adds employment types.

    Note

    • The useEmploymentType parameter for the domain should be set to "true" to add employment types.

    API Type

    Server API

    Request URL

    • Live environment: https://apis.worksmobile.com/r/{API ID}/organization/v2/domains/{domainId}/employtypes
    • Testing environment: https://sandbox-apis.worksmobile.com/r/{API ID}/organization/v2/domains/{domainId}/employtypes

    HTTP Method

    POST (Content-Type: application/json; charset=UTF-8)

    Parameter Type Length Required Description
    domainId Integer Y Domain ID

    Request Body

    Parameter Type Length Required Description
    name String 100 characters Y Employment type name.
    It must be unique in the domain.
    The following special characters are allowed: !@&()-_+[]{},./
    externalKey String 100 characters Y An external key for employment types (up to 100 bytes).
    It must be unique in the tenant.
    Special characters, \%#/? are not allowed.
    sortLevel Integer Y Sort order.
    A negative number or duplicate number is allowed. Based on this value, employment types are sorted in ascending order.
    i18nNames List N Names by language code.
    Refer to Language/Timezone Code.
       name String 100 characters Y Name.
    The following special characters are allowed: !@&()-_+[]{},./
       language String Y Language

    Request Example

    POST https://apis.worksmobile.com/r/apiid/organization/v2/domains/123/employtypes
    
    {
        "externalKey": "EX123",
        "name": "아르바이트",
        "sortLevel": 5,
        "i18nNames": [
            {
              "name":"アルバイト",
              "language":"ja_JP"
            },
            {
              "name":"Contract Employee",
              "language":"en_US"
            },
            {
              "name":"合同员工",
              "language":"zh_CN"
            },
            {
              "name":"合同員工",
              "language":"zh_TW"
            }
        ]
    }
    

    Response

    It returns HTTP status 200 with properties of a new employment type as a response when the API call is successful.

    Response Example

    {
        "externalKey": "EX123",
        "name": "아르바이트",
        "sortLevel": 5,
        "i18nNames": [
            {
              "name":"アルバイト",
              "language":"ja_JP"
            },
            {
              "name":"Contract Employee",
              "language":"en_US"
            },
            {
              "name":"合同员工",
              "language":"zh_CN"
            },
            {
              "name":"合同員工",
              "language":"zh_TW"
            }
        ]
    }
    

    Error Code

    It returns an error code and message when the API call fails.
    Refer to Organization Integration REST API Error Codes for details.