Notification > Notification Hub > API v1.0使用ガイド > フロー
リクエスト
POST /flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
リクエストパラメータ
名前 | 区分 | タイプ | 必須 | 説明 |
---|---|---|---|---|
appKey | Header | String | Y | アプリキー |
accessToken | Header | String | Y | 認証トークン |
リクエスト本文
{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
}
名前 | タイプ | 必須 | 説明 |
---|---|---|---|
flowName | String | Y | フロー名 |
description | String | N | フローの説明 |
messagePurpose | String | Y | メッセージ目的 NORMAL(一般), AD(広告), AUTH(認証) |
steps | Object | Y | フロー段階 |
steps.messageChannel | String | Y | メッセージチャンネル SMS, RCS, ALIMTALK, FRIENDTALK, EMAIL, PUSH |
steps.templateId | String | Y | テンプレートID |
steps.nextSteps | Object Array | N | 次のステップ |
レスポンス本文
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flowId": "フロー_ID"
}
リクエスト例
### フロー作成
POST {{endpoint}}/flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
}
curl -X POST "${ENDPOINT}/flow/v1.0/flows" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}'
リクエスト
GET /flow/v1.0/flows
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
リクエストパラメータ
名前 | 区分 | タイプ | 必須 | 説明 |
---|---|---|---|---|
appKey | Header | String | Y | アプリキー |
accessToken | Header | String | Y | 認証トークン |
flowId | Query | String | N | フローID |
flowName | Query | String | N | フロー名、プレフィックス(Prefix)、単一文字ワイルドカード(Single Character Wildcard)検索可能 |
limit | Query | Integer | N | 1ページあたりの照会数 |
offset | Query | Integer | N | ページオフセット |
リクエスト本文
このAPIはリクエスト本文を要求しません。
レスポンス本文
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flows": [
{
"flowId": "フロー_ID",
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": [
{
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
]
}
]
}
リクエスト例
### フローリスト照会
GET {{endpoint}}/flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/flow/v1.0/flows" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
リクエスト
GET /flow/v1.0/flows/{flowId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
リクエストパラメータ
名前 | 区分 | タイプ | 必須 | 説明 |
---|---|---|---|---|
appKey | Header | String | Y | アプリキー |
accessToken | Header | String | Y | 認証トークン |
flowId | Path | String | Y | フローID |
リクエスト本文
このAPIはリクエスト本文を要求しません。
レスポンス本文
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flow": {
"flowId": "フロー_ID",
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": [
{
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
]
}
}
リクエスト例
### フロー照会
GET {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
リクエスト
PUT /flow/v1.0/flows/{flowId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
リクエストパラメータ
名前 | 区分 | タイプ | 必須 | 説明 |
---|---|---|---|---|
appKey | Header | String | Y | アプリキー |
accessToken | Header | String | Y | 認証トークン |
flowId | Path | String | Y | フローID |
リクエスト本文
{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
}
レスポンス本文
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
リクエスト例
### フロー修正
PUT {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}
}
curl -X PUT "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"flowName": "フロー_名前",
"description": "フロー_説明",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "メール_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "お知らせトーク_テンプレート_ID",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_テンプレート_ID",
"nextSteps": []
}
]
}
]
}'
}
リクエスト
DELETE /flow/v1.0/flows/{flowId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
リクエストパラメータ
名前 | 区分 | タイプ | 必須 | 説明 |
---|---|---|---|---|
appKey | Header | String | Y | アプリキー |
accessToken | Header | String | Y | 認証トークン |
flowId | Path | String | Y | フローID |
リクエスト本文
このAPIはリクエスト本文を要求しません。
レスポンス本文
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
リクエスト例
### フロー削除
DELETE {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X DELETE "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"