POST/directory/positions

Adds position information.

Note

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

Authorization

oauth2

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

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/positions

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
domainId integer 

Position's domain ID


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 
positionName string 

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


required
maxLength : 100 
positionExternalKey string 

Position external key.
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.

 

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": 2,4  "positionName": "Employee",5  "positionExternalKey": "POSITION_EXT_02",6  "i18nNames": [7    {8      "name": "Staff",9      "language": "en_US"10    }11  ]12}

Response

HTTP 201

OK

PropertyTypeDescription
domainId integer 

Position's domain ID


required
format : int32 
positionId 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 
positionName string 

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


required
maxLength : 100 
positionExternalKey string 

Position external key.
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.

 

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  "positionId": "position-7027-4a02-b838-6f52b5e38db7",4  "displayOrder": 2,5  "positionName": "Employee",6  "positionExternalKey": "POSITION_EXT_02",7  "i18nNames": [8    {9      "name": "Staff",10      "language": "en_US"11    }12  ]13}

HTTP 400

Bad Request

HTTP 403

Forbidden

HTTP 409

Conflict