APIs & Integrations

dino56
Participant

Updating schema properties

SOLVE

Hey, I'm trying to update an existing schema for my custom objects.
I can't find any examples or documentation about it, is it even possible?

I was able to update the labels and some other properties like searchable and required properties.

This is what I see at the type definition for the payload of this operation:

import { ObjectTypeDefinitionLabels } from './ObjectTypeDefinitionLabels';
export declare class ObjectTypeDefinitionPatch {
    'labels'?: ObjectTypeDefinitionLabels;
    'requiredProperties'?: Array<string>;
    'searchableProperties'?: Array<string>;
    'primaryDisplayProperty'?: string;
    'secondaryDisplayProperties'?: Array<string>;
    'restorable'?: boolean;
    static readonly discriminator: string | undefined;
    static readonly attributeTypeMap: Array<{
        name: string;
        baseName: string;
        type: string;
        format: string;
    }>;
    static getAttributeTypeMap(): {
        name: string;
        baseName: string;
        type: string;
        format: string;
    }[];
    constructor();
}

 

0 Upvotes
1 Accepted solution
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Updating schema properties

SOLVE

Hey,

My bad I read your post too quickly !
Indeed you won't be able to edit your object properties using this endpoint.

Try using this one though : CRM Properties API.
If you have several properties to update, use the batch API call to make several edits in one call.

Hope this helps 🙂

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

View solution in original post

0 Upvotes
4 Replies 4
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Updating schema properties

SOLVE

Hi @dino56,

 

On this documentation you can find code samples in various languages to make a PATCH request to the custom objects schema enpoint.

LMeert_0-1649169998891.png

 

Hope this helps ! If it does, please consider marking this as a solution !

 

Have a good day,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
dino56
Participant

Updating schema properties

SOLVE

Hey, thanks for the answer but as I mentioned I'm trying to update the properties in my schema.
I've read that documentation fully and I don't see anything  related to my question.
Can you be more specific? maybe I'm blind and I'm not seeing it.
In that screenshot  you shared there's nothing showing how to update the  properties. Everything in the  schema can be  updated except the  properties.

0 Upvotes
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Updating schema properties

SOLVE

Hey,

My bad I read your post too quickly !
Indeed you won't be able to edit your object properties using this endpoint.

Try using this one though : CRM Properties API.
If you have several properties to update, use the batch API call to make several edits in one call.

Hope this helps 🙂

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
mathew_murphy
Participant

Updating schema properties

SOLVE

Try using this one though : CRM Properties API.
If you have several properties to update, use the batch API call to make several edits in one call.

Looking at the documentation, there doesn't seem to be a batch API call to make several updates in one call.

 

You can create, read or achive multiple properties, but you can't update multiple properties. You can only update via PATCH a single property at a time.

0 Upvotes