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"
}Erstellen Sie batchweise mehrere Instanzen von Chronik-Events anhand einer Event-Vorlage. Nach der Erstellung sind diese Events in der Objektchronik unveränderlich und können nicht mehr geändert werden. Wenn die Konfiguration der Event-Vorlage eine Aktualisierung von Objekteigenschaften über „objectPropertyName“ vorsieht, werden mit diesem Aufruf auch die entsprechenden Eigenschaften aktualisiert oder hinzugefügt, sofern noch nicht vorhanden.
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"
}Unterstützte Produkte
Erforderliche Bereiche
The access token received from the authorization server in the OAuth 2.0 flow.
The timeline event definition.
Used to create timeline events in batches.
Eine Sammlung mit Chronik-Events, die erstellt werden soll.
Anzeigen untergeordnete attribute