Zum Hauptinhalt springen
PUT
/
integrators
/
timeline
/
v3
/
{appId}
/
event-templates
/
{eventTemplateId}
イベントテンプレートを更新
curl --request PUT \
  --url https://api.hubapi.com/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId} \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "1001298",
  "name": "PetSpot Registration",
  "headerTemplate": "Registered for [{{petName}}](https://my.petspot.com/pets/{{petName}})",
  "detailTemplate": "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n  **{{question}}**: {{answer}}\n{{/each}}\n\nEDIT",
  "tokens": [
    {
      "name": "petName",
      "label": "Pet Name",
      "type": "string",
      "objectPropertyName": "firstname"
    },
    {
      "name": "petAge",
      "label": "Pet Age",
      "type": "number"
    },
    {
      "name": "petColor",
      "label": "Pet Color",
      "type": "enumeration",
      "options": [
        {
          "value": "white",
          "label": "White"
        },
        {
          "value": "black",
          "label": "Black"
        },
        {
          "value": "brown",
          "label": "Brown"
        },
        {
          "value": "yellow",
          "label": "Yellow"
        },
        {
          "value": "other",
          "label": "Other"
        }
      ]
    }
  ]
}'
{
  "id": "1001298",
  "objectType": "contacts",
  "createdAt": "2020-02-12T20:58:26Z",
  "updatedAt": "2020-02-12T20:58:26Z",
  "name": "PetSpot Registration",
  "headerTemplate": "Registered for [{{petName}}](https://my.petspot.com/pets/{{petName}})",
  "detailTemplate": "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n  **{{question}}**: {{answer}}\n{{/each}}\n\nEDIT",
  "tokens": [
    {
      "name": "petAge",
      "type": "number",
      "createdAt": "2020-02-12T20:58:26Z",
      "updatedAt": "2020-02-12T20:58:26Z",
      "label": "Pet Age",
      "options": []
    },
    {
      "name": "petColor",
      "type": "enumeration",
      "createdAt": "2020-02-12T20:58:26Z",
      "updatedAt": "2020-02-12T20:58:26Z",
      "label": "Pet Color",
      "options": [
        {
          "value": "white",
          "label": "White"
        },
        {
          "value": "black",
          "label": "Black"
        },
        {
          "value": "brown",
          "label": "Brown"
        },
        {
          "value": "yellow",
          "label": "Yellow"
        },
        {
          "value": "other",
          "label": "Other"
        }
      ]
    },
    {
      "name": "petName",
      "type": "string",
      "createdAt": "2020-02-12T20:58:26Z",
      "updatedAt": "2020-02-12T20:58:26Z",
      "label": "Pet Name",
      "objectPropertyName": "firstname",
      "options": []
    }
  ]
}
サポートされる製品
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub無料ツール
Sales HubSales Hub無料ツール
Service HubService Hub無料ツール
Content HubContent HubStarter

Authorizations

hapikey
string
query
required

Path Parameters

eventTemplateId
string
required

イベントテンプレートID。

appId
integer
required

ターゲットアプリのID。

Body

application/json

The updated event template definition.

State of the template definition being updated.

name
string
required

テンプレート名。

Example:

"PetSpot Registration"

tokens
object[]
required

イベントのカスタムプロパティーとして使用でき、完全なCRMオブジェクトを作成するためのトークンのコレクション。

Example:

"[{\"name\":\"petName\",\"type\":\"string\",\"label\":\"Pet Name\",\"objectPropertyName\":\"firstname\"},{\"name\":\"petAge\",\"type\":\"number\",\"label\":\"Pet Age\"},{\"name\":\"petColor\",\"type\":\"enumeration\",\"label\":\"Pet Color\",\"options\":[{\"label\":\"White\",\"value\":\"white\"},{\"label\":\"Black\",\"value\":\"black\"},{\"label\":\"Brown\",\"value\":\"brown\"},{\"label\":\"Yellow\",\"value\":\"yellow\"},{\"label\":\"Other\",\"value\":\"other\"}]}]"

id
string
required

テンプレートID。

Example:

"1001298"

detailTemplate
string

詳細を展開すると、Handlebarsとイベント固有のデータを含めてMarkdown構文を使用してタイムラインでHTMLがレンダリングされます。

Example:

"Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n **{{question}}**: {{answer}}\n{{/each}}\n\nEDIT"

headerTemplate
string

ヘッダーとして、Handlebarsとイベント固有のデータを含めてMarkdown構文を使用してタイムラインでHTMLがレンダリングされます。

Example:

"Registered for [{{petName}}](https://my.petspot.com/pets/{{petName}})"

Response

successful operation

The current state of the template definition.

name
string
required

テンプレート名。

tokens
object[]
required

イベントのカスタムプロパティーとして使用でき、完全なCRMオブジェクトを作成するためのトークンのコレクション。

id
string
required

テンプレートID。

objectType
string
required

このテンプレートが[コンタクト、会社、チケット、取引]についてサポートされているCRMオブジェクトのタイプ。

createdAt
string<date-time>

イベントテンプレートが作成された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

detailTemplate
string

詳細を展開すると、Handlebarsとイベント固有のデータを含めてMarkdown構文を使用してタイムラインでHTMLがレンダリングされます。

headerTemplate
string

ヘッダーとして、Handlebarsとイベント固有のデータを含めてMarkdown構文を使用してタイムラインでHTMLがレンダリングされます。

updatedAt
string<date-time>

イベントテンプレートが最後に更新された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

I