curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"inputs": [
{
"idProperty": "<string>",
"objectWriteTraceId": "<string>",
"id": "<string>",
"properties": "{\"lastname\":\"S.\",\"firstname\":\"Mark\"}"
}
]
}'
{
"completedAt": "2023-11-07T05:31:56Z",
"numErrors": 123,
"requestedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"links": {},
"results": [
{
"createdAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"new": true,
"propertiesWithHistory": {},
"id": "<string>",
"objectWriteTraceId": "<string>",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"errors": [
{
"subCategory": {},
"context": {},
"links": {},
"id": "<string>",
"category": "<string>",
"message": "<string>",
"errors": [
{
"subCategory": "<string>",
"code": "<string>",
"in": "<string>",
"context": "{\"missingScopes\":[\"scope1\",\"scope2\"]}",
"message": "<string>"
}
],
"status": "<string>"
}
],
"status": "PENDING"
}
コンタクトを一括で更新/挿入します。「inputs」配列には各レコードのプロパティー値を定義する「properties」オブジェクトを含めることができます。
curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"inputs": [
{
"idProperty": "<string>",
"objectWriteTraceId": "<string>",
"id": "<string>",
"properties": "{\"lastname\":\"S.\",\"firstname\":\"Mark\"}"
}
]
}'
{
"completedAt": "2023-11-07T05:31:56Z",
"numErrors": 123,
"requestedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"links": {},
"results": [
{
"createdAt": "2023-11-07T05:31:56Z",
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"new": true,
"propertiesWithHistory": {},
"id": "<string>",
"objectWriteTraceId": "<string>",
"properties": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"errors": [
{
"subCategory": {},
"context": {},
"links": {},
"id": "<string>",
"category": "<string>",
"message": "<string>",
"errors": [
{
"subCategory": "<string>",
"code": "<string>",
"in": "<string>",
"context": "{\"missingScopes\":[\"scope1\",\"scope2\"]}",
"message": "<string>"
}
],
"status": "<string>"
}
],
"status": "PENDING"
}
crm.objects.contacts.write
The access token received from the authorization server in the OAuth 2.0 flow.
successful operation
Represents the result of a batch upsert operation, including the operation’s status, timestamps, and a list of successfully created or updated objects.