curl --request POST \
--url https://api.hubapi.com/integrators/timeline/v3/events/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"inputs": [
{
"eventTemplateId": "1001298",
"email": "[email protected]",
"tokens": {
"petName": "Art3mis",
"petAge": 3,
"petColor": "black"
},
"extraData": {
"questions": [
{
"question": "Who's a good girl?",
"answer": "Bark!"
},
{
"question": "Do you wanna go on a walk?",
"answer": "Woof!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Art3mis",
"headerLabel": "Art3mis dog",
"url": "https://my.petspot.com/pets/Art3mis",
"width": 600,
"height": 400
}
},
{
"eventTemplateId": "1001298",
"email": "[email protected]",
"tokens": {
"petName": "Pocket",
"petAge": 3,
"petColor": "yellow"
},
"extraData": {
"questions": [
{
"question": "Who's a good kitty?",
"answer": "Purr..."
},
{
"question": "Will you stop playing with that?",
"answer": "Meow!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Pocket",
"headerLabel": "Pocket Tiger",
"url": "https://my.petspot.com/pets/Pocket",
"width": 600,
"height": 400
}
}
]
}
EOF{
"results": [
{
"objectType": "contacts",
"id": "petspot:1001298:[email protected]",
"eventTemplateId": "1001298",
"email": "[email protected]",
"objectId": "28001",
"timestamp": "2020-01-30T18:10:17.057Z",
"tokens": {
"petName": "Art3mis",
"petColor": "black",
"petAge": "3"
},
"extraData": {
"questions": [
{
"question": "Who's a good girl?",
"answer": "Bark!"
},
{
"question": "Do you wanna go on a walk?",
"answer": "Woof!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Art3mis",
"headerLabel": "Art3mis dog",
"url": "https://my.petspot.com/pets/Art3mis",
"width": 600,
"height": 400
}
},
{
"objectType": "contacts",
"id": "petspot:1001298:[email protected]",
"eventTemplateId": "1001298",
"email": "[email protected]",
"objectId": "28651",
"timestamp": "2020-01-30T18:10:17.057Z",
"tokens": {
"petName": "Pocket",
"petColor": "yellow",
"petAge": "3"
},
"extraData": {
"questions": [
{
"question": "Who's a good kitty?",
"answer": "Purr..."
},
{
"question": "Will you stop playing with that?",
"answer": "Meow!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Pocket",
"headerLabel": "Pocket Tiger",
"url": "https://my.petspot.com/pets/Pocket",
"width": 600,
"height": 400
}
}
],
"status": "COMPLETE",
"startedAt": "2020-01-30T18:10:16.478734Z",
"completedAt": "2020-01-30T18:10:17.793206Z"
}イベントテンプレートに基づいて、タイムラインイベントの複数のインスタンスをバッチで作成します。作成後、これらのイベントは、オブジェクトのタイムライン上で不変になり、変更できません。イベントテンプレートが「objectPropertyName」を使用してオブジェクトプロパティーを更新するように設定されている場合、この呼び出しでもそれらのプロパティーの更新、または存在しない場合は追加が試行されます。
curl --request POST \
--url https://api.hubapi.com/integrators/timeline/v3/events/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"inputs": [
{
"eventTemplateId": "1001298",
"email": "[email protected]",
"tokens": {
"petName": "Art3mis",
"petAge": 3,
"petColor": "black"
},
"extraData": {
"questions": [
{
"question": "Who's a good girl?",
"answer": "Bark!"
},
{
"question": "Do you wanna go on a walk?",
"answer": "Woof!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Art3mis",
"headerLabel": "Art3mis dog",
"url": "https://my.petspot.com/pets/Art3mis",
"width": 600,
"height": 400
}
},
{
"eventTemplateId": "1001298",
"email": "[email protected]",
"tokens": {
"petName": "Pocket",
"petAge": 3,
"petColor": "yellow"
},
"extraData": {
"questions": [
{
"question": "Who's a good kitty?",
"answer": "Purr..."
},
{
"question": "Will you stop playing with that?",
"answer": "Meow!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Pocket",
"headerLabel": "Pocket Tiger",
"url": "https://my.petspot.com/pets/Pocket",
"width": 600,
"height": 400
}
}
]
}
EOF{
"results": [
{
"objectType": "contacts",
"id": "petspot:1001298:[email protected]",
"eventTemplateId": "1001298",
"email": "[email protected]",
"objectId": "28001",
"timestamp": "2020-01-30T18:10:17.057Z",
"tokens": {
"petName": "Art3mis",
"petColor": "black",
"petAge": "3"
},
"extraData": {
"questions": [
{
"question": "Who's a good girl?",
"answer": "Bark!"
},
{
"question": "Do you wanna go on a walk?",
"answer": "Woof!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Art3mis",
"headerLabel": "Art3mis dog",
"url": "https://my.petspot.com/pets/Art3mis",
"width": 600,
"height": 400
}
},
{
"objectType": "contacts",
"id": "petspot:1001298:[email protected]",
"eventTemplateId": "1001298",
"email": "[email protected]",
"objectId": "28651",
"timestamp": "2020-01-30T18:10:17.057Z",
"tokens": {
"petName": "Pocket",
"petColor": "yellow",
"petAge": "3"
},
"extraData": {
"questions": [
{
"question": "Who's a good kitty?",
"answer": "Purr..."
},
{
"question": "Will you stop playing with that?",
"answer": "Meow!"
}
]
},
"timelineIFrame": {
"linkLabel": "View Pocket",
"headerLabel": "Pocket Tiger",
"url": "https://my.petspot.com/pets/Pocket",
"width": 600,
"height": 400
}
}
],
"status": "COMPLETE",
"startedAt": "2020-01-30T18:10:16.478734Z",
"completedAt": "2020-01-30T18:10:17.793206Z"
}サポートされる製品
必須スコープ