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"
}Créer par lots plusieurs instances d’événements de chronologie à partir d’un modèle d’événement. Une fois créés, ces événements sont immuables dans la chronologie de l’objet et ne peuvent pas être modifiés. Si le modèle d’événement a été configuré pour mettre à jour les propriétés de l’objet via « objectPropertyName », cet appel tentera également de mettre à jour ces propriétés ou de les ajouter si elles n’existent pas.
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"
}Produits pris en charge
Portées requises
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.
Une collection d'événements de la chronologie que nous voulons créer.
Afficher attributs enfants