Creating new Contact Property fieldType="OWNER" via API and UI is behaving differently

Highlighted
New Member

I've been able to create a Contact Property via UI called `referred_by` of type="enumeration" and fieldType="OWNER":

 

{"name"=>"referred_by", "label"=>"Referred by", "description"=>"Option to refer someone for a role", "groupName"=>"team_member", "type"=>"enumeration", "fieldType"=>"OWNER", "currencyPropertyName"=>nil, "textDisplayHint"=>nil, "optionsAreMutable"=>nil, "isCustomizedDefault"=>false, "searchTextAnalysisMode"=>nil, "optionSortStrategy"=>nil, "updatedUserId"=>X, "hidden"=>false, "options"=>[], "createdAt"=>1576162749958, "deleted"=>false, "formField"=>false, "displayOrder"=>-1, "readOnlyValue"=>false, "readOnlyDefinition"=>false, "mutableDefinitionNotDeletable"=>false, "favorited"=>false, "favoritedOrder"=>-1, "calculated"=>false, "externalOptions"=>true, "displayMode"=>"current_value", "showCurrencySymbol"=>false, "hubspotDefined"=>nil, "updatedAt"=>1576234299705, "referencedObjectType"=>"OWNER", "hasUniqueValue"=>false, "createdUserId"=>X, "searchableInGlobalSearch"=>false, "numberDisplayHint"=>"formatted"}

but when I'm trying to recreate the same field (on different account - staging) with the same parameters I get the error:

 

Response: 400 {"status":"error","message":"Property 'referred_by' has no options but options are required!","correlationId":"1e9168bd-5df3-43e4-a082-3838c038c81d","propertiesErrorCode":"OPTIONS_REQUIRED","requestId":"dfbed1fe-c3f6-42ea-a3cf-9b222313cd41"}

Is it possible that there's inconsistency in the UI code and API code?

Reply
0 Upvotes
1 Reply 1
Highlighted
Regular Advisor | Gold Partner

Hello @lmartincik 

 

It seems that in the API request the paramter to set field enumeration options are not getting set. Can you you please share your script of creating the new properties ?

 

Thanks

Digital Marketing & Inbound Expert In Growth Hacking Technology
Reply
0 Upvotes