メールタグ検索
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'access_token=xxxxxx&refresh_token=xxxxxx&wait_flag=1&'fields=mail_tag_id,mail_tag_month,mail_tag_name,mail_tag_note,mail_tag_message1,mail_tag_message2,mail_tag_message3,mail_tag_message4,mail_tag_message5,mail_tag_message6,mail_tag_deleted_flag,mail_tag_creation_date,mail_tag_last_modified_date,mail_tag_last_modified_null_safe_date,mail_tag_creator_id,mail_tag_creator_name,mail_tag_last_modified_by_id,mail_tag_last_modified_by_null_safe_id,mail_tag_last_modified_by_name,mail_tag_last_modified_by_null_safe_name'&mail_tag_id-like='MyMailTag'&mail_tag_month-eq=2&offset=0&limit=2' https://api.next-engine.org/api_v1_master_mailtag/search// POST /api_v1_master_mailtag/search - メールタグ検索const params = new URLSearchParams({ access_token: '<access_token>', fields: 'field1,field2', offset: '0', limit: '50',})const res = await fetch('https://api.next-engine.org/api_v1_master_mailtag/search', { method: 'POST', headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: params,})const json = await res.json()if (json.result !== 'success') throw new Error(json.message ?? json.code)console.log(json.data)# POST /api_v1_master_mailtag/search - メールタグ検索import requests
params = { 'access_token': '<access_token>', 'fields': 'field1,field2', 'offset': '0', 'limit': '50',}res = requests.post( 'https://api.next-engine.org/api_v1_master_mailtag/search', data=params,)json = res.json()if json['result'] != 'success': raise RuntimeError(json.get('message') or json.get('code'))print(json.get('data'))Request Body required
Section titled “Request Body required ”object
OAuth2 アクセストークン (必須)
OAuth2 リフレッシュトークン (access_token 期限切れ時の自動更新に使用)
同期実行フラグ。“1” 指定で処理完了を待つ
取得するフィールドをカンマ区切りで指定 (search 系のみ)
検索開始位置 (search 系のみ)
取得件数 (search 系のみ)
Responses
Section titled “ Responses ”実行結果 (result が success / error / redirect のいずれか)
object
実行結果ステータス
エラー時のエラーコード
object
更新後のアクセストークン
アクセストークン有効期限 (YYYY-MM-DD HH:MM:SS)
更新後のリフレッシュトークン
リフレッシュトークン有効期限
エンドポイント固有のレスポンスデータ
Count/search 系のヒット件数 (form-urlencoded レスポンスでは文字列で返ることがある)
object
メールタグ / 文字列型
対応月 / 数値型 / 0-12の値が設定される。0:メール送信月に対応する1-12の設定がない場合、適用される。1-12:メール送信月の1月~12月に対応する。
メールタグ概要 / 文字列型
メールタグ備考 / 文字列型
メッセージ1 / 文字列型 / メール送信時、メッセージ1~6の中からランダムにメッセージが選択される。
メッセージ2 / 文字列型
メッセージ1 / 文字列型
メッセージ2 / 文字列型
メッセージ1 / 文字列型
メッセージ2 / 文字列型
削除フラグ / 文字列型
作成日 / 日時型
最終更新日 / 日時型
最終更新日 / 日時型 / NULLの場合作成日
作成担当者ID / 数値型
作成担当者名 / 文字列型
最終更新者ID / 数値型
最終更新者ID / 数値型 / NULLの場合作成者ID
最終更新者名 / 文字列型
最終更新者名 / 文字列型 / NULLの場合作成者名
Example
{ "result": "success", "count": "1", "data": [ { "mail_tag_id": "MyMailTag", "mail_tag_month": "2", "mail_tag_name": "ok", "mail_tag_note": "ok", "mail_tag_message1": "ammamamamamamam", "mail_tag_message2": "", "mail_tag_message3": "", "mail_tag_message4": "", "mail_tag_message5": "", "mail_tag_message6": "", "mail_tag_deleted_flag": "0", "mail_tag_creation_date": "2017-02-09 16:09:01", "mail_tag_last_modified_date": null, "mail_tag_last_modified_null_safe_date": "2017-02-09 16:09:01", "mail_tag_creator_id": "10003", "mail_tag_creator_name": "xxxxxxxx", "mail_tag_last_modified_by_id": null, "mail_tag_last_modified_by_null_safe_id": "10003", "mail_tag_last_modified_by_name": null, "mail_tag_last_modified_by_null_safe_name": "xxxxxxx" } ], "access_token": "xxxxxxxxxxx", "access_token_end_date": "2017-04-13 18:24:53", "refresh_token": "xxxxxxxxxxx", "refresh_token_end_date": "2017-04-15 18:24:53"}クライアントエラー (HTTP ステータス自体は 200 + result=error で返ることが多い)
object
実行結果ステータス
エラー時のエラーコード
object
更新後のアクセストークン
アクセストークン有効期限 (YYYY-MM-DD HH:MM:SS)
更新後のリフレッシュトークン
リフレッシュトークン有効期限
エンドポイント固有のレスポンスデータ
Count/search 系のヒット件数 (form-urlencoded レスポンスでは文字列で返ることがある)
Example
{ "result": "success"}