POST/directory/employment-types

Adds a user type.

Note

  • The useEmploymentType parameter for the domain must be set to "true" to use this API operation.

Caution
Support for this API operation is scheduled to end. Please use Add a user type.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/employment-types

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
domainId integer 

Domain ID of the employment type


required
format : int32 
displayOrder integer 

Sort order. A negative or duplicate number is allowed. Based on this value, items are sorted in ascending order.


required
format : int32 
employmentTypeName string 

Employment type name. It must be unique within the domain. The allowed special characters are ! @ & ( ) - _ + [ ] { } , . /.


required
maxLength : 100 
employmentTypeExternalKey string 

Employment type external key. It must be unique within a tenant.
Some special characters, \ % # / ? are not allowed.


maxLength : 100
nullable : true 
i18nNames array (i18nName) 

Multi-language information.
It shows only the languages specified under Settings > Company Information > Set Multi-language in the LINE WORKS Admin.

 
userTypeCode string 

User type code. It can include any combination of alphabetic characters (A-Z, a-z), numbers (0-9), or underline symbols (_) and can be up to 50 characters long. It must start with an English letter.


maxLength : 50
nullable : true 

i18nName

PropertyTypeDescription
name string 

Multilingual name


required
minLength : 1
maxLength : 100 
language string 

Language code


required
Allowed values : ko_KR, en_US, ja_JP, zh_CN, zh_TW 

Request Example

example

1{2  "domainId": 10000001,3  "displayOrder": 1,4  "employmentTypeName": "EmploymentType Name",5  "employmentTypeExternalKey": "EMPLOYMENTTYPE_EXT_01",6  "i18nNames": [7    {8      "name": "English Name",9      "language": "en_US"10    }11  ],12  "userTypeCode": "code"13}

Response

HTTP 201

OK

PropertyTypeDescription
domainId integer 

Domain ID of the employment type


required
format : int32 
employmentTypeId string 

It is automatically assigned.


readOnly : true 
displayOrder integer 

Sort order. A negative or duplicate number is allowed. Based on this value, items are sorted in ascending order.


required
format : int32 
employmentTypeName string 

Employment type name. It must be unique within the domain. The allowed special characters are ! @ & ( ) - _ + [ ] { } , . /.


required
maxLength : 100 
employmentTypeExternalKey string 

Employment type external key. It must be unique within a tenant.
Some special characters, \ % # / ? are not allowed.


maxLength : 100
nullable : true 
i18nNames array (i18nName) 

Multi-language information.
It shows only the languages specified under Settings > Company Information > Set Multi-language in the LINE WORKS Admin.

 
userTypeCode string 

User type code. It can include any combination of alphabetic characters (A-Z, a-z), numbers (0-9), or underline symbols (_) and can be up to 50 characters long. It must start with an English letter.


maxLength : 50
nullable : true 

i18nName

PropertyTypeDescription
name string 

Multilingual name


required
minLength : 1
maxLength : 100 
language string 

Language code


required
Allowed values : ko_KR, en_US, ja_JP, zh_CN, zh_TW 

Response Example

example

1{2  "domainId": 10000001,3  "employmentTypeId": "employ2c-f321-47a6-ac11-e81fcc23a8c3",4  "displayOrder": 1,5  "employmentTypeName": "EmploymentType Name",6  "employmentTypeExternalKey": "EMPLOYMENTTYPE_EXT_01",7  "i18nNames": [8    {9      "name": "English Name",10      "language": "en_US"11    }12  ],13  "userTypeCode": "code"14}

HTTP 400

Bad Request

HTTP 403

Forbidden

HTTP 409

Conflict