APIs & Integrations

j_j
Member

Creating and updating Mappings for Ecommerce Bridge API

SOLVE

Hi,

 

Simple question hopefully.

If we get our existing API mappings via this endpoint:

 

GET https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key}

 

And then add some new entries in JSON body for some new information we need to record, can we just post that entire payload back to HubSpot using:

PUT https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key}

 

I think we tried this before and it had problems. The endpoint for our mappings has some entries like this:

 

{
"externalPropertyName": "external_source_app_id",
"hubspotPropertyName": "ip__sync_extension__external_source_app_id",
"dataType": "STRING"
}

 

We did not add these, they were just returned in the payload. Do we leave them in there when trying to re-sync our new data? We just want to add two new fields in the CONTACT section.

 

Thanks.

0 Upvotes
1 Accepted solution
Ismail
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Creating and updating Mappings for Ecommerce Bridge API

SOLVE

@j_j yes you can use GET https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key} to get the current e-commerce bridge mapping

Then remove the following entries from the JSON response (for all objects)

  • ip__sync_extension__external_source_account_id
  • ip__sync_extension__external_source_app_id
 

Then add the new entries in JSON body for the new information you need to record, then post that entire payload back to HubSpot using

PUT https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key}

 

I hope this is helpful. 

 

View solution in original post

2 Replies 2
Ismail
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Creating and updating Mappings for Ecommerce Bridge API

SOLVE

@j_j yes you can use GET https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key} to get the current e-commerce bridge mapping

Then remove the following entries from the JSON response (for all objects)

  • ip__sync_extension__external_source_account_id
  • ip__sync_extension__external_source_app_id
 

Then add the new entries in JSON body for the new information you need to record, then post that entire payload back to HubSpot using

PUT https://api.hubapi.com/extensions/ecomm/v2/settings?hapikey={our-hapi-key}

 

I hope this is helpful. 

 

j_j
Member

Creating and updating Mappings for Ecommerce Bridge API

SOLVE

Thanks, I removed them and it gave me a 200 (OK) response.