Save HubSpot product and outbound deal settings
Stores selected program ids and name/description/price/sku recipient field choices, approving the next recipient/product mapping. Product sync or outbound deals require valid organization-owned programs; outbound deals additionally require pipeline and stage ids. Non-empty legacy product_field_mapping also applies to the first selected program. Omitted settings reset to disabled/empty/null; no provider record is sent by this call. Requires the integration platform global/configured client feature gate (normally integration_platform_foundation). Requires permission: one of access_account_settings.
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_sync_enabled": true,
"product_program_ids": [
1
],
"product_field_mapping": {
"name": "Product Field Mapping.Name",
"description": "Product Field Mapping.Description",
"price": "Product Field Mapping.Price",
"sku": "Product Field Mapping.Sku"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": true,
"deal_outbound_pipeline_id": "Deal Outbound Pipeline Id",
"deal_outbound_stage_id": "Deal Outbound Stage Id"
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping"
payload = {
"product_sync_enabled": True,
"product_program_ids": [1],
"product_field_mapping": {
"name": "Product Field Mapping.Name",
"description": "Product Field Mapping.Description",
"price": "Product Field Mapping.Price",
"sku": "Product Field Mapping.Sku"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": True,
"deal_outbound_pipeline_id": "Deal Outbound Pipeline Id",
"deal_outbound_stage_id": "Deal Outbound Stage Id"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_sync_enabled: true,
product_program_ids: [1],
product_field_mapping: {
name: 'Product Field Mapping.Name',
description: 'Product Field Mapping.Description',
price: 'Product Field Mapping.Price',
sku: 'Product Field Mapping.Sku'
},
product_program_field_mappings: {},
deal_outbound_enabled: true,
deal_outbound_pipeline_id: 'Deal Outbound Pipeline Id',
deal_outbound_stage_id: 'Deal Outbound Stage Id'
})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_sync_enabled' => true,
'product_program_ids' => [
1
],
'product_field_mapping' => [
'name' => 'Product Field Mapping.Name',
'description' => 'Product Field Mapping.Description',
'price' => 'Product Field Mapping.Price',
'sku' => 'Product Field Mapping.Sku'
],
'product_program_field_mappings' => [
],
'deal_outbound_enabled' => true,
'deal_outbound_pipeline_id' => 'Deal Outbound Pipeline Id',
'deal_outbound_stage_id' => 'Deal Outbound Stage Id'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping"
payload := strings.NewReader("{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"connection": {
"id": 42,
"target_context_json": {
"donor_hysform_id": 42,
"company_target_mode": "household",
"allow_email_match": true,
"company_match_by_name": true,
"activity_sync_enabled": true,
"activity_types": [
"note"
],
"activity_link_policy": "matched_only",
"activity_body_visibility": "team",
"deal_sync_enabled": true,
"deal_stage_ids": [
"<string>"
],
"product_sync_enabled": true,
"product_program_ids": [
42
],
"product_field_mapping": {
"name": "Example",
"description": "Example",
"price": "Example",
"sku": "Example"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": true,
"deal_outbound_pipeline_id": "Example",
"deal_outbound_stage_id": "Example"
}
},
"mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "hubspot",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Connection id in the current organization.
Body
Validated request fields for this operation.
Product sync enabled. Validation: nullable, boolean.
true
Product program ids. Validation: nullable, array.
Product program ids item. Validation: integer.
Product field mapping. Validation: nullable, array.
Show child attributes
Show child attributes
Per-program field choices keyed by numeric program id, for example 42.
Show child attributes
Show child attributes
Deal outbound enabled. Validation: nullable, boolean.
true
Deal outbound pipeline id. Validation: nullable, string, max:191.
191"Deal Outbound Pipeline Id"
Deal outbound stage id. Validation: nullable, string, max:191.
191"Deal Outbound Stage Id"
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_sync_enabled": true,
"product_program_ids": [
1
],
"product_field_mapping": {
"name": "Product Field Mapping.Name",
"description": "Product Field Mapping.Description",
"price": "Product Field Mapping.Price",
"sku": "Product Field Mapping.Sku"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": true,
"deal_outbound_pipeline_id": "Deal Outbound Pipeline Id",
"deal_outbound_stage_id": "Deal Outbound Stage Id"
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping"
payload = {
"product_sync_enabled": True,
"product_program_ids": [1],
"product_field_mapping": {
"name": "Product Field Mapping.Name",
"description": "Product Field Mapping.Description",
"price": "Product Field Mapping.Price",
"sku": "Product Field Mapping.Sku"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": True,
"deal_outbound_pipeline_id": "Deal Outbound Pipeline Id",
"deal_outbound_stage_id": "Deal Outbound Stage Id"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_sync_enabled: true,
product_program_ids: [1],
product_field_mapping: {
name: 'Product Field Mapping.Name',
description: 'Product Field Mapping.Description',
price: 'Product Field Mapping.Price',
sku: 'Product Field Mapping.Sku'
},
product_program_field_mappings: {},
deal_outbound_enabled: true,
deal_outbound_pipeline_id: 'Deal Outbound Pipeline Id',
deal_outbound_stage_id: 'Deal Outbound Stage Id'
})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_sync_enabled' => true,
'product_program_ids' => [
1
],
'product_field_mapping' => [
'name' => 'Product Field Mapping.Name',
'description' => 'Product Field Mapping.Description',
'price' => 'Product Field Mapping.Price',
'sku' => 'Product Field Mapping.Sku'
],
'product_program_field_mappings' => [
],
'deal_outbound_enabled' => true,
'deal_outbound_pipeline_id' => 'Deal Outbound Pipeline Id',
'deal_outbound_stage_id' => 'Deal Outbound Stage Id'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping"
payload := strings.NewReader("{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/hubspot/product-mapping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_sync_enabled\": true,\n \"product_program_ids\": [\n 1\n ],\n \"product_field_mapping\": {\n \"name\": \"Product Field Mapping.Name\",\n \"description\": \"Product Field Mapping.Description\",\n \"price\": \"Product Field Mapping.Price\",\n \"sku\": \"Product Field Mapping.Sku\"\n },\n \"product_program_field_mappings\": {},\n \"deal_outbound_enabled\": true,\n \"deal_outbound_pipeline_id\": \"Deal Outbound Pipeline Id\",\n \"deal_outbound_stage_id\": \"Deal Outbound Stage Id\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"connection": {
"id": 42,
"target_context_json": {
"donor_hysform_id": 42,
"company_target_mode": "household",
"allow_email_match": true,
"company_match_by_name": true,
"activity_sync_enabled": true,
"activity_types": [
"note"
],
"activity_link_policy": "matched_only",
"activity_body_visibility": "team",
"deal_sync_enabled": true,
"deal_stage_ids": [
"<string>"
],
"product_sync_enabled": true,
"product_program_ids": [
42
],
"product_field_mapping": {
"name": "Example",
"description": "Example",
"price": "Example",
"sku": "Example"
},
"product_program_field_mappings": {},
"deal_outbound_enabled": true,
"deal_outbound_pipeline_id": "Example",
"deal_outbound_stage_id": "Example"
}
},
"mapping": {
"id": 42,
"connection_id": 42,
"provider_key": "hubspot",
"hys_object_type": "Example",
"provider_object_type": "Example",
"mapping_version": 2,
"status": "Example",
"source_of_truth_json": {},
"mapping_json": {},
"defaults_json": {},
"metadata_json": {},
"approved_at": "2023-11-07T05:31:56Z"
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}