E-commerce scope doesn't work for POST calls

Hello, I’m switching to the Private App and currently testing my API calls in a test account. Everything works perfectly except for the products POST method.

“e-commerce” scope is enabled, the endpoint i’m using is “/crm/v3/objects/products” (which works for the GET method) but still I get a missing scopes error.

Did I miss something?

Thank you!

Hi, @05883 :waving_hand: Happy to dig a bit for us. Out of curiosity, have you tried the legacy endpoint for this one? Create a product

POST /crm-objects/v1/objects/products

I happened to have an example set up in Postman and received a successful response:

https://api.hubapi.com/crm-objects/v1/objects/products

{
 "portalId": 22245342,
 "objectType": "PRODUCT",
 "objectId": 1680544781,
 "properties": {
 "hs_lastmodifieddate": {
 "versions": [
 {
 "name": "hs_lastmodifieddate",
 "value": "1669761281567",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "1669761281567",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 },
 "price": {
 "versions": [
 {
 "name": "price",
 "value": "60000",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "60000",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 },
 "hs_object_id": {
 "versions": [
 {
 "name": "hs_object_id",
 "value": "1680544781",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "1680544781",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 },
 "name": {
 "versions": [
 {
 "name": "name",
 "value": "Rocket for Two Cats",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "Rocket for Two Cats",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 },
 "createdate": {
 "versions": [
 {
 "name": "createdate",
 "value": "1669761281567",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "1669761281567",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 },
 "description": {
 "versions": [
 {
 "name": "description",
 "value": "Cats in space. What could go wrong?!",
 "timestamp": 1669761281567,
 "sourceId": "962509",
 "source": "INTEGRATION",
 "sourceVid": [],
 "requestId": "a1d11c9b-b377-43b8-8968-d7730a936808"
 }
 ],
 "value": "Cats in space. What could go wrong?!",
 "timestamp": 1669761281567,
 "source": "INTEGRATION",
 "sourceId": "962509",
 "updatedByUserId": null
 }
 },
 "isDeleted": false
}

I’ll see what’s up with the v3 version of this Product API endpoint and post back here.

Best,

Jaycee

Hi! I tried this one but I get a 500 error

endpoint: https://api.hubapi.com/crm-objects/v1/objects/products

authorization: type Bearer token

body:

 [
 {
 "name":"description",
 "value":"this is a test"
 },
 {
 "name":"name",
 "value":"test"
 },
 {
 "name":"price",
 "value":"100"
 }
 ]

response:

<html>

<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<title>Error 500 Request failed.</title>
</head>

<body>
	<h2>HTTP ERROR 500</h2>
	<p>Reason:
		<pre> Request failed.</pre>
	</p>
</body>

</html>

I’ll wait for further news. Thank you so much!