APIs & Integrations

ecray
Member | Elite Partner
Member | Elite Partner

enumeration field type as required field for custom object

SOLVE

Hi everyone, 

 

I am creating a custom object using HubSpot's custom object API. I have created a few of these at this point but this object in particular needs the required field to be an enumartion property type. 

 

I set the required field, and the enumation option, but received the following response after making my test call. 

 

HTTP 400

{
  "status": "error",
  "message": "Unexpected property type 'enumeration', expected one of: [string, object_coordinates, json]",
  "correlationId": "17b6839b-48b6-419e-80a8-6738896c5479",
  "category": "VALIDATION_ERROR"
}

Here are a few screenshots: 

 

screenshot 1.jpg

 

screenshot 2.jpg

 

 

Previously I have only used 'string' property type for required fields and have not seen this response before. Does anyone know if you can use 'enumeration' as a property type for a required field when creating the object schema? I know this is something you can set up afterwards but this is our sole required field. 

 

Thank you!

0 Upvotes
1 Accepted solution
lynton
Solution
Contributor | Elite Partner
Contributor | Elite Partner

enumeration field type as required field for custom object

SOLVE

Make sure your create property api payload includes label, name, type, fieldType, and options. Share the json payload that's giving you trouble if the issue persists. 

View solution in original post

3 Replies 3
lynton
Solution
Contributor | Elite Partner
Contributor | Elite Partner

enumeration field type as required field for custom object

SOLVE

Make sure your create property api payload includes label, name, type, fieldType, and options. Share the json payload that's giving you trouble if the issue persists. 

webdew
Guide | Diamond Partner
Guide | Diamond Partner

enumeration field type as required field for custom object

SOLVE

Hi @ecray ,

You have to pass valid data in this then it will be work fine. you have defined enumeration data type, so please check property values.

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

enumeration field type as required field for custom object

SOLVE

@ecray 

Would you be able to copy the json body sent and add it here?

Folks like@lynton may be able to help 🙂

0 Upvotes