APIs & Integrations

lmartincik
Mitglied

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

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?

1 Antwort
himanshurauthan
Vordenker/-in | Elite Partner
Vordenker/-in | Elite Partner

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

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
0 Upvotes