APIs & Integrations

PPSL
Participant

Custom Object Endpoints, not able to get custom object schema.

SOLVE

Hi,

 

I have created a custom object as "My_Object", But while executing the schema endpoint to get all the field schema, I am not getting the response, It should be return from field schema.

 

API - https://api.hubapi.com/crm/v3/schemas/My_Object

 

while executing the above api getting the below response.

 

{
    "status""error",
    "message""Unable to infer object type from: My Object",
    "correlationId""353df7e7-a271-485a-8be2-6b3bbfaee435"
}
the same API is working with single word as an example custom object "worker".
 
{
    "labels": {
        "singular""worker",
        "plural""workers"
    },
    "requiredProperties": [
        "worker_id"
    ],
 
It seems like we can create a custom object with "underscore", but at the time of checking the schema part custom object is not working with "underscore".
 
Can anyone help me on this.
1 Accepted solution
ChrisoKlepke
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

Custom Object Endpoints, not able to get custom object schema.

SOLVE

Hey @PPSL , 

 

thank you for reaching out to the community. 

 

When you call this endpoint here, you're getting all schemas.

crm/v3/schemas

There you can also find key for name. This is what you can use to get only the specific schema. 

 

However, it is even better or more reliable to use objectType which looks like an ID similar to this 2-106804705. You can find that also in the first endpoint I mentioned, or just navigate to your object within the HubSpot UI and take a look at the URL.

 

With this ID you can always use the respective endpoints like this:

crm/v3/schemas/2-106804705

 

If you found this post helpful, consider helping others in the community to find answers faster by marking this as a solution. I'd really appreciate it. 

 

Cheers, 

Chriso 

View solution in original post

1 Reply 1
ChrisoKlepke
Solution
Key Advisor | Elite Partner
Key Advisor | Elite Partner

Custom Object Endpoints, not able to get custom object schema.

SOLVE

Hey @PPSL , 

 

thank you for reaching out to the community. 

 

When you call this endpoint here, you're getting all schemas.

crm/v3/schemas

There you can also find key for name. This is what you can use to get only the specific schema. 

 

However, it is even better or more reliable to use objectType which looks like an ID similar to this 2-106804705. You can find that also in the first endpoint I mentioned, or just navigate to your object within the HubSpot UI and take a look at the URL.

 

With this ID you can always use the respective endpoints like this:

crm/v3/schemas/2-106804705

 

If you found this post helpful, consider helping others in the community to find answers faster by marking this as a solution. I'd really appreciate it. 

 

Cheers, 

Chriso