관계 유형 수정
작성일 2026.04.23 | 수정일 2026.04.23
PATCH/crm-core/v1/relationships/types/{relationshipTypeId}
관계 유형의 이름, 설명, 방향 레이블을 부분 업데이트한다. sourceEntityId/targetEntityId는 변경할 수 없다 — 이미 생성된 관계 인스턴스와의 정합성을 해치기 때문. 권한 요구: MEMBER 이상.
Path Params
| Name | Type | Required | Description |
|---|---|---|---|
| relationshipTypeId | string | 관계 유형 ID (CRMRT1...) |
Body Params
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | 관계 유형 이름 | |
| description | string | 설명 | |
| sourceLabel | string | 소스 방향 레이블 | |
| targetLabel | string | 대상 방향 레이블 |
Response
| Name | Type | Required | Description |
|---|---|---|---|
| relationshipTypeId | string | 관계 유형 ID | |
| name | string | 수정된 이름 | |
| description | string | 설명 | |
| sourceEntityId | string | 소스 개체 ID (변경 불가) | |
| targetEntityId | string | 대상 개체 ID (변경 불가) | |
| sourceLabel | string | 소스 방향 레이블 | |
| targetLabel | string | 대상 방향 레이블 | |
| dateCreated | date | 생성 시각 | |
| dateUpdated | date | * | 마지막 수정 시각 |
Structure
코드 예제
const id = 'CRMRT1260423091530123RTP11122233';
const response = await fetch(https://api.solapi.com/crm-core/v1/relationships/types/${id}, {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + TOKEN,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: '소속 회사', sourceLabel: '근무처' })
});
const data = await response.json();
import requests
type_id = 'CRMRT1260423091530123RTP11122233'
response = requests.patch(
f'https://api.solapi.com/crm-core/v1/relationships/types/{type_id}',
headers={'Authorization': f'Bearer {TOKEN}'},
json={'name': '소속 회사', 'sourceLabel': '근무처'}
)
data = response.json()
curl -X PATCH 'https://api.solapi.com/crm-core/v1/relationships/types/CRMRT1260423091530123RTP11122233' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"소속 회사","sourceLabel":"근무처"}'
lightbulb
수정 가능한 필드(`name`, `description`, `sourceLabel`, `targetLabel`)를 모두 생략해 보내면 400이 반환된다. 관계 유형의 개체 구성을 바꾸려면 유형을 새로 만들고 기존 관계를 이관하거나 삭제해야 한다.