{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"REST API を使用した Journey の作成、更新、削除","description":"API を使用して Customer Journey を作成、変更、削除できます。フォルダー権限によって、顧客プロファイルのリストを取得したり、Journey を作成、変更、削除したりする機能に影響が出る場合があります。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rest-api-を使用した-journey-の作成更新削除","__idx":0},"children":["REST API を使用した Journey の作成、更新、削除"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API を使用して Customer Journey を作成、変更、削除できます。フォルダー権限によって、顧客プロファイルのリストを取得したり、Journey を作成、変更、削除したりする機能に影響が出る場合があります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Full Control Folder Permission"]},"：ユーザーは選択したフォルダーまたは子フォルダー内のすべての Journey を作成、変更、削除できます。さらに、プロファイルと顧客のエンドポイントのリストを取得できます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["**View Folder Permission：**ユーザーは選択したフォルダーまたは子フォルダー内の Journey を表示できます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"journey-の作成","__idx":1},"children":["Journey の作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Journey の作成中に、セグメントやアクティベーションなどの依存リソースに名前を付けて作成する必要があります。以下の属性は、ドラフトモードの間のみエンドポイントを通じて更新できます。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["イタリック体で表示されたオブジェクトは、Journey の作成に必要です。属性の横にアスタリスクがある場合、属性が指定されていない場合は null {} として値を渡す必要があります。"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Journey"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["name"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["state（draft または launched）"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["goal*"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JourneyStages"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["name"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["entryCriteria"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["milestone"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["exitCriterias*"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["steps*"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["rootStep*"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Journey が launch された後は、これらの属性を変更することはできません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の例では、ユーザーは Journey の name、state、goal、および entry criteria、milestone、exit criteria、wait step、activation、end を含むいくつかのステージを特定しています。Journey の作成時に journey_id が指定されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"リクエストサンプル","__idx":2},"children":["リクエストサンプル"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X POST \\\nhttps://api-cdp.treasuredata.com/entities/journeys \\\n-H 'AUTHORIZATION: TD1 1/1234567891234567891234000891234567891234'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n \"type\": \"journeys\",\n \"relationships\": {\n \"parentFolder\": {\n \"data\": {\n \"id\": 3456,\n \"type\": \"folder-segment\"\n }\n },\n \"createdBy\": {\n \"data\": {\n \"id\": 65,\n \"type\": \"user\"\n }\n },\n \"updatedBy\": {\n \"data\": {\n \"id\": 12,\n \"type\": \"user\"\n }\n }\n },\n \"attributes\": {\n \"name\": \"My First Journey\",\n \"description\": \"Customer participating in a journey\",\n \"lastUpdatedAt\": \"... The time when last successful execution of the workflow completes ...\",\n \"state\": \"launched\",\n \"audienceId\": \"... Audience ID this journey belongs to ...\",\n \"journey_stages\": [\n {\n \"name\": \"Awareness\",\n \"entry_criteria\": {\n \"name\": \"Visit website\",\n \"description\": \"Customer visits website for the first time\",\n \"segment_id\": \"78954\"\n },\n \"milestone\": {\n \"name\": \"Register\",\n \"description\": \"Customer signs up\",\n \"segment_id\": \"98543\"\n },\n \"exit_criterias\": [\n {\n \"name\": \"Do not open email\",\n \"segment_id\": \"94322\"\n },\n {\n \"name\": \"Stale over 30 days\",\n \"exitAfter\": 30,\n \"unit\": \"days\"\n }\n ],\n \"steps\": {\n \"a49a0aa3-6991-4dd8-a4af-c5d36fe9dd93\": {\n \"type\": \"WaitStep\",\n \"waitStep\": 3,\n \"waitStepUnit\": \"day\",\n \"next\": \"2b38f1e5-97d5-45ae-b165-b1c3288721cb\",\n },\n \"2b38f1e5-97d5-45ae-b165-b1c3288721cb\": {\n \"type\": \"Activation\",\n \"journeyActivationStepId\": \"...\",\n \"next\": \"b722a160-73d3-4565-a6da-702f7019d3db\"\n },\n \"b722a160-73d3-4565-a6da-702f7019d3db\": {\n \"type\": \"End\"\n }\n },\n \"root_step\": \"a49a0aa3-6991-4dd8-a4af-c5d36fe9dd93\"\n }\n ],\n \"goal\": {\n \"name\": \"customers that met goal\",\n \"description\": \"customers met all milestones to achieve goal\",\n \"segment_id\": \"54321\",\n }\n }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ステージの-waitstep-の定義","__idx":3},"children":["ステージの WaitStep の定義"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API リクエストペイロードの steps セクションを更新し、WaitStep タイプを定義することで、ステージの wait step を定義できます。たとえば、以下のペイロードサンプルの \"type\" の位置では、waitStep の期間と単位は 3 日間です。これは \"waitStep\": 3 と \"waitStepUnit\": \"day\" で示されています。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"steps\": {\n \"a49a0aa3-6991-4dd8-a4af-c5d36fe9dd93\": {\n \"type\": \"WaitStep\",\n \"waitStep\": 3,\n \"waitStepUnit\": \"day\",\n \"next\": \"2b38f1e5-97d5-45ae-b165-b1c3288721cb\",\n }\n }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"journey-の表示","__idx":4},"children":["Journey の表示"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Journey とそのすべてのステージおよびアクティベーションを表示できます。以下の例では、Journey ID は 12345 です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X GET \\\n https://api-cdp.treasuredata.com/entities/journeys/12345 \\\n -H 'AUTHORIZATION: TD1 1/1234567891234567891234560001234567891234'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"journey-の更新","__idx":5},"children":["Journey の更新"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ドラフトモードの間、指定した Journey を更新できます。以下の例では、Journey ID は 12345 です。Journey の ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["state"]}," が \"launched\" に変更された後は、属性を変更できません。UI では Journey がドラフト状態の間に exit criteria、goal、wait step を個別に追加できますが、API ではこれらの個別の呼び出しはありません。entry criteria、exit criteria、wait step、milestone、activation、goal などのリソースの値を更新するには、PATCH メソッドを使用できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"リクエストサンプル-1","__idx":6},"children":["リクエストサンプル"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X PATCH \\\nhttps://api-cdp.treasuredata.com/entities/journeys/12345 \\\n-H 'AUTHORIZATION: TD1 1/1234567891234567891234560001234567891234'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n \"type\": \"journeys\",\n \"relationships\": {\n \"parentFolder\": {\n \"data\": {\n \"id\": \"...\",\n \"type\": \"folder-segment\"\n }\n },\n \"createdBy\": {\n \"data\": {\n \"id\": \"...\",\n \"type\": \"user\"\n }\n },\n \"updatedBy\": {\n \"data\": {\n \"id\": \"...\",\n \"type\": \"user\"\n }\n }\n },\n \"attributes\": {\n \"name\": \"My Updated Journey\",\n \"description\": \"...\",\n \"state\": \"launched\",\n \"audienceId\": \"... Audience ID this journey belongs to ...\",\n \"journey_stages\": [\n {\n \"name\": \"Awareness\",\n \"entry_criteria\": {\n \"name\": \"Visit website\",\n \"description\": \"...\",\n \"segment_id\": \"...\"\n },\n \"milestone\": {\n \"name\": \"Register\",\n \"description\": \"...\",\n \"segment_id\": \"...\"\n },\n \"exit_criterias\": [\n {\n \"name\": \"Do not open email\",\n \"segment_id\": \"...\"\n }\n ],\n \"steps\": {\n \"a49a0aa3-6991-4dd8-a4af-c5d36fe9dd93\": {\n \"type\": \"WaitStep\",\n \"wait_step\": 3,\n \"wait_step_unit\": \"day\",\n \"next\": \"2b38f1e5-97d5-45ae-b165-b1c3288721cb\",\n },\n \"2b38f1e5-97d5-45ae-b165-b1c3288721cb\": {\n \"type\": \"Activation\",\n \"activation_id\": \"...\",\n \"next\": \"b722a160-73d3-4565-a6da-702f7019d3db\"\n },\n \"b722a160-73d3-4565-a6da-702f7019d3db\": {\n \"type\": \"End\"\n }\n },\n \"root_step\": \"a49a0aa3-6991-4dd8-a4af-c5d36fe9dd93\"\n }\n ],\n \"goal\": {\n \"name\": \"...\",\n \"description\": \"...\",\n \"segment_id\": \"...\",\n }\n }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"journey-の削除","__idx":7},"children":["Journey の削除"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["指定した Journey ID を使用して Journey を削除できます。以下の例では、Journey ID は 12345 です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X DELETE \\\n https://api-cdp.treasuredata.com/entities/journeys/12345 \\\n -H 'AUTHORIZATION: TD1 1/1234567891234567891234560001234567891234'\n","lang":"bash"},"children":[]}]},"headings":[{"value":"REST API を使用した Journey の作成、更新、削除","id":"rest-api-を使用した-journey-の作成更新削除","depth":1},{"value":"Journey の作成","id":"journey-の作成","depth":2},{"value":"リクエストサンプル","id":"リクエストサンプル","depth":3},{"value":"ステージの WaitStep の定義","id":"ステージの-waitstep-の定義","depth":2},{"value":"Journey の表示","id":"journey-の表示","depth":2},{"value":"Journey の更新","id":"journey-の更新","depth":2},{"value":"リクエストサンプル","id":"リクエストサンプル-1","depth":3},{"value":"Journey の削除","id":"journey-の削除","depth":2}],"frontmatter":{"seo":{"title":"REST API を使用した Journey の作成、更新、削除","description":"API を使用して Customer Journey を作成、変更、削除できます。フォルダー権限によって、顧客プロファイルのリストを取得したり、Journey を作成、変更、削除したりする機能に影響が出る場合があります。"}},"lastModified":"2025-12-08T07:20:21.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/journey-orchestration/creating-updating-and-deleting-journeys-using-the-rest-api","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}