テンプレート設定一覧の取得

現在のビジネス配下のすべてのテンプレート設定の一覧を取得します。テンプレート名、種別、内容、審査ステータスなどを含む一覧が返されます。

リクエストURL

GET https://smsapi.engagelab.com/v1/template-configs

呼び出し認証

APIリクエストの認証方法については、呼び出し認証を参照してください。

リクエスト例

リクエストヘッダー

GET /v1/template-configs HTTP/1.1 Content-Type: application/json Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
              
              GET /v1/template-configs  HTTP/1.1
Content-Type: application/json
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0

            
このコードブロックはフローティングウィンドウ内に表示されます

リクエストボディ

なし

リクエストパラメータ

なし

レスポンスパラメータ

成功レスポンス

HTTPステータスコードは200で、レスポンスボディはテンプレート設定の配列です。

フィールド 説明
template_id String テンプレートID
template_name String テンプレート名
template_type String テンプレート種別:utility(通知)、marketing(マーケティング)
template_content String テンプレート内容
country_codes String 主な配信先の国コード。カンマ区切り
status Integer ステータス:1-審査待ち、2-承認済み、3-却下
sign_id String 署名ID(任意)
sign_name String 署名名(任意)
sign_position Integer 署名の位置:0-なし、1-先頭、2-末尾(任意)
sign_status Integer 署名のステータス(任意)
audit_remark String 審査の備考
created_time Integer 作成時刻(Unixタイムスタンプ)
updated_time Integer 更新時刻(Unixタイムスタンプ)

成功例

[ { "template_id": "123456789", "template_name": "Order Notification Template", "template_type": "utility", "template_content": "Your order {order_no} has been shipped and is expected to be delivered by {delivery_time}", "country_codes": "CN,US", "status": 2, "sign_id": "987654321", "sign_name": "Company Name", "sign_position": 2, "sign_status": 2, "audit_remark": "", "created_time": 1699000000, "updated_time": 1699000000 } ]
              
              [
  {
    "template_id": "123456789",
    "template_name": "Order Notification Template",
    "template_type": "utility",
    "template_content": "Your order {order_no} has been shipped and is expected to be delivered by {delivery_time}",
    "country_codes": "CN,US",
    "status": 2,
    "sign_id": "987654321",
    "sign_name": "Company Name",
    "sign_position": 2,
    "sign_status": 2,
    "audit_remark": "",
    "created_time": 1699000000,
    "updated_time": 1699000000
  }
]

            
このコードブロックはフローティングウィンドウ内に表示されます

エラーレスポンス

HTTPステータスコードは4xx/5xxで、レスポンスボディには次のフィールドが含まれます。

フィールド 説明
code Integer エラーコード
message String エラーの詳細

エラー例

{ "code": 500, "message": "Internal server error" }
              
              {
  "code": 500,
  "message": "Internal server error"
}

            
このコードブロックはフローティングウィンドウ内に表示されます

エラーコード

エラーコード HTTPコード 説明
400 400 パラメータエラーまたは業務ロジックエラー
500 500 サーバー内部エラー

付録

テンプレート設定のステータス(status)

説明
1 審査待ち
2 承認済み
3 却下

テンプレート種別(template_type)

説明
utility 通知
marketing マーケティング
Icon Solid Transparent White Qiyu
お問い合わせ