APIs & Integrations

balabanov
Mitwirkender/Mitwirkende

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? 

0 Upvotes
3 Antworten
Jaycee_Lewis
Community-Manager/-in
Community-Manager/-in

Setting a hasUniqueValue flag for the line_item property fails

Hey, @balabanov 👋 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


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
balabanov
Mitwirkender/Mitwirkende

Setting a hasUniqueValue flag for the line_item property fails

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
}
0 Upvotes
Jaycee_Lewis
Community-Manager/-in
Community-Manager/-in

Setting a hasUniqueValue flag for the line_item property fails

Hey, @balabanov 👋 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


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !