@Bryantworks How does one set the key? I am struggling with this as well. Setting up a “users” custom object. Was trying to use email as the sole required property and the primary display property, but it seems to let me put in new instances with a change in the case in an email address. I verified contatacts don’t allow that, so how does one set a primary key that increments, if email address doesnt work?
Did you set shop_name to require a unique value when you created it? That would stop you from being able to create multiple records where shop_name is the same.
If you’re still using the API to create, hasUniqueValue would need to be set to true:
# DEPRECATION WARNING: HubSpot API (HAPI) keys are being deprecated, and will be removed from use on 30 November 2022.
curl --request POST \
--url ‘https://api.hubapi.com/crm/v3/schemas?hapikey=[API KEY HERE]’ \
--header ‘content-type: application/json’ \
--data ‘{
“labels”: {
“singular”: “Sample Object”,
“plural”: “Sample Objects”
},
“requiredProperties”: [
“required_object_property”
],
“properties”: [
{
“name”: “required_object_property”,
“label”: “Required object property”,
“isPrimaryDisplayLabel”: true, “hasUniqueValue”: true
}
],
“associatedObjects”: [
“CONTACT”
],
“name”: “my_object”,
“primaryDisplayProperty”: “my_object_property”,
“metaType”: “PORTAL_SPECIFIC”
}’