# access denied when Upsert ecommerce settings

**URL:** <https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810>\
**Category:** APIs & Integrations\
**Created:** [June 17, 2019, 10:37am UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810 "2019-06-17T10:37:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Resanehlab](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/resanehlab/32/24246_2.png) [@Resanehlab](https://community.hubspot.com/u/Resanehlab)\
**Post date:** [June 17, 2019, 10:37am UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/1 "2019-06-17T10:37:13Z")

</div>

Hi

I’m trying to create Ecommerce settings for my app through the Api. I followed this page [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/methods/ecommerce/v2/upsert-settings). The problem is, when I call this method with my developer api key and app id it returns this error: “Api[name=integrations-sync, subPath=/extensions/sync/v1/settings] Failed to process your request. Error code was ‘400’. Error message was:\nThis hub does not have write access for objectType[PRODUCT]”.

What is wrong exactly and, what can I do with this?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 17, 2019, 4:30pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/2 "2019-06-17T16:30:07Z")

</div>

Welcome, @Resanehlab.

That error message suggests the wrong API key was used. Can you confirm the following:

1. The first _five_ characters in the [developer HAPIkey](https://developers.hubspot.com/docs/faq/developer-hapikeys) you used. (Please don’t share the full key.)
2. Your [app ID](https://developers.hubspot.com/docs/faq/how-do-i-find-the-app-id).

Could you also share an example settings payload you are attempting to upload?

---

<div class="post-metadata">

**Author:** ![Resanehlab](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/resanehlab/32/24246_2.png) [@Resanehlab](https://community.hubspot.com/u/Resanehlab)\
**Post date:** [June 18, 2019, 6:21am UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/3 "2019-06-18T06:21:39Z")

</div>

Thanks for quick response. I’m using the 8da76 for hapikey and 196352 as appId. Below is the body of my request for upserting the settings.

{  
“enabled”:true,  
“webhookUri”:null,  
“mappings”:{  
“CONTACT”:{  
“properties”:[  
{  
“externalPropertyName”:“DateOfBirth”,  
“hubspotPropertyName”:“date\_of\_birth”,  
“dataType”:“DATETIME”  
},  
{  
“externalPropertyName”:“Gender”,  
“hubspotPropertyName”:“gender”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“FirstName”,  
“hubspotPropertyName”:“firstname”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“LastName”,  
“hubspotPropertyName”:“lastname”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“Email”,  
“hubspotPropertyName”:“email”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“Phone”,  
“hubspotPropertyName”:“phone”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“Fax”,  
“hubspotPropertyName”:“fax”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“StreetAddress”,  
“hubspotPropertyName”:“address”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“City”,  
“hubspotPropertyName”:“city”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“StateProvince”,  
“hubspotPropertyName”:“state”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“ZipPostalCode”,  
“hubspotPropertyName”:“zip”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“Country”,  
“hubspotPropertyName”:“country”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“CreatedOnUtc”,  
“hubspotPropertyName”:“createdate”,  
“dataType”:“DATETIME”  
},  
{  
“externalPropertyName”:“Company”,  
“hubspotPropertyName”:“company”,  
“dataType”:“STRING”  
}  
]  
},  
“DEAL”:{  
“properties”:[  
{  
“externalPropertyName”:“purchase\_date”,  
“hubspotPropertyName”:“closedate”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“name”,  
“hubspotPropertyName”:“dealname”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“stage”,  
“hubspotPropertyName”:“dealstage”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“abandoned\_cart\_url”,  
“hubspotPropertyName”:“ip\_\_ecomm\_bride\_\_abandoned\_cart\_url”,  
“dataType”:“STRING”  
}  
]  
},  
“PRODUCT”:{  
“properties”:[  
{  
“externalPropertyName”:“product\_description”,  
“hubspotPropertyName”:“description”,  
“dataType”:“STRING”  
},  
{  
“externalPropertyName”:“price”,  
“hubspotPropertyName”:“price”,  
“dataType”:“NUMBER”  
},  
{  
“externalPropertyName”:“product\_name”,  
“hubspotPropertyName”:“name”,  
“dataType”:“STRING”  
}  
]  
},  
“LINE\_ITEM”:{  
“properties”:[  
{  
“externalPropertyName”:“tax\_amount”,  
“hubspotPropertyName”:“tax”,  
“dataType”:“NUMBER”  
},  
{  
“externalPropertyName”:“num\_items”,  
“hubspotPropertyName”:“quantity”,  
“dataType”:“NUMBER”  
},  
{  
“externalPropertyName”:“price”,  
“hubspotPropertyName”:“price”,  
“dataType”:“NUMBER”  
},  
{  
“externalPropertyName”:“discount\_amount”,  
“hubspotPropertyName”:“discount”,  
“dataType”:“NUMBER”  
}  
]  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 18, 2019, 12:12pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/4 "2019-06-18T12:12:47Z")

</div>

Hey, @Resanehlab.

Thanks for confirming.

It’s strange — the API key, app ID, and payload all check out, and I was able to successfully upload the settings for you. Can you see them with [this endpoint](https://developers.hubspot.com/docs/methods/ecommerce/v2/get-settings)?

---

<div class="post-metadata">

**Author:** ![Resanehlab](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/resanehlab/32/24246_2.png) [@Resanehlab](https://community.hubspot.com/u/Resanehlab)\
**Post date:** [June 18, 2019, 12:26pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/5 "2019-06-18T12:26:22Z")

</div>

Unfortunately, when I request to get settings, the 404 response is returned.

{  
“status”: “error”,  
“message”: “No settings found - Have you defined any with [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/methods/ecommerce/v2/upsert-settings) ?”,  
“correlationId”: “778931aa-a9fa-49d6-9261-df0b4a99ad51”,  
“requestId”: “2910e4f1a836dbd4b9e369533243f43a”  
}

It’s so strange to me also. I’ve been working on it in the past three days and, really can’t understand what’s going on.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 18, 2019, 12:37pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/6 "2019-06-18T12:37:37Z")

</div>

Hey, @Resanehlab.

Interesting… Are you making these calls in your app or a REST client?

I’m using [Postman](https://www.getpostman.com/) and the following request URL is working for me (I’ve removed most of your developer HAPIkey):

**GET** `https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey=8da76...f4ea&appId=196352`

The only header I’m using is `Content Type: application/json`.

Would you mind running the same test?

---

<div class="post-metadata">

**Author:** ![Resanehlab](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/resanehlab/32/24246_2.png) [@Resanehlab](https://community.hubspot.com/u/Resanehlab)\
**Post date:** [June 18, 2019, 12:54pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/7 "2019-06-18T12:54:43Z")

</div>

Finally, my problem solved. What a funny and ridiculous mistake was happening. I’m using Postman too. When I copied your request URL to the postman, it worked and, I realized that instead of “appId” parameter, I used the “appid” term. All of these problems happened because of the case-sensitive matter. I really appreciate your help. You saved my life. Thanks for your fantastic support.

Have a good day.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 18, 2019, 12:57pm UTC](https://community.hubspot.com/t/access-denied-when-upsert-ecommerce-settings/14810/8 "2019-06-18T12:57:55Z")

</div>

Hey, @Resanehlab.

I’m so glad to hear that! Haha, yes, our query parameters are case sensitive.

Happy to help. Have a great rest of your week!
