Getting error while creating property for products

Hello,

We have purchased sales and enterprise hubs. We are trying to create the properties for product object through API but getting error:

You do not have permissions to edit object type ObjectTypeId{legacyObjectType=PRODUCT} in portal <portalId> (requires one of [inbounddb-product-library-write])
I have subscribed to all the scopes. What would be issue? How can I resolved this?

Thanks,
Srushti Shah

Hi @srushti18shah

curl --request POST \
 --url https://api.hubapi.com/crm/v3/properties/PRODUCTS \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 --header 'content-type: application/json' \
 --data '{
 "hidden": false,
 "displayOrder": 2,
 "description": "Property_Description",
 "label": "My Product Property",
 "type": "enumeration",
 "groupName": "productinformation",
 "name": "Property_Name",
 "fieldType": "text",
 "formField": true,
 "calculationFormula": "string",
 "hasUniqueValue": false,
 "externalOptions": true
}'

Please add the following scope and retry again.
STANDARD SCOPE(S) :e-commerce

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

Hey, @srushti18shah :waving_hand: Can you try using the request body example (I changed the group to “productinformation”) from the documentation, and create a new Private App with only the ecommerce scope, please? And share the request here? I did this using Postman just now and was able to create a new product property with no issues:

Request

POST https://api.hubapi.com/crm/v3/properties/product 
{
 "groupName": "productinformation", 
 "name":"favorite_cat",
 "label": "Favorite Cat",
 "type": "string",
 "fieldType": "text"
}

Response

{
 "updatedAt": "2024-05-14T19:35:06.843Z",
 "createdAt": "2024-05-14T19:35:06.843Z",
 "name": "favorite_cat",
 "label": "Favorite Cat",
 "type": "string",
 "fieldType": "text",
 "description": "",
 "groupName": "productinformation",
 "options": [],
 "createdUserId": "10233975",
 "updatedUserId": "10233975",
 "displayOrder": -1,
 "calculated": false,
 "externalOptions": false,
 "archived": false,
 "hasUniqueValue": false,
 "hidden": false,
 "modificationMetadata": {
 "archivable": true,
 "readOnlyDefinition": false,
 "readOnlyValue": false
 },
 "formField": false,
 "dataSensitivity": "non_sensitive"
}

The Private App scopes I used

I hope this helps get you moving forward! — Jaycee