Zum Hauptinhalt springen
POST
/
crm-object-schemas
/
v3
/
schemas
cURL
curl --request POST \
  --url https://api.hubapi.com/crm-object-schemas/v3/schemas \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "my_object",
  "labels": {
    "singular": "My object",
    "plural": "My objects"
  },
  "primaryDisplayProperty": "my_object_property",
  "requiredProperties": [
    "my_object_property"
  ],
  "properties": [
    {
      "name": "my_object_property",
      "label": "My object property",
      "isPrimaryDisplayLabel": true
    }
  ],
  "associatedObjects": [
    "CONTACT"
  ],
  "metaType": "PORTAL_SPECIFIC"
}'
{
  "id": "123456",
  "createdAt": "2020-02-20T18:07:11.390Z",
  "updatedAt": "2020-02-20T18:09:07.555Z",
  "properties": [
    {
      "updatedAt": "2020-02-20T18:07:11.802Z",
      "createdAt": "2020-02-20T18:07:11.802Z",
      "name": "my_object_property",
      "label": "My object property",
      "type": "string",
      "fieldType": "text",
      "groupName": "my_object_information",
      "displayOrder": -1,
      "calculated": false,
      "externalOptions": false,
      "archived": false,
      "hasUniqueValue": false
    }
  ],
  "associations": [
    {
      "id": "123",
      "fromObjectTypeId": "2-123456",
      "toObjectTypeId": "0-1",
      "name": "my_object_to_contact"
    }
  ],
  "labels": {
    "singular": "My object",
    "plural": "My objects"
  },
  "requiredProperties": [
    "my_object_property"
  ],
  "searchableProperties": [
    "my_object_property"
  ],
  "primaryDisplayProperty": "my_object_property",
  "metaType": "PORTAL_SPECIFIC",
  "fullyQualifiedName": "p7878787_my_object\"",
  "name": "my_object"
}
サポートされる製品
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing HubEnterprise
Sales HubSales HubEnterprise
Service HubService HubEnterprise
Content HubContent HubEnterprise

Authorizations

Authorization
string
header
required

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

Body

application/json

Object schema definition, including properties and associations.

Defines a new object type, its properties, and associations.

requiredProperties
string[]
required

このタイプのオブジェクトを作成する際に「必須」となるプロパティーの名前。

name
string
required

このオブジェクトの重複しない名前。内部使用のみ。

associatedObjects
string[]
required

このオブジェクトタイプについて定義された関連付け。

properties
object[]
required

このオブジェクトタイプについて定義されたプロパティー。

labels
object
required

Singular and plural labels for the object. Used in CRM display.

Example:
{
"singular": "My object",
"plural": "My objects"
}
secondaryDisplayProperties
string[]

このオブジェクトのセカンダリープロパティーの名前。このオブジェクトタイプのHubSpotレコードページにセカンダリーとして表示されます。

searchableProperties
string[]

HubSpotの製品検索でこのオブジェクトタイプについてインデックスされるプロパティーの名前。

primaryDisplayProperty
string

このオブジェクトのプライマリープロパティーの名前。このオブジェクトタイプのHubSpotレコードページにプライマリーとして表示されます。

description
string

Response

successful operation

Defines an object schema, including its properties and associations.

associations
object[]
required

特定のオブジェクトタイプについて定義された関連付け。

labels
object
required

Singular and plural labels for the object. Used in CRM display.

Example:
{
"singular": "My object",
"plural": "My objects"
}
requiredProperties
string[]
required

このタイプのオブジェクトを作成する際に「必須」となるプロパティーの名前。

name
string
required

スキーマのオブジェクトタイプの重複しない名前。

id
string
required

このスキーマのオブジェクトタイプの固有ID。{meta-type}-{unique ID}として定義されます。

properties
object[]
required

このオブジェクトタイプについて定義されたプロパティー。

secondaryDisplayProperties
string[]

このオブジェクトのセカンダリープロパティーの名前。このオブジェクトタイプのHubSpotレコードページにセカンダリーとして表示されます。

createdByUserId
integer
objectTypeId
string
description
string
updatedByUserId
integer
fullyQualifiedName
string

ポータルIDやオブジェクト名を含む、オブジェクトの割り当てられた固有ID。

archived
boolean
createdAt
string<date-time>

オブジェクトスキーマが作成された日時。

searchableProperties
string[]

HubSpotの製品検索でこのオブジェクトタイプについてインデックスされるプロパティーの名前。

primaryDisplayProperty
string

このオブジェクトのプライマリープロパティーの名前。このオブジェクトタイプのHubSpotレコードページにプライマリーとして表示されます。

updatedAt
string<date-time>

オブジェクトスキーマが最後に更新された日時。