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
L'ID du modèle d'événement.
Le domaine de l'événement (souvent associé à utk).
L'adresse e-mail utilisée pour des événements spécifiques aux contacts. Cela peut être utilisé pour identifier des contacts existants, en créer de nouveaux ou changer l'e-mail d'un contact existant (si associé à objectId).
Données supplémentaires spécifiques à l'événement pouvant être interprétées par le markdown du modèle.
Identifiant pour l'événement. Ceci est facultatif, et nous vous recommandons de ne pas l'indiquer. Nous en créerons un pour vous si vous l'omettez. Vous pouvez également utiliser {{uuid}} n'importe où dans l'ID pour générer une chaîne unique, garantissant l'unicité.
L'identifiant de l'objet CRM. Cela est requis pour chaque événement autre que les contacts (où utk ou e-mail peuvent être utilisés).
Afficher attributs enfants
Le libellé de la fenêtre modale qui affiche le contenu de l'iframe.
La hauteur de la fenêtre modale en pixels.
Le texte affichant le lien qui affichera l'iframe.
L'URI du contenu de l'iframe.
La largeur de la fenêtre modale en pixels.
{
"linkLabel": "View Art3mis",
"headerLabel": "Art3mis dog",
"url": "https://my.petspot.com/pets/Art3mis",
"width": 600,
"height": 400
}L'heure à laquelle l'événement s'est produit. Si non spécifiée, l'heure actuelle sera supposée. Cela est utilisé pour déterminer où un événement sera affiché sur la chronologie de l'objet CRM.
Utilisez le paramètre utk pour associer un événement à un contact par usertoken. Ceci est recommandé si vous ne connaissez pas l'e-mail d'un utilisateur, mais que vous avez un jeton utilisateur identifiant dans vos cookies.