콘텐츠로 건너뛰기

생성 및 업데이트

이 엔드포인트들은 Journey 정의(제목, 설정, 캔버스 위의 포인트)를 생성하고 편집합니다. Journey 를 시작하지는 않습니다. Journey 시작은 Lifecycle을 사용하세요.

두 엔드포인트 모두 journey object를 받고 반환합니다.

POST https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway

STATUS_DRAFT 상태의 새로운 Journey 를 생성합니다.

필드필수유형설명
titlestringJourney 이름.
paramsJourneyParamsJourney 전체 구성. params.application_code 는 필수입니다.
points아니요Point 배열캔버스 위의 Journey 요소와 그 연결.
comments아니요JourneyComment 배열캔버스 주석.
요청 예시
Anchor link to
Journey 생성하기
curl -X POST https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway \
-H "Authorization: Api YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Welcome series",
"params": { "application_code": "XXXXX-XXXXX" },
"points": [],
"comments": []
}'

새로운 journey object를 반환합니다. info.uuid에서 Journey 의 UUID 를 읽어와서 후속 업데이트 및 라이프사이클 호출에 사용하세요.

응답 예시
Anchor link to
{
"info": {
"uuid": "11111111-2222-3333-4444-555555555555",
"title": "Welcome series",
"status": "STATUS_DRAFT",
"params": { "application_code": "XXXXX-XXXXX" }
},
"points": [],
"comments": []
}

전체 Journey 예시

Anchor link to

작은 환영 플로우를 위한 완전한 Create 본문입니다. 그래프는 다음과 같습니다:

세그먼트로 시작 ──default──▶ 푸시 전송 ──default──▶ 1일 대기 ──default──▶ 불리언 분배기 ──output1──▶ 이메일 전송 ──default──▶ 종료
└──default───────────────────────────▶ 종료

포인트들은 각 출력의 info.next_point_uuid를 통해 연결됩니다. 출력 키에 유의하세요: 불리언 분배기를 제외한 모든 포인트는 default를 사용합니다. 불리언 분배기는 조건이 일치하는 분기에 output1을 추가합니다(default는 폴백입니다). 종료 포인트는 출력이 없으며 선택 사항입니다: 다른 출력에서 info.next_point_uuid를 설정하지 않은 채로 두면 동일한 방식으로 Journey 가 종료됩니다.

{
"title": "Welcome series",
"params": {
"application_code": "XXXXX-XXXXX",
"user_id_track_change_policy": "TRACK"
},
"points": [
{
"uuid": "11111111-1111-1111-1111-111111111111",
"title": "New signups",
"point_type": "POINT_TYPE_START_BY_SEGMENT",
"position": { "x": 80, "y": 200 },
"outputs": [
{ "identity": { "key": "default", "order": 0 },
"info": { "title": "", "next_point_uuid": "22222222-2222-2222-2222-222222222222" } }
],
"point_data": {
"start_by_segment": {
"application_code": "XXXXX-XXXXX",
"filter_code": "AAAAA-BBBBB"
}
}
},
{
"uuid": "22222222-2222-2222-2222-222222222222",
"title": "Welcome push",
"point_type": "POINT_TYPE_SEND_PUSH",
"position": { "x": 340, "y": 200 },
"outputs": [
{ "identity": { "key": "default", "order": 0 },
"info": { "title": "", "next_point_uuid": "33333333-3333-3333-3333-333333333333" } }
],
"point_data": {
"send_push": {
"application_code": "XXXXX-XXXXX",
"title": "Welcome!",
"content": "Thanks for joining — here's how to get started."
}
}
},
{
"uuid": "33333333-3333-3333-3333-333333333333",
"title": "Wait 1 day",
"point_type": "POINT_TYPE_WAIT",
"position": { "x": 600, "y": 200 },
"outputs": [
{ "identity": { "key": "default", "order": 0 },
"info": { "title": "", "next_point_uuid": "44444444-4444-4444-4444-444444444444" } }
],
"point_data": {
"delay": { "sec": 86400 }
}
},
{
"uuid": "44444444-4444-4444-4444-444444444444",
"title": "Opened the push?",
"point_type": "POINT_TYPE_BOOLEAN_SPLITTER",
"position": { "x": 860, "y": 200 },
"outputs": [
{ "identity": { "key": "output1", "order": 1 },
"info": { "title": "Matched", "next_point_uuid": "55555555-5555-5555-5555-555555555555" } },
{ "identity": { "key": "default", "order": 0 },
"info": { "title": "Everyone else", "next_point_uuid": "66666666-6666-6666-6666-666666666666" } }
],
"point_data": {
"boolean_splitter": {
"split_strategy": "SPLIT_FILTER",
"load_policy": "ALL",
"filter_code": "CCCCC-DDDDD"
}
}
},
{
"uuid": "55555555-5555-5555-5555-555555555555",
"title": "Follow-up email",
"point_type": "POINT_TYPE_SEND_EMAIL",
"position": { "x": 1120, "y": 120 },
"outputs": [
{ "identity": { "key": "default", "order": 0 },
"info": { "title": "", "next_point_uuid": "66666666-6666-6666-6666-666666666666" } }
],
"point_data": {
"send_email": {
"application_code": "XXXXX-XXXXX",
"preset_code": "12345-67890"
}
}
},
{
"uuid": "66666666-6666-6666-6666-666666666666",
"title": "Exit",
"point_type": "POINT_TYPE_EXIT",
"position": { "x": 1380, "y": 200 },
"outputs": [],
"point_data": {
"terminator": {}
}
}
],
"comments": []
}

업데이트

Anchor link to

PUT https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway/{uuid}

기존 Journey 의 정의를 교체합니다. 전체 정의를 보내야 합니다. 제출한 포인트와 주석이 현재의 것을 대체합니다.

경로 매개변수

Anchor link to
이름유형설명
uuidstring업데이트할 Journey ID.
필드유형설명
titlestring새로운 Journey 이름.
paramsJourneyParams새로운 Journey 전체 구성.
pointsPoint 배열새로운 전체 포인트 세트.
commentsJourneyComment 배열새로운 전체 주석 세트.
autosavebooltrue 인 경우, 변경 사항이 편집기 자동 저장으로 처리됩니다. 기본값은 false 입니다.
요청 예시
Anchor link to
Journey 이름 변경 및 재구성
curl -X PUT https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway/11111111-2222-3333-4444-555555555555 \
-H "Authorization: Api YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Welcome series v2",
"params": { "application_code": "XXXXX-XXXXX" },
"points": [],
"comments": []
}'

업데이트된 journey object를 반환합니다.

업데이트 및 재개

Anchor link to

POST https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway/{uuid}/resume

한 번의 호출로 Journey 에 편집 내용을 적용하고 재개합니다. 이는 업데이트 후 라이프사이클 시작을 호출하는 것과 동일합니다. 요청 본문은 업데이트와 일치합니다. 일시 중지된 Journey 를 편집하여 STATUS_RUNNING 상태로 되돌리려는 경우에 사용하세요.

이름 변경

Anchor link to

POST https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway/{uuid}/rename

포인트나 설정을 건드리지 않고 Journey 제목만 변경합니다.

필드필수유형설명
titlestring새로운 Journey 이름.
요청 예시
Anchor link to
Journey 이름 변경
curl -X POST https://journey-api.svc-nue.pushwoosh.com/api/v3/journeygateway/11111111-2222-3333-4444-555555555555/rename \
-H "Authorization: Api YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "title": "Welcome series (Q3)" }'

관련 항목

Anchor link to