Setting a hasUniqueValue flag for the line_item property fails

Hi!

I’m trying to set the hasUniqueValue flag for the line item property, and the return is 200 OK, but the value is not saved.

Here’s a sample request:

curl --request PATCH \
 --url https://api.hubapi.com/crm/v3/properties/line_item/ws_c7_ext_id \
 --header 'authorization: Bearer xxxxxx' \
 --header 'content-type: application/json' \
 --data '{
	"hasUniqueValue": true
}'

And the response is false:

{
	"updatedAt": "2023-03-14T11:21:23.492Z",
	"createdAt": "2023-01-31T17:09:27.261Z",
	"name": "ws_c7_ext_id",
	"label": "WS C7 External ID",
	"type": "string",
	"fieldType": "text",
	"description": "",
	"groupName": "",
	"options": [],
	"updatedUserId": "xxxxxx",
	"displayOrder": 2,
	"calculated": false,
	"externalOptions": false,
	"archived": false,
	"hasUniqueValue": false,
	"hidden": false,
	"modificationMetadata": {
		"archivable": true,
		"readOnlyDefinition": false,
		"readOnlyValue": false
	},
	"formField": true
}

I failed to find any documented limitations on these properties, maybe someone has encountered this issue before me?

Hey, @balabanov :waving_hand: To confirm, this is a custom property, you’ve created? If so, can you make a call to the properties API and conform the field-type, please? My gut feeling (non-scientific opinion) is there is limitation on not adding this to existing properties. Meaning, it can only be set when the property is created. If so, I’ll provide a suggestion to have the documentation updated.

Best,

Jaycee

hey @Jaycee_Lewis
You’re correct, it’s a custom property. Here goes the output:

{
 "updatedAt": "2023-03-14T11:21:48.720Z",
 "createdAt": "2023-01-31T17:09:27.261Z",
 "name": "ws_c7_ext_id",
 "label": "WS C7 External ID",
 "type": "string",
 "fieldType": "text",
 "description": "",
 "groupName": "xxxxxx",
 "options": [],
 "updatedUserId": "xxxxxx",
 "displayOrder": 2,
 "calculated": false,
 "externalOptions": false,
 "archived": false,
 "hasUniqueValue": false,
 "hidden": false,
 "modificationMetadata": {
 "archivable": true,
 "readOnlyDefinition": false,
 "readOnlyValue": false
 },
 "formField": true
}

Hey, @balabanov :waving_hand: Based on a product update from last summer (I am still trying to find the link to add here) this can only be added to a property when it is created. My other mission here is to get the documentation updated to include this detail.

Best,

Jaycee