Passer au contenu principal
PUT
/
crm
/
v4
/
objects
/
{fromObjectType}
/
{fromObjectId}
/
associations
/
default
/
{toObjectType}
/
{toObjectId}
Associer des fiches d'informations (par défaut)
curl --request PUT \
  --url https://api.hubapi.com/crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/default/{toObjectType}/{toObjectId} \
  --header 'Authorization: Bearer <token>'
{
  "completedAt": "2023-11-07T05:31:56Z",
  "results": [
    {
      "associationSpec": {
        "associationCategory": "HUBSPOT_DEFINED",
        "associationTypeId": 123
      },
      "from": {
        "id": "<string>"
      },
      "to": {
        "id": "<string>"
      }
    }
  ],
  "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"
}

Supported products

Autorisations

Authorization
string
header
requis

The access token received from the authorization server in the OAuth 2.0 flow.

Paramètres de chemin

fromObjectId
string
requis

L'ID de l'objet source dans l'association.

fromObjectType
string
requis

Type d'objet source dans l'association.

toObjectId
string
requis

L'ID de l'objet cible dans l'association.

toObjectType
string
requis

Type d'objet cible dans l'association.

Réponse

successful operation

La réponse renvoyée après l'exécution d'une opération de lot sur des associations.

completedAt
string<date-time>
requis

L'horodatage de la fin du processus de traitement par lots, au format ISO 8601.

results
object[]
requis
startedAt
string<date-time>
requis

L'horodatage du début de l'exécution du processus de traitement par lots, au format ISO 8601.

status
enum<string>
requis

Statut de la demande de traitement par lots : « EN ATTENTE », « TRAITEMENT », « ANNULÉ » ou « TERMINÉ ».

Options disponibles:
CANCELED,
COMPLETE,
PENDING,
PROCESSING
errors
object[]

Un objet contenant des liens pertinents relatifs à la demande de lot.

numErrors
integer<int32>

Le nombre d'erreurs rencontrées lors du traitement par lot.

requestedAt
string<date-time>

L'horodatage du lancement du processus de traitement par lots, au format ISO 8601.

Last modified on April 13, 2026