プログラム

プログラムエンドポイントリファレンス

プログラムは、Marketoのマーケティングアクティビティを整理し、個々のマーケティング施策のリードメンバーシップと成功を追跡します。 プログラムには、ランディングページ、メールテンプレート、ファイル以外のほとんどのアセットタイプを含めることができます。

プログラムタイプ

Marketo には、5 つのコアとなるプログラムタイプがあります。

  • デフォルト
  • イベント
  • オンライン セミナのあるイベント
  • エンゲージメント
  • メール

エンゲージメントプログラムには、他のあらゆるプログラムタイプを含めることができます。 ウェビナープログラムのデフォルト、イベント、イベントには、メールプログラムのみを含めることができます。

どんなプログラムにもチャネルがあります。 このチャネルは、使用可能なプログラムメンバーのステータスを定義し、Get Channels APIを使用して取得できます。

プログラムにはタグを付けることもできます。 タグは、プログラムタイプに応じてオプションまたは必須にできる、カスタマイズ可能なフィールドです。 各タグは、Marketo Adminで設定されたリストの値を使用します。

クエリ

ID、名前、ブラウジング、またはタグの種類と値でプログラムをクエリします。 ​ タグの種類を取得して、使用可能なタグと値を取得します。

ID 別

ID によるプログラムを取得エンドポイントには、id パスパラメーターが必要です。

プログラム IDは、https://app-\*\*\*.marketo.com/#PG1001A1などのUI URLから取得できます。 この例では、最初と2番目の文字セットの間のIDは1001です。

GET /rest/asset/v1/program/{id}.json
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "948f#14db037ec71",
    "result": [
        {
            "id": 1107,
            "name": "AAA2QueryProgramName",
            "description": "AssetAPI: getProgram tests",
            "createdAt": "2015-05-21T22:45:13Z+0000",
            "updatedAt": "2015-05-21T22:45:13Z+0000",
            "url": "https://app-devlocal1.marketo.com/#PG1107A1",
            "type": "Default",
            "channel": "Online Advertising",
            "folder": {
                "type": "Folder",
                "value": 1910,
                "folderName": "ProgramQueryTestFolder"
            },
            "status": "",
            "workspace": "Default",
            "tags": [
                {
                    "tagType": "AAA1 Required Tag Type",
                    "tagValue": "AAA1 RT1"
                }
            ],
            "costs": null,
            "headStart": false
        }
    ]
}

名前別

名前によるプログラムを取得エンドポイントには、name クエリパラメーターが必要です。 タグとコストをそれぞれ返すために、オプションのブール値パラメーターincludeTagsincludeCostsを設定します。

GET /rest/asset/v1/program/byName.json?name=TestProgramName&includeTags=true
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "16026#14db03e070c",
    "result": [
        {
            "id": 1107,
            "name": "AAA2QueryProgramName",
            "description": "AssetAPI: getProgram tests",
            "createdAt": "2015-05-21T22:45:13Z+0000",
            "updatedAt": "2015-05-21T22:45:13Z+0000",
            "url": "https://app-devlocal1.marketo.com/#PG1107A1",
            "type": "Default",
            "channel": "Online Advertising",
            "folder": {
                "type": "Folder",
                "value": 1910,
                "folderName": "ProgramQueryTestFolder"
            },
            "status": "",
            "workspace": "Default",
            "tags": [
                {
                    "tagType": "AAA1 Required Tag Type",
                    "tagValue": "AAA1 RT1"
                }
            ],
            "costs": null,
            "headStart": false
        }
    ]
}

参照

プログラムを参照するには、​ プログラムを取得 エンドポイントを使用します。

オプションのstatus パラメーターは、エンゲージメントおよびメールプログラムをステータス別にフィルタリングします。 有効な値は、エンゲージメントプログラムではonoff、メールプログラムではunlockedです。

オプションのmaxReturn パラメーターは、返されるプログラムの数を制御します。 デフォルトは20、最大は200です。 ページネーションにはオプションのoffset パラメーターを使用します。デフォルトは0です。

このエンドポイントはプログラムタグを返しません。 ID🔗または名前でプログラムを取得 プログラムを取得する タグを取得します。

GET /rest/asset/v1/programs.json
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "7a39#1511bf8a41c",
    "result": [
        {
            "id": 1035,
            "name": "clone it",
            "description": "",
            "createdAt": "2015-11-18T15:25:35Z+0000",
            "updatedAt": "2015-11-18T15:25:46Z+0000",
            "url": "https://app-devlocal1.marketo.com/#NP1035A1",
            "type": "Engagement",
            "channel": "Nurture",
            "folder": {
                "type": "Folder",
                "value": 28,
                "folderName": "Nurturing"
            },
            "status": "on",
            "workspace": "Default",
            "headStart": false
        },
        {
            "id": 1032,
            "name": "email prog",
            "description": "",
            "createdAt": "2015-11-18T14:56:28Z+0000",
            "updatedAt": "2015-11-18T14:56:28Z+0000",
            "url": "https://app-devlocal1.marketo.com/#EBP1032A1",
            "type": "Email",
            "channel": "Email Send",
            "folder": {
                "type": "Folder",
                "value": 26,
                "folderName": "Data Management"
            },
            "status": "unlocked",
            "workspace": "Default",
            "headStart": false
        }
    ]
}

日付範囲別

earliestUpdatedAtおよびlatestUpdatedAt パラメーターと​ プログラムの取得を使用して、低い日時と高い日時の境界を設定します。 エンドポイントは、範囲内で作成または更新されたプログラムを返します。

GET /rest/asset/v1/programs.json?earliestUpdatedAt=2017-01-01T00:00:00-05:00&latestUpdatedAt=2017-01-30T00:00:00-05:00
{
    "success": true,
    "errors": [],
    "requestId": "1225a#15f82a83875",
    "warnings": [],
    "result": [
        {
            "id": 1070,
            "name": "Bulk Import - Test",
            "description": "",
            "createdAt": "2017-01-13T19:34:17Z+0000",
            "updatedAt": "2017-01-13T19:34:18Z+0000",
            "url": "https://app-abm.marketo.com/#PG1070A1",
            "type": "Default",
            "channel": "Content",
            "folder": {
                "type": "Folder",
                "value": 637,
                "folderName": "Avention"
            },
            "status": "",
            "workspace": "Default",
            "headStart": false
        },
        {
            "id": 1069,
            "name": "Program With Email",
            "description": "",
            "createdAt": "2017-01-03T22:53:14Z+0000",
            "updatedAt": "2017-01-03T22:53:15Z+0000",
            "url": "https://app-abm.marketo.com/#EBP1069A1",
            "type": "Email",
            "channel": "Email Send",
            "folder": {
                "type": "Folder",
                "value": 621,
                "folderName": "Smartling"
            },
            "status": "unlocked",
            "workspace": "Default",
            "headStart": false
        },
        {
            "id": 1071,
            "name": "Program with Guided Landing Page Template",
            "description": "",
            "createdAt": "2017-01-24T22:59:21Z+0000",
            "updatedAt": "2017-01-24T22:59:22Z+0000",
            "url": "https://app-abm.marketo.com/#PG1071A1",
            "type": "Default",
            "channel": "Content",
            "folder": {
                "type": "Folder",
                "value": 621,
                "folderName": "Smartling"
            },
            "status": "",
            "workspace": "Default",
            "headStart": false
        },
        {
            "id": 1047,
            "name": "ReachForce List Update",
            "description": "",
            "createdAt": "2016-05-24T19:38:35Z+0000",
            "updatedAt": "2017-01-13T19:28:09Z+0000",
            "url": "https://app-abm.marketo.com/#PG1047A1",
            "type": "Default",
            "channel": "Content",
            "folder": {
                "type": "Folder",
                "value": 407,
                "folderName": "Everly Tests"
            },
            "status": "",
            "workspace": "Default",
            "headStart": false
        }
    ]
}

タグタイプ別

タグ別​ プログラムを取得 エンドポイントは、指定されたタグの種類と値に一致するプログラムを返します。

tagTypeおよびtagValue パラメーターが必要です。 オプションの整数maxReturnは、返されるプログラムの数を制御します。デフォルトは20、最大値は200です。 ページネーションにはオプションの整数offsetを使用します。デフォルトは0です。 結果はランダムな順序で返されます。

GET /rest/asset/v1/program/byTag.json?tagType=Presenter&tagValue=Dennis
{
    "success" : true,
    "warnings" : [],
    "errors" : [],
    "requestId" : "13b6d#152b38d5be4",
    "result" : [{
            "id" : 1004,
            "name" : "It's a Program",
            "description" : "",
            "createdAt" : "2013-02-26T00:37:37Z+0000",
            "updatedAt" : "2013-03-11T15:32:02Z+0000",
            "url" : "https://app-sjst.marketo.com/#PG1004A1",
            "type" : "Default",
            "channel" : "Email Blast",
            "folder" : {
                "type" : "Folder",
                "value" : 38,
                "folderName" : "Test"
            },
            "status" : "",
            "workspace" : "Default",
            "tags" : [{
                    "tagType" : "Presenter",
                    "tagValue" : "Dennis"
                }
            ],
                        "headStart": false
    ]
}

作成と更新

​ プログラムを作成するには、foldernametypeおよびchannelが必要です。 オプションのパラメーターはdescriptioncostsおよびtagsです。 一部のサブスクリプションでは、特定のプログラムタイプにタグが必要です。 Get Tagsを使用して、インスタンスの要件を確認します。

更新中に変更できるのは、説明、名前、tagsおよびcostsのみです。 チャネルとタイプは、作成時にのみ設定できます。 costsDestructiveUpdatetrueに設定すると、既存のコストがすべてクリアされ、リクエストに含まれるコストに置き換えられます。

メールプログラムを作成または更新する際に、startDateendDate を UTC 日時として渡すこともできます。

"startDate": "2022-10-19T15:00:00.000Z"
"endDate": "2022-10-19T15:00:00.000Z"

作成

POST /rest/asset/v1/programs.json
Content-Type: application/x-www-form-urlencoded
name=API Test Program&folder={"id":1035,"type":"Folder"}&description=Sample API Program&type=Default&channel=Email Blast&costs=[{"startDate":"2015-01-01","cost":2000}]
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "d505#14d9bd96352",
    "result": [
        {
            "id": 1207,
            "name": "newProgram",
            "description": "This is a test",
            "createdAt": "2015-05-28T18:47:15Z+0000",
            "updatedAt": "2015-05-28T18:47:15Z+0000",
            "url": "https://app-devlocal1.marketo.com/#ME1207A1",
            "type": "Event",
            "channel": "channelOne",
            "folder": {
                "type": "Folder",
                "value": 59,
                "folderName": "blah blah"
            },
            "status": "",
            "workspace": "Default",
            "headStart": false
            "tags": null,
            "costs": [
                {
                    "startDate":"2015-01-01",
                    "cost":2000
                }
            ]
        }
    ]
}

更新

プログラムのコストを追加するには、それらをcosts配列に追加します。 既存のコストを置き換えるには、新しいコストを渡し、costsDestructiveUpdatetrueに設定します。 すべてのコストをクリアするには、costsを省略し、costsDestructiveUpdatetrueに設定します。

POST /rest/asset/v1/program/{id}.json
Content-Type: application/x-www-form-urlencoded
description=This is an updated description&name=Updated Program Name&costs=[{"startDate":"2016-01-01","cost":200,"note":"Google Adwords"}]
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "5c37#14db05608aa",
    "result": [
        {
            "id": 1110,
            "name": "Updated Program Name",
            "description": "This is a updated description",
            "createdAt": "2015-05-21T22:45:14Z+0000",
            "updatedAt": "2015-06-01T18:13:58Z+0000",
            "url": "https://app-devlocal1.marketo.com/#NP1110A1",
            "type": "Engagement",
            "channel": "Nurture",
            "folder": {
                "type": "Folder",
                "value": 1910,
                "folderName": "ProgramQueryTestFolder"
            },
            "status": "on",
            "workspace": "Default",
            "headStart": false,
            "tags": [
                {
                    "tagType": "AAA1 Required Tag Type",
                    "tagValue": "AAA1 RT1"
                },
                {
                    "tagType": "tagTypeOne",
                    "tagValue": "tagTypeValue1"
                }
            ],
            "costs": [
                {
                    "startDate": "2016-01-01",
                    "cost": 200,
                    "note": "Google Adwords"
                }
            ]
        }
    ]
}

承認

メールプログラムをリモートで承認または未承認にすることができます。 承認されたプログラムはstartDateで実行され、endDateで終了します。

承認前に、日付を設定し、UIで有効で承認済みの電子メールとスマートリストを設定します。

承認

POST /rest/asset/v1/program/{id}/approve.json
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "16026#150b5bf7692",
    "result": [
        {
            "id": 11062
        }
    ]
}

未承認

POST /rest/asset/v1/program/{id}/unapprove.json
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "16026#150b5bf7692",
    "result": [
        {
            "id": 11062
        }
    ]
}

複製

​ プログラムの複製には、新しい名前と親フォルダーが必要です。 説明はオプションです。 nameはグローバルに一意である必要があり、255文字を超えることはできません。

folder パラメーターのtype属性をFolderに設定します。 ターゲットフォルダーは、ソースプログラムと同じワークスペースにある必要があります。

このAPIを使用して、プッシュ通知、アプリ内メッセージ、レポート、ソーシャルアセットを含むアプリ内プログラムまたはプログラムを複製することはできません。

POST /rest/asset/v1/program/{id}/clone.json
Content-Type: application/x-www-form-urlencoded
name=Cloned Program - PHP&folder={"id":5562,"type":"Folder"}&description=Description
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "3a7f#14db06990cc",
    "result": [
        {
            "id": 1221,
            "name": "cloneProgram",
            "description": "This is a description for the cloned program",
            "createdAt": "2015-06-01T18:36:57Z+0000",
            "updatedAt": "2015-06-01T18:36:57Z+0000",
            "url": "https://app-devlocal1.marketo.com/#PG1221A1",
            "type": "Default",
            "channel": "Blog",
            "folder": {
                "type": "Folder",
                "value": 59,
                "folderName": "blah blah"
            },
            "status": "",
            "workspace": "Default",
            "headStart": false
            "tags": null,
            "costs": null
        }
    ]
}

プログラムの削除

プログラムの削除は、標準のアセット削除パターンに従います。

POST /rest/asset/v1/program/{id}/delete.json
{
    "success": true,
    "warnings": [],
    "errors": [],
    "requestId": "16501#14db042c6b7",
    "result": [
        {
            "id": 1109
        }
    ]
}
recommendation-more-help
marketo-developer-help