メインコンテンツへスキップ
PUT
/
crm
/
v4
/
objects
/
{fromObjectType}
/
{fromObjectId}
/
associations
/
default
/
{toObjectType}
/
{toObjectId}
デフォルトを作成
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"
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール

認証

Authorization
string
header
必須

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

パスパラメータ

fromObjectId
string
必須

関連付けのソースオブジェクトのID。

fromObjectType
string
必須

関連付けのソースオブジェクトのタイプ。

toObjectId
string
必須

関連付けのターゲットオブジェクトのID。

toObjectType
string
必須

関連付けのターゲットオブジェクトのタイプ。

レスポンス

successful operation

completedAt
string<date-time>
必須

バッチ処理が完了した時刻のタイムスタンプ(ISO 8601形式)。

results
object[]
必須
startedAt
string<date-time>
必須

バッチ処理の実行が開始された時刻のタイムスタンプ(ISO 8601形式)。

status
enum<string>
必須

バッチ処理リクエストのステータス:「PENDING」、「PROCESSING」、「CANCELLED」、または「COMPLETE」。

利用可能なオプション:
CANCELED,
COMPLETE,
PENDING,
PROCESSING
errors
object[]

バッチリクエストに関連する、関連性の高いリンクを含むオブジェクト。

numErrors
integer<int32>

バッチ処理中に発生したエラーの数。

requestedAt
string<date-time>

バッチ処理が開始された時刻のタイムスタンプ(ISO 8601形式)。

Last modified on December 9, 2025