curl --request POST \
--url https://api.hubapi.com/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"from": {
"id": "53628"
},
"to": {
"id": "12726"
},
"type": "contact_to_company"
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"from": {
"id": "53628"
},
"to": {
"id": "12726"
},
"type": "contact_to_company"
}
],
"startedAt": "2023-11-07T05:31:56Z",
"status": "CANCELED",
"errors": [
{
"category": "<string>",
"context": {},
"errors": [
{
"message": "<string>",
"code": "<string>",
"context": "{missingScopes=[scope1, scope2]}",
"in": "<string>",
"subCategory": "<string>"
}
],
"links": {},
"message": "<string>",
"status": "<string>",
"id": "<string>",
"subCategory": {}
}
],
"links": {},
"numErrors": 123,
"requestedAt": "2023-11-07T05:31:56Z"
}Ce point de terminaison vous permet de créer plusieurs associations entre les types d’objets « from » et « to » spécifiés dans une seule requête par lots.
curl --request POST \
--url https://api.hubapi.com/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inputs": [
{
"from": {
"id": "53628"
},
"to": {
"id": "12726"
},
"type": "contact_to_company"
}
]
}
'{
"completedAt": "2023-11-07T05:31:56Z",
"results": [
{
"from": {
"id": "53628"
},
"to": {
"id": "12726"
},
"type": "contact_to_company"
}
],
"startedAt": "2023-11-07T05:31:56Z",
"status": "CANCELED",
"errors": [
{
"category": "<string>",
"context": {},
"errors": [
{
"message": "<string>",
"code": "<string>",
"context": "{missingScopes=[scope1, scope2]}",
"in": "<string>",
"subCategory": "<string>"
}
],
"links": {},
"message": "<string>",
"status": "<string>",
"id": "<string>",
"subCategory": {}
}
],
"links": {},
"numErrors": 123,
"requestedAt": "2023-11-07T05:31:56Z"
}Produits pris en charge
Portées requises
The access token received from the authorization server in the OAuth 2.0 flow.
Type d'objet source dans l'association.
Type d'objet cible dans l'association.
Show child attributes
successful operation
La date et l'heure de la fin de l'opération par lot.
Show child attributes
La date et l'heure du début de l'opération par lot.
Statut actuel de l'opération par lots, avec les valeurs possibles suivantes : EN ATTENTE, EN COURS DE TRAITEMENT, ANNULÉ, TERMINÉ.
CANCELED, COMPLETE, PENDING, PROCESSING Show child attributes
Une collection d'URL associées à l'opération par lots.
Show child attributes
Le nombre d'erreurs rencontrées pendant l'opération par lot.
La date et l'heure auxquelles l'opération par lot a été demandée.