POST/directory/positions

직책 정보를 추가한다.

참고

  • 도메인의 직책 사용 여부가 'true'로 설정되어 있어야 한다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증를 참고한다.

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 

직책의 도메인 ID


required
format : int32 
displayOrder integer 

정렬 순서. 음수와 중복이 허용되며 상대 비교를 통해 오름차순으로 정렬된다.


required
format : int32 
positionName string 

직책명. 도메인 내에서 유일해야 한다. 특수 문자는 !@&()-_+[]{},./만 허용된다.


required
maxLength : 100 
positionExternalKey string 

직책 외부 키
%#/? 입력 불가


maxLength : 100
nullable : true 
i18nNames array (i18nName) 

다국어 목록 정보.
Admin > 기본환경 > 회사 정보 > 다국어 설정에서 지정된 항목의 다국어만 표시된다.

 

i18nName

PropertyTypeDescription
name string 

다국어 이름


required
minLength : 1
maxLength : 100 
language string 

다국어 언어 코드


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": "사원",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 

직책의 도메인 ID


required
format : int32 
positionId string 

자동으로 부여되는 ID


readOnly : true 
displayOrder integer 

정렬 순서. 음수와 중복이 허용되며 상대 비교를 통해 오름차순으로 정렬된다.


required
format : int32 
positionName string 

직책명. 도메인 내에서 유일해야 한다. 특수 문자는 !@&()-_+[]{},./만 허용된다.


required
maxLength : 100 
positionExternalKey string 

직책 외부 키
%#/? 입력 불가


maxLength : 100
nullable : true 
i18nNames array (i18nName) 

다국어 목록 정보.
Admin > 기본환경 > 회사 정보 > 다국어 설정에서 지정된 항목의 다국어만 표시된다.

 

i18nName

PropertyTypeDescription
name string 

다국어 이름


required
minLength : 1
maxLength : 100 
language string 

다국어 언어 코드


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": "사원",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