APIs & Integrations

Not applicable

Abandon Cart in prestashop and products in cart

I am Using hubspot in Prestashop Ecommerce i am able to get form field by hubspot api.
I want to update cart values, product and abandon cart to hubspot how can i upload these values.

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Abandon Cart in prestashop and products in cart

Hi @addmakes02,

Got it, thank you for the clarification. In that case, you’ll want to use the Contacts API instead of the Contact Properties API. The Contact Properties API is only used to update the contact property definitions. Below is the documentation for updating a contact’s contact properties:

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Abandon Cart in prestashop and products in cart

Hi @addmakes02,

That endpoint is used to update an existing contact property’s metadata. Are you trying to create a new custom contact property, or update the value of a custom property on a specific contact record?

0 Upvotes
Not applicable

Abandon Cart in prestashop and products in cart

I am trying to update the value of custom Property

0 Upvotes
Not applicable

Abandon Cart in prestashop and products in cart

$str_post = array(
“name” => “product_val”,
“groupName” => “conversioninformation”,
“description” => “”,
“fieldType” => “text”,
“formField” => false,
“type” => “string”,
“label” => “Fresh Method Prop”
);
//Leave this one be
$str_post = json_encode($str_post);
//replace the values in this URL with your portal ID and your form GUID
$endpoint = ‘https://api.hubapi.com/properties/v1/contacts/properties/named/custom_field?hapikey=myapikey’;

    $ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: application/json’,'Content-Length: ’ . strlen($str_post)));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘PUT’);
curl_setopt($ch, CURLOPT_POSTFIELDS,$str_post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$status_code = @curl_getinfo($ch, CURLINFO_HTTP_CODE); //Log the response status code
$response = curl_exec($ch);
curl_close($ch);
echo $status_code . " response" . $response;

I am passing these value but in response getting zeo

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Abandon Cart in prestashop and products in cart

Hi @addmakes02,

You can use the products object to make a product library of all the goods and services you sell. There isn’t yet a public API for HubSpot products, but I’ve included the documentation on the products object for reference anyway. For things like cart value & abandoned cart, you might consider creating custom contact properties.

https://developers.hubspot.com/docs/methods/contacts/contact-properties-overview

0 Upvotes