| ドメイン |
|---|
| https://api-alimtalk.cloud.toast.com |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
| X-NC-API-IDEMPOTENCY-KEY | String | X | 重複メッセージ送信要求基準key 10分間同じkeyで要求すると、その要求を失敗処理します。 |
[Request body]
{
"senderKey": String,
"templateCode": String,
"requestDate": String,
"senderGroupingKey": String,
"createUser": String,
"recipientList": [{
"recipientNo": String,
"templateParameter": {
String: String
},
"resendParameter": {
"isResend":boolean,
"resendType":String,
"resendTitle":String,
"resendContent":String,
"resendSendNo":String
},
"recipientGroupingKey": String
}],
"messageOption": {
"price": Integer,
"currencyType": String
}
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| senderKey | String | O | 発信キー |
| templateCode | String | O | 登録した送信テンプレートコード(最大20桁) |
| requestDate | String | X | リクエスト日時(yyyy-MM-dd HH:mm) (入力しない場合は即時送信) 最大30日以降まで予約可能 |
| senderGroupingKey | String | X | 発信グルーピングキー(最大100文字) |
| createUser | String | X | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| recipientList | List | O | 受信者リスト(最大1000人) |
| - recipientNo | String | O | 受信番号(最大15桁) |
| - templateParameter | Object | X | テンプレートパラメータ (テンプレートに置換する変数が含まれる時は必須) |
| -- key | String | X | 置換キー(#{key}) |
| -- value | String | X | 置換キーにマッピングされるvalue値 |
| - resendParameter | Object | X | 代替発送情報 |
| -- isResend | boolean | X | 送信失敗時、代替送信するかどうか コンソールで送信失敗設定をした時、デフォルト設定は再送信になっています。 |
| -- resendType | String | X | 代替送信タイプ(SMS、LMS) 値がない場合は、テンプレート本文の長さに応じてタイプが決まります。 |
| -- resendTitle | String | X | LMS代替送信タイトル(最大20文字) (値がない場合は、プラスフレンドIDで再送信されます。) |
| -- resendContent | String | X | 代替送信内容(最大1000文字) (値がない場合は、テンプレートの内容で再送信されます。) |
| -- resendSendNo | String | X | 代替送信発信番号(最大13桁) (SMSサービスに登録された発信番号ではない場合、代替送信が失敗することがあります。) |
| - recipientGroupingKey | String | X | 受信者グルーピングキー(最大100文字) |
| messageOption | Object | X | メッセージオプション |
| - price | Integer | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - currencyType | String | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
\s文字を追加する場合、取り消し線スタイルを適用できます。[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/messages -d '{"senderKey":"{発信キー}","templateCode":"{テンプレートコード}","requestDate":"2018-10-01 00:00","recipientList":[{"recipientNo":"{受信番号}","templateParameter":{"{日本語識別子フィールド}":"{置換データ}"}}]}'
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message": {
"requestId": String,
"senderGroupingKey": String,
"sendResults": [
{
"recipientSeq": Integer,
"recipientNo": String,
"resultCode": Integer,
"resultMessage": String,
"recipientGroupingKey": String
}
]
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | 本文領域 |
| - requestId | String | リクエストID |
| - senderGroupingKey | String | 発信グルーピングキー |
| - sendResults | Object | 送信リクエスト結果 |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- recipientNo | String | 受信番号 |
| -- resultCode | Integer | 送信リクエスト結果コード |
| -- resultMessage | String | 送信リクエスト結果メッセージ |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/raw-messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
| X-NC-API-IDEMPOTENCY-KEY | String | X | 重複メッセージ送信要求基準key 10分間同じkeyで要求すると、その要求を失敗処理します。 |
[Request body]
{
"plusFriendId": String,
"templateCode": String,
"requestDate": String,
"senderGroupingKey": String,
"recipientList": [
{
"recipientNo": String,
"content": String,
"templateTitle":String,
"buttons": [
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"resendParameter": {
"isResend":boolean,
"resendType":String,
"resendTitle":String,
"resendContent":String,
"resendSendNo":String
},
"recipientGroupingKey": String
}
],
"messageOption": {
"price": Integer,
"currencyType": String
}
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| senderKey | String | O | 発信キー |
| templateCode | String | O | 登録した送信テンプレートコード(最大20桁) |
| requestDate | String | X | リクエスト日時(yyyy-MM-dd HH:mm) (入力しない場合は即時送信) |
| senderGroupingKey | String | X | 発信グルーピングキー(最大100文字) |
| recipientList | List | O | 受信者リスト(最大1,000人) |
| - recipientNo | String | O | 受信番号(最大15桁) |
| - content | String | O | 内容(最大1000文字) |
| - templateTitle | String | X | テンプレートハイライトタイトル(最大50桁) |
| - buttons | List | X | ボタンリスト(最大5個) |
| -- ordering | Integer | X | ボタン順序(ボタンがある場合は必須) |
| -- type | String | X | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -- name | String | X | ボタン名(ボタンがある場合は必須、最大14文字) |
| -- linkMo | String | X | モバイルWebリンク(WLタイプの場合は必須フィールド、最大500文字) |
| -- linkPc | String | X | PC Webリンク(WLタイプの場合は任意フィールド、最大500文字) |
| -- schemeIos | String | X | iOSアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| -- schemeAndroid | String | X | Androidアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| - resendParameter | Object | X | 代替発送情報 |
| -- isResend | boolean | X | 送信失敗時、代替送信するかどうか コンソールで送信失敗設定をした時、デフォルト設定は再送信になっています。 |
| -- resendType | String | X | 代替送信タイプ(SMS、LMS) 値がない場合は、テンプレート本文の長さに応じてタイプが決まります。 |
| -- resendTitle | String | X | LMS代替送信タイトル(最大20文字) (値がない場合は、プラスフレンドIDで再送信されます。) |
| -- resendContent | String | X | 代替送信内容(最大1000文字) (値がない場合は、テンプレートの内容で再送信されます。) |
| -- resendSendNo | String | X | 代替送信発信番号(最大13桁) (SMSサービスに登録された発信番号ではない場合、代替送信が失敗することがあります。) |
| - recipientGroupingKey | String | X | 受信者グルーピングキー(最大100文字) |
| messageOption | Object | X | メッセージオプション |
| - price | Integer | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - currencyType | String | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
\s文字を追加すると、取り消し線スタイルを適用できます。[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/raw-messages -d '{"senderKey":"{発信キー}","templateCode":"{テンプレートコード}","requestDate":"2018-10-01 00:00","recipientList":[{"recipientNo":"{受信番号}","content":"{内容}","buttons":[{"ordering":"{ボタン順序}","type":"{ボタンタイプ}","name":"{ボタン名}","linkMo":"{モバイルWebリンク}"}]}]}'
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message": {
"requestId": String,
"senderGroupingKey": String,
"sendResults": [
{
"recipientSeq": Integer,
"recipientNo": String,
"resultCode": Integer,
"resultMessage": String,
"recipientGroupingKey": String
}
]
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | 本文領域 |
| - requestId | String | リクエストID |
| - senderGroupingKey | String | 発信グルーピングキー |
| - sendResults | Object | 送信リクエスト結果 |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- recipientNo | String | 受信番号 |
| -- resultCode | Integer | 送信リクエスト結果コード |
| -- resultMessage | String | 送信リクエスト結果メッセージ |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Query parameter] 1番or(2番、 3番)の条件は必須
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| requestId | String | 条件必須(1番) | リクエストID |
| startRequestDate | String | 条件必須(2番) | 送信リクエスト日の開始値(yyyy-MM-dd HH:mm) |
| endRequestDate | String | 条件必須(2番) | 送信リクエスト日の終了値(yyyy-MM-dd HH:mm) |
| startCreateDate | String | 条件必須(3番) | 登録日開始値(yyy-MM-dd HH:mm) |
| endCreateDate | String | 条件必須(3番) | 登録日終値(yyy-MM-dd HH:mm) |
| recipientNo | String | X | 受信番号 |
| senderKey | String | X | 発信キー |
| templateCode | String | X | テンプレートコード |
| senderGroupingKey | String | X | 発信グルーピングキー |
| recipientGroupingKey | String | X | 受信者グルーピングキー |
| messageStatus | String | X | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| resultCode | String | X | 送信結果(MRC01 -> 成功、MRC02 -> 失敗) |
| createUser | String | X | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| pageNum | Integer | X | ページ番号(基本:1) |
| pageSize | Integer | X | 照会件数(基本:15、最大: 1000) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"messageSearchResultResponse":{
"messages":[
{
"requestId": String,
"recipientSeq":Integer,
"plusFriendId": String,
"senderKey" : String,
"templateCode": String,
"recipientNo": String,
"content": String,
"requestDate": String,
"createDate":String,
"receiveDate":String,
"resendStatus": String,
"resendStatusName": String,
"messageStatus": String,
"resultCode": String,
"resultCodeName":String,
"createUser":String,
"buttons":[
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"senderGroupingKey": String,
"recipientGroupingKey": String
}
],
"totalCount": Integer
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| messageSearchResultResponse | Object | 本文領域 |
| - messages | List | メッセージリスト |
| -- requestId | String | リクエストID |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- plusFriendId | String | プラスフレンドID |
| -- senderKey | String | 発信キー |
| -- templateCode | String | テンプレートコード |
| -- recipientNo | String | 受信番号 |
| -- content | String | 本文 |
| -- requestDate | String | リクエスト日 |
| -- createDate | String | 登録日時 |
| -- receiveDate | String | 受信日時 |
| -- resendStatus | String | 再送信ステータスコード |
| -- resendStatusName | String | 再送信ステータスコード名 |
| -- messageStatus | String | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| -- createUser | String | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| -- resultCode | String | 受信結果コード |
| -- resultCodeName | String | 受信結果コード名 |
| -- buttons | List | ボタンリスト |
| --- ordering | Integer | ボタン順序 |
| --- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| --- name | String | ボタン名 |
| --- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| --- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| --- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| --- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| -- senderGroupingKey | String | 発信グルーピングキー |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
| - totalCount | Integer | 総個数 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/messages?startRequestDate=2018-05-01%20:00&endRequestDate=2018-05-30%20:59"
| 値 | 説明 |
|---|---|
| RSC01 | 再送信の対象ではない |
| RSC02 | 再送信の対象(送信結果が失敗の時、再送信が行われます。) |
| RSC03 | 再送信中 |
| RSC04 | 再送信成功 |
| RSC05 | 再送信失敗 |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/messages/{requestId}/{recipientSeq}
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| requestId | String | リクエストID |
| recipientSeq | Integer | 受信者シーケンス番号 |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/messages/{requestId}/{recipientSeq}"
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message":{
"requestId": String,
"recipientSeq":Integer,
"plusFriendId": String,
"senderKey" : String,
"templateCode": String,
"recipientNo": String,
"content": String,
"templateTitle":String,
"templateSubtitle":String,
"templateExtra":String,
"templateAd":String,
"requestDate": String,
"receiveDate":String,
"createDate":String,
"resendStatus": String,
"resendStatusName": String,
"resendResultCode":String,
"resendRequestId":String,
"messageStatus": String,
"resultCode": String,
"resultCodeName":String,
"createUser":String,
"buttons":[
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"messageOption": {
"price": Integer,
"currencyType": String
},
"senderGroupingKey": String,
"recipientGroupingKey": String
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | メッセージ |
| - requestId | String | リクエストID |
| - recipientSeq | Integer | 受信者シーケンス番号 |
| - plusFriendId | String | プラスフレンドID |
| - senderKey | String | 発信キー |
| - templateCode | String | テンプレートコード |
| - recipientNo | String | 受信番号 |
| - content | String | 本文 |
| - templateTitle | String | テンプレートハイライトタイトル |
| - templateSubtitle | String | テンプレートハイライトサブタイトル |
| - templateExtra | String | テンプレート付加情報 |
| - templateAd | String | テンプレート内の受信同意または簡単な広告文句 |
| - requestDate | String | リクエスト日時 |
| - receiveDate | String | 受信日時 |
| - createDate | String | 登録日時 |
| - resendStatus | String | 再送信ステータスコード |
| - resendStatusName | String | 再送信ステータスコード名 |
| - messageStatus | String | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| - resultCode | String | 受信結果コード |
| - resultCodeName | String | 受信結果コード名 |
| - buttons | List | ボタンリスト |
| -- ordering | Integer | ボタン順序 |
| -- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -- name | String | ボタン名 |
| -- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| -- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| -- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| -- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| - messageOption | Object | メッセージオプション |
| -- price | Integer | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| -- currencyType | String | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - senderGroupingKey | String | 発信グルーピングキー |
| - recipientGroupingKey | String | 受信者グルーピングキー |
1. 認証メッセージの送信時、含まれる必要がある認証文言案内
| 区分 | 認証文言 |
|---|---|
| 認証メッセージ | auth、password、verif、にんしょう、認証、パスワード、認証 |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/auth/messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
| X-NC-API-IDEMPOTENCY-KEY | String | X | 重複メッセージ送信要求基準key 10分間同じkeyで要求すると、その要求を失敗処理します。 |
[Request body]
{
"senderKey": String,
"templateCode": String,
"requestDate": String,
"senderGroupingKey": String,
"createUser":String,
"recipientList": [{
"recipientNo": String,
"templateParameter": {
String: String
},
"resendParameter": {
"isResend":boolean,
"resendType":String,
"resendTitle":String,
"resendContent":String,
"resendSendNo":String
},
"recipientGroupingKey": String
}],
"messageOption": {
"price": Integer,
"currencyType": String
}
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| senderKey | String | O | 発信キー |
| templateCode | String | O | 登録した送信テンプレートコード(最大20桁) |
| requestDate | String | X | リクエスト日時(yyyy-MM-dd HH:mm) (入力しない場合は即時送信) |
| createUser | String | X | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| senderGroupingKey | String | X | 発信グルーピングキー(最大100文字) |
| recipientList | List | O | 受信者リスト(最大1000人) |
| - recipientNo | String | O | 受信番号(最大15桁) |
| - templateParameter | Object | X | テンプレートパラメータ (テンプレートに置換する変数が含まれる時は必須) |
| -- key | String | X | 置換キー(#{key}) |
| -- value | String | X | 置換キーにマッピングされるvalue値 |
| - resendParameter | Object | X | 代替発送情報 |
| -- isResend | boolean | X | 送信失敗時、代替送信するかどうか コンソールで送信失敗設定をした時、デフォルト設定は再送信になっています。 |
| -- resendType | String | X | 代替送信タイプ(SMS、LMS) 値がない場合は、テンプレート本文の長さに応じてタイプが決まります。 |
| -- resendTitle | String | X | LMS代替送信タイトル(最大20文字) (値がない場合は、プラスフレンドIDで再送信されます。) |
| -- resendContent | String | X | 代替送信内容(最大1000文字) (値がない場合は、テンプレートの内容で再送信されます。) |
| -- resendSendNo | String | X | 代替送信発信番号(最大13桁) (SMSサービスに登録された発信番号ではない場合、代替送信が失敗することがあります。) |
| - recipientGroupingKey | String | X | 受信者グルーピングキー(最大100文字) |
| messageOption | Object | X | メッセージオプション |
| - price | Integer | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - currencyType | String | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/auth/messages -d '{"senderKey":"{発信キー}","templateCode":"{テンプレートコード}","requestDate":"2018-10-01 00:00","recipientList":[{"recipientNo":"{受信番号}","templateParameter":{"{日本語識別子フィールド}":"{置換データ}"}}]}'
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message": {
"requestId": String,
"senderGroupingKey": String,
"sendResults": [
{
"recipientSeq": Integer,
"recipientNo": String,
"resultCode": Integer,
"resultMessage": String,
"recipientGroupingKey": String
}
]
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | 本文領域 |
| - requestId | String | リクエストID |
| - senderGroupingKey | String | 発信グルーピングキー |
| - sendResults | Object | 送信リクエスト結果 |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- recipientNo | String | 受信番号 |
| -- resultCode | Integer | 送信リクエスト結果コード |
| -- resultMessage | String | 送信リクエスト結果メッセージ |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/auth/raw-messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
| X-NC-API-IDEMPOTENCY-KEY | String | X | 重複メッセージ送信要求基準key 10分間同じkeyで要求すると、その要求を失敗処理します。 |
[Request body]
{
"senderKey": String,
"templateCode": String,
"requestDate": String,
"senderGroupingKey": String,
"createUser": String,
"recipientList": [
{
"recipientNo": String,
"content": String,
"templateTitle":String,
"buttons": [
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"resendParameter": {
"isResend":boolean,
"resendType":String,
"resendTitle":String,
"resendContent":String,
"resendSendNo":String
},
"recipientGroupingKey": String
}
],
"messageOption": {
"price": Integer,
"currencyType": String
}
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| senderKey | String | O | 発信キー |
| templateCode | String | O | 登録した送信テンプレートコード(最大20桁) |
| requestDate | String | X | リクエスト日時(yyyy-MM-dd HH:mm) (入力しない場合は即時送信) |
| senderGroupingKey | String | X | 発信グルーピングキー(最大100文字) |
| createUser | String | X | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| recipientList | List | O | 受信者リスト(最大1,000人) |
| - recipientNo | String | O | 受信番号(最大15桁) |
| - content | String | O | 内容(最大1000文字) |
| - templateTitle | String | X | タイトル(最大50桁) |
| - buttons | List | X | ボタンリスト(最大5個) |
| -- ordering | Integer | X | ボタン順序(ボタンがある場合は必須) |
| -- type | String | X | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -- name | String | X | ボタン名(ボタンがある場合は必須、最大14文字) |
| -- linkMo | String | X | モバイルWebリンク(WLタイプの場合は必須フィールド、最大500文字) |
| -- linkPc | String | X | PC Webリンク(WLタイプの場合は任意フィールド、最大500文字) |
| -- schemeIos | String | X | iOSアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| -- schemeAndroid | String | X | Androidアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| - resendParameter | Object | X | 代替発送情報 |
| -- isResend | boolean | X | 送信失敗時、代替送信するかどうか コンソールで送信失敗設定をした時、デフォルト設定は再送信になっています。 |
| -- resendType | String | X | 代替送信タイプ(SMS、LMS) 値がない場合は、テンプレート本文の長さに応じてタイプが決まります。 |
| -- resendTitle | String | X | LMS代替送信タイトル(最大20文字) (値がない場合は、プラスフレンドIDで再送信されます。) |
| -- resendContent | String | X | 代替送信内容(最大1000文字) (値がない場合は、テンプレートの内容で再送信されます。) |
| -- resendSendNo | String | X | 代替送信発信番号(最大13桁) (SMSサービスに登録された発信番号ではない場合、代替送信が失敗することがあります。) |
| - recipientGroupingKey | String | X | 受信者グルーピングキー(最大100文字) |
| messageOption | Object | X | メッセージオプション |
| - price | Integer | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - currencyType | String | X | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/auth/raw-messages -d '{"senderKey":"{発信キー}","templateCode":"{テンプレートコード}","requestDate":"2018-10-01 00:00","recipientList":[{"recipientNo":"{受信番号}","content":"{内容}","buttons":[{"ordering":"{ボタン順序}","type":"{ボタンタイプ}","name":"{ボタン名}","linkMo":"{モバイルWebリンク}"}]}]}'
{
"header": {
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message": {
"requestId": String,
"senderGroupingKey": String,
"sendResults": [
{
"recipientSeq": Integer,
"recipientNo": String,
"resultCode": Integer,
"resultMessage": String,
"recipientGroupingKey": String
}
]
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | 本文領域 |
| - requestId | String | リクエストID |
| - senderGroupingKey | String | 発信グルーピングキー |
| - sendResults | Object | 送信リクエスト結果 |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- recipientNo | String | 受信番号 |
| -- resultCode | Integer | 送信リクエスト結果コード |
| -- resultMessage | String | 送信リクエスト結果メッセージ |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/auth/messages
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Query parameter] 1番or(2番、 3番)の条件は必須
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| requestId | String | 条件必須(1番) | リクエストID |
| startRequestDate | String | 条件必須(2番) | 送信リクエスト日の開始値(yyyy-MM-dd HH:mm) |
| endRequestDate | String | 条件必須(2番) | 送信リクエスト日の終了値(yyyy-MM-dd HH:mm) |
| startCreateDate | String | 条件必須(3番) | 登録日開始値(yyy-MM-dd HH:mm) |
| endCreateDate | String | 条件必須(3番) | 登録日終値(yyy-MM-dd HH:mm) |
| recipientNo | String | X | 受信番号 |
| senderKey | String | X | 発信キー |
| templateCode | String | X | テンプレートコード |
| senderGroupingKey | String | X | 発信グルーピングキー |
| recipientGroupingKey | String | X | 受信者グルーピングキー |
| messageStatus | String | X | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| createUser | String | X | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| resultCode | String | X | 送信結果(MRC01 -> 成功、MRC02 -> 失敗) |
| pageNum | Integer | X | ページ番号(基本:1) |
| pageSize | Integer | X | 照会件数(基本:15、最大: 1000) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"messageSearchResultResponse":{
"messages":[
{
"requestId": String,
"recipientSeq":Integer,
"plusFriendId": String,
"senderKey" : String,
"templateCode": String,
"recipientNo": String,
"content": String,
"requestDate": String,
"createDate":String,
"receiveDate":String,
"resendStatus": String,
"resendStatusName": String,
"messageStatus": String,
"resultCode": String,
"resultCodeName":String,
"createUser":String,
"buttons":[
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"senderGroupingKey": String,
"recipientGroupingKey": String
}
],
"totalCount": Integer
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| messageSearchResultResponse | Object | 本文領域 |
| - messages | List | メッセージリスト |
| -- requestId | String | リクエストID |
| -- recipientSeq | Integer | 受信者シーケンス番号 |
| -- plusFriendId | String | プラスフレンドID |
| -- senderKey | String | 発信キー |
| -- templateCode | String | テンプレートコード |
| -- recipientNo | String | 受信番号 |
| -- content | String | 本文 |
| -- requestDate | String | リクエスト日時 |
| -- createDate | String | 登録日時 |
| -- receiveDate | String | 受信日時 |
| -- resendStatus | String | 再送信ステータスコード |
| -- resendStatusName | String | 再送信ステータスコード名 |
| -- messageStatus | String | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| -- resultCode | String | 受信結果コード |
| -- resultCodeName | String | 受信結果コード名 |
| -- createUser | String | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| -- buttons | List | ボタンリスト |
| --- ordering | Integer | ボタン順序 |
| --- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| --- name | String | ボタン名 |
| --- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| --- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| --- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| --- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| -- senderGroupingKey | String | 発信グルーピングキー |
| -- recipientGroupingKey | String | 受信者グルーピングキー |
| - totalCount | Integer | 総個数 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/auth/messages?startRequestDate=2018-05-01%20:00&endRequestDate=2018-05-30%20:59"
| 値 | 説明 |
|---|---|
| RSC01 | 再送信の対象ではない |
| RSC02 | 再送信の対象(送信結果が失敗の時、再送信が行われます。) |
| RSC03 | 再送信中 |
| RSC04 | 再送信成功 |
| RSC05 | 再送信失敗 |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/auth/messages/{requestId}/{recipientSeq}
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| requestId | String | リクエストID |
| recipientSeq | Integer | 受信者シーケンス番号 |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/auth/messages/{requestId}/{recipientSeq}"
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"message":{
"requestId": String,
"recipientSeq":Integer,
"plusFriendId": String,
"senderKey" : String,
"templateCode": String,
"recipientNo": String,
"content": String,
"templateTitle":String,
"templateSubtitle":String,
"templateExtra":String,
"templateAd":String,
"requestDate": String,
"createDate":String,
"receiveDate":String,
"resendStatus": String,
"resendStatusName": String,
"resendResultCode":String,
"resendRequestId":String,
"messageStatus": String,
"resultCode": String,
"resultCodeName":String,
"createUser":String,
"buttons":[
{
"ordering": Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"messageOption": {
"price": Integer,
"currencyType": String
},
"senderGroupingKey": String,
"recipientGroupingKey": String
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| message | Object | メッセージ |
| - requestId | String | リクエストID |
| - recipientSeq | Integer | 受信者シーケンス番号 |
| - plusFriendId | String | プラスフレンドID |
| - senderKey | String | 発信キー |
| - templateCode | String | テンプレートコード |
| - recipientNo | String | 受信番号 |
| - content | String | 本文 |
| - templateTitle | String | テンプレートハイライトタイトル |
| - templateSubtitle | String | テンプレートハイライトサブタイトル |
| - templateExtra | String | テンプレート付加情報 |
| - templateAd | String | テンプレート内の受信同意または簡単な広告文句 |
| - requestDate | String | リクエスト日時 |
| - createDate | String | 登録日時 |
| - receiveDate | String | 受信日時 |
| - resendStatus | String | 再送信ステータスコード |
| - resendStatusName | String | 再送信ステータスコード名 |
| - resendResultCode | String | 再送結果コードSMS結果コード |
| - resendRequestId | String | 再送SMSリクエストID |
| - messageStatus | String | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| - resultCode | String | 受信結果コード |
| - resultCodeName | String | 受信結果コード名 |
| - createUser | String | 登録者(コンソールから送信する場合、ユーザーUUIDとして保存) |
| - buttons | List | ボタンリスト |
| -- ordering | Integer | ボタン順序 |
| -- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -- name | String | ボタン名 |
| -- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| -- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| -- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| -- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| - messageOption | Object | メッセージオプション |
| -- price | Integer | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| -- currencyType | String | message(ユーザーに伝達されるメッセージ)内に含まれた価格/金額/決済金額(モーメント広告に該当) |
| - senderGroupingKey | String | 発信グルーピングキー |
| - recipientGroupingKey | String | 受信者グルーピングキー |
[URL]
DELETE /alimtalk/v2.1/appkeys/{appkey}/messages/{requestId}
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| requestId | String | リクエストID |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Query parameter]
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| recipientSeq | String | X | 受信者シーケンス番号 (入力しない場合、リクエストIDのすべての送信件をキャンセル) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[例]
curl -X DELETE -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/messages/{requestId}?recipientSeq=1,2,3"
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/message-results
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Query parameter]
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| startUpdateDate | String | O | 結果アップデート照会開始時間(yyyy-MM-dd HH:mm) |
| endUpdateDate | String | O | 結果アップデート照会終了時間(yyyy-MM-dd HH:mm) |
| alimtalkMessageType | String | X | お知らせトークメッセージタイプ(NORMAL、AUTH) |
| pageNum | Integer | X | ページ番号(基本:1) |
| pageSize | Integer | X | 照会件数(基本:15、最大: 1000) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"messages":[
{
"requestId": String,
"recipientSeq":Integer,
"requestDate": String,
"createDate": String,
"receiveDate":String,
"resendStatus": String,
"resendStatusName": String,
"resendResultCode": String,
"resendRequestId": String,
"messageStatus": String,
"resultCode": String,
"resultCodeName":String
}
]
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| messages | List | メッセージリスト |
| - requestId | String | リクエストID |
| - recipientSeq | Integer | 受信者シーケンス番号 |
| - requestDate | String | リクエスト日時 |
| - createDate | String | 作成日時 |
| - receiveDate | String | 受信日時 |
| - resendStatus | String | 再送信ステータスコード |
| - resendStatusName | String | 再送信ステータスコード名 |
| - resendResultCode | String | 再送結果コードSMS結果コード |
| - resendRequestId | String | 再送SMSリクエストID |
| - messageStatus | String | リクエストステータス(COMPLETED -> 成功、FAILED -> 失敗、CANCEL -> キャンセル) |
| - resultCode | String | 受信結果コード |
| - resultCodeName | String | 受信結果コード名 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/message-results?startUpdateDate=2018-05-01%20:00&endUpdateDate=2018-05-30%20:59"
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/template/categories
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"categories": [
{
"name": String,
"subCategories": [
{
"code": String,
"name": String,
"groupName": String,
"inclusion": String,
"exclusion": String
}
]
}
]
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| categories | List | カテゴリー一覧 |
| - name | String | カテゴリー名 |
| - subCategories | List | サブカテゴリーのリスト |
| -- code | String | カテゴリーコード(テンプレートの登録/変更する際、使用) |
| -- name | String | カテゴリー名 |
| -- groupName | String | カテゴリーグループ名 |
| -- inclusion | String | カテゴリー対象テンプレートの説明 |
| -- exclusion | String | カテゴリの除外対象のテンプレートの説明 |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| senderKey | String | 発信キー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request body]
{
"templateCode":String,
"templateName":String,
"templateContent":String,
"templateMessageType": String,
"templateEmphasizeType":String,
"templateExtra": String,
"templateTitle":String,
"templateSubtitle":String,
"templateImageName":String,
"templateImageUrl":String,
"securityFlag": Boolean,
"categoryCode": String,
"buttons":[
{
"ordering":Integer,
"type":String,
"name":String,
"linkMo":String,
"linkPc":String,
"schemeIos":String,
"schemeAndroid":String
}
]
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| templateCode | String | O | テンプレートコード(最大20文字) |
| templateName | String | O | テンプレート名(最大150文字) |
| templateContent | String | O | テンプレート本文(最大1000文字) |
| templateMessageType | String | X | テンプレートメッセージタイプ(BA:基本型、EX:付加情報型、AD:広告追加型、MI:複合型) EX:templateExtraフィールド必須 MI:templateExtraフィールド必須」 |
| templateEmphasizeType | String | X | テンプレートハイライトタイプ(NONE:基本、TEXT:ハイライト、default:NONE) TEXT:templateTitle、templateSubtitleフィールド必須 |
| templateExtra | String | X | テンプレート付加情報 |
| tempalteTitle | String | X | テンプレートのタイトル(最大50字、Android:2行、23字以上のコマ処理、iOS:2行、27字以上のコマ処理) |
| templateSubtitle | String | X | テンプレートの補助フレーズ(最大50文字、Android:18字以上のコマを省く、iOS:21字以上のコマを省く) |
| templateImageName | String | X | 画像名(アップロードされたファイル名) |
| templateImageUrl | String | X | 画像のURL |
| securityFlag | Boolean | X | セキュリティテンプレートかどうか OTPなどのセキュリティメッセージの場合、設定 発信当時のメインデバイスを除くすべてのデバイスにメッセージテキストミノチュル(default: false) |
| categoryCode | String | X | テンプレートのカテゴリコード(テンプレートカテゴリー照会API参考, default: 999999) カテゴリーを入力し、テンプレートを優先審査 |
| buttons | List | X | ボタンリスト(最大5個) |
| -ordering | Integer | X | ボタン順序(1~5) |
| -type | String | X | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -name | String | X | ボタン名(ボタンがある場合は必須、最大14文字) |
| -linkMo | String | X | モバイルWebリンク(WLタイプの場合は必須フィールド、最大500文字) |
| -linkPc | String | X | PC Webリンク(WLタイプの場合は任意フィールド、最大500文字) |
| -schemeIos | String | X | iOSアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| -schemeAndroid | String | X | Androidアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[URL]
PUT /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| senderKey | String | 発信キー |
| templateCode | String | テンプレートコード |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request body]
{
"templateName":String,
"templateContent":String,
"templateMessageType": String,
"templateEmphasizeType":String,
"templateExtra": String,
"templateTitle":String,
"templateSubtitle":String,
"templateImageName":String,
"templateImageUrl":String,
"securityFlag": Boolean,
"categoryCode": String,
"buttons":[
{
"ordering":Integer,
"type":String,
"name":String,
"linkMo":String,
"linkPc":String,
"schemeIos":String,
"schemeAndroid":String
}
]
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| templateName | String | O | テンプレート名(最大150文字) |
| templateContent | String | O | テンプレート本文(最大1000文字) |
| templateMessageType | String | X | テンプレートメッセージタイプ(BA:基本型、EX:付加情報型、AD:広告追加型、MI:複合型) EX:templateExtraフィールド必須 MI:templateExtraフィールド必須」 |
| templateEmphasizeType | String | X | テンプレートハイライトタイプ(NONE:基本、TEXT:ハイライト、default:NONE) TEXT:templateTitle、templateSubtitleフィールド必須 |
| templateExtra | String | X | テンプレート付加情報 |
| tempalteTitle | String | X | テンプレートのタイトル(最大50字、Android:2行、23字以上のコマ処理、iOS:2行、27字以上のコマ処理) |
| templateSubtitle | String | X | テンプレートの補助フレーズ(最大50文字、Android:18字以上のコマを省く、iOS:21字以上のコマを省く) |
| templateImageName | String | X | 画像名(アップロードされたファイル名) |
| templateImageUrl | String | X | 画像のURL |
| securityFlag | Boolean | X | セキュリティテンプレートかどうか OTPなどのセキュリティメッセージの場合、設定 発信当時のメインデバイスを除くすべてのデバイスにメッセージテキストミノチュル(default: false) |
| categoryCode | String | X | テンプレートのカテゴリコード(テンプレートカテゴリー照会API参考, default: 999999) カテゴリーを入力し、テンプレートを優先審査 |
| buttons | List | X | ボタンリスト(最大5個) |
| -ordering | Integer | X | ボタン順序(1~5) |
| -type | String | X | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| -name | String | X | ボタン名(ボタンがある場合は必須、最大14文字) |
| -linkMo | String | X | モバイルWebリンク(WLタイプの場合は必須フィールド、最大500文字) |
| -linkPc | String | X | PC Webリンク(WLタイプの場合は任意フィールド、最大500文字) |
| -schemeIos | String | X | iOSアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
| -schemeAndroid | String | X | Androidアプリリンク(ALタイプの場合は必須フィールド、最大500文字) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[URL]
DELETE /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| plusFriendId | String | 発信キー |
| templateCode | String | テンプレートコード |
[Header]
{
"X-Secret-Key": String
}
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[URL]
PUT /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}/comments
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| plusFriendId | String | 発信キー |
| templateCode | String | テンプレートコード |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request body]
{
"comment":String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| comment | String | O | お問い合わせ内容 |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}/comments_file
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のAppkey |
| plusFriendId | String | 発信キー |
| templateCode | String | テンプレートコード |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request Body]
{
"comment":String,
"attachments":File
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| comment | String | O | お問い合わせ内容 |
| attachments | List |
X | 添付ファイルリスト(最大10個) |
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/templates
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Query parameter]
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| plusFriendId | String | X | 発信キー |
| templateCode | String | X | テンプレートコード |
| templateName | String | X | テンプレート名 |
| templateStatus | String | X | テンプレートステータスコード |
| pageNum | Integer | X | ページ番号(基本:1) |
| pageSize | Integer | X | 照会件数(基本:15、最大: 1000) |
| テンプレートステータスコード | 説明 |
|---|---|
| TSC01 | リクエスト |
| TSC02 | 検収中 |
| TSC03 | 承認 |
| TSC04 | 差し戻し |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/templates?plusFriendId={発信キー}&templateStatus={テンプレートステータスコード}"
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"templateListResponse": {
"templates": [
{
"plusFriendId": String,
"plusFriendType": String,
"templateCode": String,
"templateName": String,
"templateContent": String,
"templateEmphasizeType": String,
"templateTitle":String,
"templateSubtitle":String,
"templateImageName":String,
"templateImageUrl":String,
"templateMessageType":String,
"templateExtra":String,
"templateAd":String,
"buttons": [
{
"ordering":Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"comments": [
{
"id": Integer,
"content": String,
"userName": String,
"createdAt": String,
"attachment": [{
"originalFileName": String,
"filePath": String
}],
"status": String
}
],
"status": String,
"statusName": String,
"createDate": String
}
],
"totalCount": Integer
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| templateListResponse | Object | 本文領域 |
| - templates | List | テンプレートリスト |
| -- plusFriendId | String | プラスフレンドID |
| -- plusFriendType | String | プラスフレンドタイプ(NORMAL、GROUP) |
| -- templateCode | String | テンプレートコード |
| -- templateName | String | テンプレート名 |
| -- templateContent | String | テンプレート本文 |
| -- templateEmphasizeType | String | テンプレートハイライトタイプ(NONE:基本、TEXT:ハイライト、default:NONE) TEXT:templateTitle、templateSubtitleフィールド必須 |
| -- tempalteTitle | String | テンプレートのタイトル(最大50字、Android:2行、23字以上のコマ処理、iOS:2行、27字以上のコマ処理) |
| -- templateSubtitle | String | テンプレートの補助フレーズ(最大50文字、Android:18字以上のコマを省く、iOS:21字以上のコマを省く) |
| -- templateImageName | String | 画像名(アップロードされたファイル名) |
| -- templateImageUrl | String | 画像のURL |
| -- templateMessageType | String | テンプレートメッセージタイプ(BA:基本型、EX:付加情報型、AD:広告追加型、MI:複合型) EX:templateExtraフィールド必須 MI:templateExtraフィールド必須」 |
| -- templateExtra | String | テンプレート付加情報 |
| -- templateAd | String | テンプレート内の受信同意または簡単な広告文句 |
| -- buttons | List | ボタンリスト |
| --- ordering | Integer | ボタン順序(1~5) |
| --- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| --- name | String | ボタン名 |
| --- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| --- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| --- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| --- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| -- comments | List | 検収結果 |
| --- id | Integer | お問い合わせID |
| --- content | String | お問い合わせ内容 |
| --- userName | String | 作成者 |
| --- createAt | String | 登録日 |
| --- attachment | List | 添付ファイル |
| ---- originalFileName | String | 添付ファイル名 |
| ---- filePath | String | 添付ファイルへのパス |
| --- status | String | 応答状態(INQ:お問い合わせ、APR:承認、REJ:差し戻し、REP:返信, REQ:検査中) |
| -- status | String | テンプレートのステータス |
| -- statusName | String | テンプレートのステータス名 |
| -- createDate | String | 作成日時 |
| - totalCount | Integer | 総個数 |
[URL]
GET /alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}/modifications
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
| plusFriendId | String | プラスフレンドID |
| templateCode | String | テンプレートコード |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[例]
curl -X GET -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/plus-friends/{plusFriendId}/templates/{templateCode}/modifications"
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"templateModificationsResponse": {
"templates": [
{
"plusFriendId": String,
"plusFriendType": String,
"templateCode": String,
"templateName": String,
"templateContent": String,
"templateEmphasizeType": String,
"templateTitle":String,
"templateSubtitle":String,
"templateImageName":String,
"templateImageUrl":String,
"templateMessageType":String,
"templateExtra":String,
"templateAd":String,
"buttons": [
{
"ordering":Integer,
"type": String,
"name": String,
"linkMo": String,
"linkPc": String,
"schemeIos": String,
"schemeAndroid": String
}
],
"comments": [
{
"id": Integer,
"content": String,
"userName": String,
"createdAt": String,
"attachment": [{
"originalFileName": String,
"filePath": String
}],
"status": String
}
],
"status": String,
"statusName": String,
"activated": boolean,
"createDate": String
}
],
"totalCount": Integer
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| templateModificationsResponse | Object | 本文領域 |
| - templates | List | テンプレートリスト |
| -- plusFriendId | String | プラスフレンドID |
| -- plusFriendType | String | プラスフレンドタイプ(NORMAL、GROUP) |
| -- templateCode | String | テンプレートコード |
| -- templateName | String | テンプレート名 |
| -- templateContent | String | テンプレート本文 |
| -- templateEmphasizeType | String | テンプレートハイライトタイプ(NONE:基本、TEXT:ハイライト、default:NONE) TEXT:templateTitle、templateSubtitleフィールド必須 |
| -- tempalteTitle | String | テンプレートのタイトル(最大50字、Android:2行、23字以上のコマ処理、iOS:2行、27字以上のコマ処理) |
| -- templateSubtitle | String | テンプレートの補助フレーズ(最大50文字、Android:18字以上のコマを省く、iOS:21字以上のコマを省く) |
| -- templateImageName | String | 画像名(アップロードされたファイル名) |
| -- templateImageUrl | String | 画像のURL |
| -- templateMessageType | String | テンプレートメッセージタイプ(BA:基本型、EX:付加情報型、AD:広告追加型、MI:複合型) EX:templateExtraフィールド必須 MI:templateExtraフィールド必須」 |
| -- templateExtra | String | テンプレート付加情報 |
| -- templateAd | String | テンプレート内の受信同意または簡単な広告文句 |
| -- buttons | List | ボタンリスト |
| --- ordering | Integer | ボタン順序(1~5) |
| --- type | String | ボタンタイプ(WL:Webリンク、AL:アプリリンク、DS:配送照会、BK:Botキーワード、MD:メッセージ伝達、BC:相談トーク転換、BT:Bot転換、AC:チャンネル追加) |
| --- name | String | ボタン名 |
| --- linkMo | String | モバイルWebリンク(WLタイプの場合は必須フィールド) |
| --- linkPc | String | PC Webリンク(WLタイプの場合は任意フィールド) |
| --- schemeIos | String | iOSアプリリンク(ALタイプの場合は必須フィールド) |
| --- schemeAndroid | String | Androidアプリリンク(ALタイプの場合は必須フィールド) |
| -- comments | List | 検収結果 |
| --- id | Integer | お問い合わせID |
| --- content | String | お問い合わせ内容 |
| ---userName | String | 作成者 |
| ---createAt | String | 登録日 |
| --- attachment | List | 添付ファイル |
| ---- originalFileName | String | 添付ファイル名 |
| ---- filePath | String | 添付ファイルへのパス |
| ---status | String | 応答状態(INQ:お問い合わせ、APR:承認、REJ:差し戻し、REP:返信, REQ:検査中) |
| -- status | String | テンプレートのステータス |
| -- statusName | String | テンプレートのステータス名 |
| -- activated | Boolean | 有効かどうか |
| -- createDate | String | 作成日時 |
| - totalCount | Integer | 総個数 |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/template-image
Content-Type: multipart/form-data
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request parameter]
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| file | File | O | 画像ファイル |
[例]
curl -X POST -H "Content-Type: multipart/form-data" -H "X-Secret-Key:{secretkey}" "https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/template-image" -F "file=@alimtalk-template-image.jpeg"
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
},
"templateImage" {
"templateImageName": String,
"templateImageUrl": String
}
}
| 値 | タイプ | 説明 |
|---|---|---|
| header | Object | ヘッダ領域 |
| - resultCode | Integer | 結果コード |
| - resultMessage | String | 結果メッセージ |
| - isSuccessful | Boolean | 成否 |
| templateImage | Object | 本文領域 |
| - templateImageName | String | 画像名(アップロードされたファイル名) |
| - templateImageUrl | String | 画像のURL |
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/failback/appkey
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request body]
{
"resendAppKey": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| resendAppKey | String | O | 代替発送に設定するSMS AppKey |
[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/failback/appkey -d '{"resendAppKey": "smsAppKey"}
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}
[URL]
POST /alimtalk/v2.1/appkeys/{appkey}/failback
Content-Type: application/json;charset=UTF-8
[Path parameter]
| 値 | タイプ | 説明 |
|---|---|---|
| appkey | String | 固有のアプリケーションキー |
[Header]
{
"X-Secret-Key": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| X-Secret-Key | String | O | コンソールで作成できます。 |
[Request body]
{
"plusFriendId": String,
"isResend": Boolean,
"resendSendNo": String
}
| 値 | タイプ | 必須 | 説明 |
|---|---|---|---|
| plusFriendId | String | O | プラスフレンドID(最大30文字) |
| isResend | boolean | O | 送信失敗時、代替送信するかどうか コンソールで送信失敗設定をした時、デフォルト設定は再送信になっています。 |
| resendSendNo | String | O | 代替送信発信番号(最大13桁) (SMSサービスに登録された発信番号ではない場合、代替送信が失敗することがあります。) |
[例]
curl -X POST -H "Content-Type: application/json;charset=UTF-8" -H "X-Secret-Key:{secretkey}" https://api-alimtalk.cloud.toast.com/alimtalk/v2.1/appkeys/{appkey}/failback/appkey -d '{"plusFriendId": "@プラスフレンド","isResend": true,"resendSendNo": "01012341234" }
{
"header":{
"resultCode": Integer,
"resultMessage": String,
"isSuccessful": boolean
}
}