<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bad Request creating Ecommerce property mappings in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251112#M22150</link>
    <description>&lt;P&gt;Thank you for responding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to verify those setting,&amp;nbsp; I removed the&amp;nbsp;imageUrl that you indicated was an issue and tried again but received the same 400 Bad Request.&amp;nbsp; We do have OAuth setup and use it for all our other API calls, should I even be using this&amp;nbsp;extensions/ecomm/v1/settings endpoint.&amp;nbsp; If I can't get past the 400 Bad Request how would I make changes to the mappings?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 16:25:04 GMT</pubDate>
    <dc:creator>aemmi</dc:creator>
    <dc:date>2019-02-06T16:25:04Z</dc:date>
    <item>
      <title>Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/250645#M22110</link>
      <description>&lt;P&gt;When I submit a PUT request to set up property mapping I receive a 400 Bad Request.&amp;nbsp; I'm using this url&amp;nbsp;&lt;A href="https://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=56af5b68......&amp;amp;appId=397" target="_blank"&gt;https://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=56af5b68......&amp;amp;appId=397&lt;/A&gt;... Whatt is wrong with this request the body is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "enabled": true,
  "importOnInstall": true,
  "productSyncSettings": {
    "properties": [
      {
        "propertyName": "product_name",
        "dataType": "STRING",
        "targetHubspotProperty": "productname"
      },
      {
        "propertyName": "imageUrl",
        "dataType": "AVATAR_IMAGE",
        "targetHubSpotProperty": "ip__ecomm_bridge__image_url"
      }
    ]
  },
  "dealSyncSettings": {
    "properties": [
      {
        "propertyName": "order_total",
        "dataType": "NUMBER",
        "targetHubspotProperty": "amount"
      },
      {
        "propertyName": "customer_id",
        "dataType": "STRING",
        "targetHubspotProperty": "hs_assoc__contact_ids"
      },
      {
        "propertyName": "purchase_date",
        "dataType": "DATETIME",
        "targetHubspotProperty": "closedate"
      },
      {
        "propertyName": "stage",
        "dataType": "STRING",
        "targetHubspotProperty": "dealstage"
      }
    ]
  },
  "lineItemSyncSettings": {
    "properties": [
      {
        "propertyName": "order_id",
        "dataType": "STRING",
        "targetHubspotProperty": "hs_assoc__deal_id"
      },
      {
        "propertyName": "product_id",
        "dataType": "STRING",
        "targetHubspotProperty": "hs_assoc__product_id"
      }
    ]
  },
  "contactSyncSettings": {
    "properties": [
      {
        "propertyName": "given_name",
        "dataType": "STRING",
        "targetHubspotProperty": "firstname"
      },
      {
        "propertyName": "family_name",
        "dataType": "STRING",
        "targetHubspotProperty": "lastname"
      },
      {
        "propertyName": "email",
        "dataType": "STRING",
        "targetHubspotProperty": "email"
      }
    ]
  }
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Feb 2019 00:19:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/250645#M22110</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-05T00:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251092#M22146</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80307"&gt;@aemmi&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for the inconvenience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;CODE&gt;400&lt;/CODE&gt; error code I received cited something wrong with the:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
        "propertyName": "imageUrl",
        "dataType": "AVATAR_IMAGE",
        "targetHubSpotProperty": "ip__ecomm_bridge__image_url"
}&lt;/PRE&gt;
&lt;P&gt;mapping, but I couldn't find any issues with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ended up building the settings one group at a time and they should now be uploaded successfully. Can you confirm with &lt;A href="https://developers.hubspot.com/docs/methods/ecommerce/get-settings" target="_self"&gt;this endpoint&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:45:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251092#M22146</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-02-06T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251112#M22150</link>
      <description>&lt;P&gt;Thank you for responding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to verify those setting,&amp;nbsp; I removed the&amp;nbsp;imageUrl that you indicated was an issue and tried again but received the same 400 Bad Request.&amp;nbsp; We do have OAuth setup and use it for all our other API calls, should I even be using this&amp;nbsp;extensions/ecomm/v1/settings endpoint.&amp;nbsp; If I can't get past the 400 Bad Request how would I make changes to the mappings?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 16:25:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251112#M22150</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-06T16:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251362#M22170</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80307"&gt;@aemmi&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to hear that you encountered another&amp;nbsp;&lt;CODE&gt;400&lt;/CODE&gt; error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure exactly why you're seeing that error, as I was able to successfully update your mappings and add this dummy mapping:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{&lt;BR /&gt;  "propertyName": "fooBarUrl",
  "dataType": "AVATAR_IMAGE",
  "targetHubspotProperty": "ip__ecomm_bridge__image_url"
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I have since removed this mapping, but could you share the full settings you are trying to upsert (assuming they are different than your initial post)?&lt;BR /&gt;&lt;BR /&gt;Even though you use OAuth for all your other API requests, upserting settings must be done with your developer API key, per &lt;A href="https://developers.hubspot.com/docs/methods/ecommerce/get-settings" target="_self"&gt;this documentation&lt;/A&gt;. This is because you editing the settings of your&amp;nbsp;&lt;EM&gt;app&lt;/EM&gt; and not data in an account which has installed your app.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:04:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251362#M22170</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-02-07T16:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251365#M22171</link>
      <description>&lt;P&gt;Issac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the update, other than this&amp;nbsp;api.hubapi.com/extensions/ecomm/v1/settings how else can I check the setting or update them.&amp;nbsp; Is this only done through the API?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:03:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251365#M22171</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-07T16:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251368#M22173</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80307"&gt;@aemmi&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry we were typing at the same time!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, those settings can only be retrieved and modified via the API&amp;nbsp;— at this time, there is no UI for Ecommerce Bridge mappings.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:06:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251368#M22173</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-02-07T16:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251369#M22174</link>
      <description>&lt;P&gt;Thank You I'm have trouble on my end using https so I have been using http, could this be my issue?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:10:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251369#M22174</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-07T16:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251383#M22176</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80307"&gt;@aemmi&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That could be part of the issue, however I was just able to add and remove another dummy contact property mapping using&amp;nbsp;&lt;CODE&gt;&lt;A href="http://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=your_developer_api_key&amp;amp;appId=your_app_id" target="_blank"&gt;http://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=your_developer_api_key&amp;amp;appId=your_app_id&lt;/A&gt;&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you share the full set of mappings you're trying to upsert, I'd like to try again myself.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:29:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251383#M22176</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-02-07T16:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251454#M22191</link>
      <description>&lt;P&gt;Issac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I know what was causing my Bad Request.&amp;nbsp; In my headers I had a nullvalue for&amp;nbsp;Content-Length.&amp;nbsp; I corrected that and now I'm receiving&amp;nbsp;{"message":"Value from portalId does not match hub-id implied by authorization used: 3977210 (oauth) vs 4445704 (portalId)","correlationId":"202f9d86-bfdc-4f33-94a2-d5355e54fd3b","requestId":"2fe5c8789c482412f5179b5a1a658459"} error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My url is&amp;nbsp;&lt;A href="http://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=56af5b68-xxx&amp;amp;appId=145xxx" target="_blank"&gt;http://api.hubapi.com/extensions/ecomm/v1/settings?hapikey=56af5b68-xxx&amp;amp;appId=145xxx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you determine what isn't setup properly&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 19:28:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251454#M22191</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-07T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251460#M22193</link>
      <description>&lt;P&gt;Issac,&lt;/P&gt;&lt;P&gt;Update I was able to process a successful mappings setting.&amp;nbsp; I removed the&amp;nbsp;Authorization','Bearer from the header.&amp;nbsp; I thought I had to include this since we do use OAuth for our transactional emails.&amp;nbsp; Is this not the case?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 19:37:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251460#M22193</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-07T19:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251693#M22232</link>
      <description>&lt;P&gt;Apologies for the delayed response,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/80307"&gt;@aemmi&lt;/a&gt;. I'm glad to hear you got this working!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://developers.hubspot.com/docs/methods/ecommerce/upsert-settings" target="_self"&gt;Upsert&lt;/A&gt; and &lt;A href="https://developers.hubspot.com/docs/methods/ecommerce/get-settings" target="_self"&gt;Get ecommerce settings&lt;/A&gt; endpoints are a bit special. As I mention above:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Even though you use OAuth for all your other API requests, upserting settings must be done with your developer API key, per&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/ecommerce/get-settings" target="_self" rel="nofollow noopener noreferrer"&gt;this documentation&lt;/A&gt;. This is because you editing the settings of your&amp;nbsp;app&amp;nbsp;and not data in an account which has installed your app.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Said differently, HubSpot wouldn't recognize the OAuth token for one particular account (Hub ID) because you are trying to change the settings of your app&amp;nbsp;&lt;EM&gt;across&lt;/EM&gt; all accounts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thus, you should never have to use&amp;nbsp;&lt;EM&gt;both&amp;nbsp;&lt;/EM&gt;an OAuth token&amp;nbsp;&lt;EM&gt;and&lt;/EM&gt; your developer API key. You will only ever use one or the other. In this case, the endpoints only accept your developer API key.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 16:36:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/251693#M22232</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-02-08T16:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bad Request creating Ecommerce property mappings</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/252132#M22269</link>
      <description>&lt;P&gt;Thank You Issac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to sync messages to this end point&amp;nbsp; &lt;A href="http://api.hubapi.com/extensions/ecomm/v1/sync-messages/PRODUCT" target="_blank" rel="noopener"&gt;http://api.hubapi.com/extensions/ecomm/v1/sync-messages/PRODUCT&lt;/A&gt; and the attached code trying the developer HPIKEY , the app APIKEY or the OAuth and each time I receive this response&amp;nbsp; {"message":"This OAuth token (CM7nyu...) has not authorized the required scopes to complete this action, requires all of the following: [integration-sync]. Visit &lt;A href="https://developers.hubspot.com/scopes" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/scopes&lt;/A&gt; for more information.","correlationId":"22a72400-d9ef-484d-8f0b-9e14a2d3d41b","requestId":"0c8664d9a684827dbf0cdfba0eb4d571"} even though I have intergration sync setup.&amp;nbsp; Is there a step I need to do before this step.&amp;nbsp; How is this step different than the import process&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="authorization.JPG" style="width: 850px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14785iDF520BC18C4D322A/image-size/large?v=v2&amp;amp;px=999" role="button" title="authorization.JPG" alt="authorization.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;[{"integratorObjectId": "39","action": "UPSERT","changeOccurredTimestamp":153029475925,"propertyNameToValues": {"product_id": "39","product_name": "066-0811"} },{"integratorObjectId": "40","action": "UPSERT","changeOccurredTimestamp":153029475925,"propertyNameToValues": {"product_id": "40","product_name": "066-1117"}}]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 15:42:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Bad-Request-creating-Ecommerce-property-mappings/m-p/252132#M22269</guid>
      <dc:creator>aemmi</dc:creator>
      <dc:date>2019-02-11T15:42:49Z</dc:date>
    </item>
  </channel>
</rss>

