Zum Hauptinhalt springen
PUT
/
crm
/
v4
/
objects
/
{objectType}
/
{objectId}
/
associations
/
{toObjectType}
/
{toObjectId}
Datensätze zuordnen (mit Label)
curl --request PUT \
  --url https://api.hubapi.com/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 123
  }
]
'
{
  "fromObjectId": "<string>",
  "fromObjectTypeId": "<string>",
  "labels": [
    "<string>"
  ],
  "toObjectId": "<string>",
  "toObjectTypeId": "<string>"
}

Unterstützte Produkte

Erfordert eines der folgenden Produkte oder höher.
Marketing HubMarketing Hub -Kostenlos
Sales HubSales Hub -Kostenlos
Service HubService Hub -Kostenlos
Content HubContent Hub -Kostenlos

Autorisierungen

Authorization
string
header
erforderlich

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

Pfadparameter

objectId
string
erforderlich

Die eindeutige ID für das Quellobjekt in der zu erstellenden Zuordnung.

objectType
string
erforderlich

Gibt den Typ des Quellobjekts in der zu erstellenden Zuordnung an.

toObjectId
string
erforderlich

Die eindeutige ID für das Zielobjekt in der zu erstellenden Zuordnung.

toObjectType
string
erforderlich

Gibt den Typ des Zielobjekts in der zu erstellenden Zuordnung an.

Body

application/json
associationCategory
enum<string>
erforderlich

Die Kategorie der Zurodnung, z. B. „HUBSPOT_DEFINED“.

Verfügbare Optionen:
HUBSPOT_DEFINED,
INTEGRATOR_DEFINED,
USER_DEFINED,
WORK
associationTypeId
integer<int32>
erforderlich

Die ID, die den spezifischen Typ der Zuordnung darstellt.

Antwort

successful operation

Die Beziehungsdeskriptoren, die zwischen zwei Objekttypen anwendbar sind.

fromObjectId
string
erforderlich

Die ID des Quellobjekts in der Zuordnung.

fromObjectTypeId
string
erforderlich

Die Typ-ID des Quellobjekts in der Zuordnung.

labels
string[]
erforderlich

Ein Array von Labeln, die der Beziehung zwischen den Objekten zugeordnet sind.

toObjectId
string
erforderlich

Die ID des Zielobjekts in der Zuordnung.

toObjectTypeId
string
erforderlich

Die Typ-ID des Zielobjekts in der Zuordnung.

Last modified on March 24, 2026