APIs & Integrations

balabanov
Colaborador

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 Me gusta
3 Respuestas 3
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

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


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

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 Me gusta
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

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


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