Request partner influence
Ask your partner team to bring partner influence on one of your accounts, without naming a partner: a partner manager chooses one later, if and when they start a collaboration. The account the request targets is resolved from the candidate CRM records you send, in an order given by the source object type, and is the first of them whose account overlaps a partner account. An account can carry only one request waiting for an answer: a new request is refused while the latest one is still pending, and allowed once it has been accepted or refused. This endpoint requires a HubSpot-issued access token: the request is attributed to the user that token was issued for, which a Public API key does not identify.
curl --request POST \
--url https://api.example.com/v3/account-mapping/collaboration-requests \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"context": "<string>",
"sourceRecordId": "<string>",
"sourceObjectType": "<string>",
"associatedCompanyExternalIds": [
"<string>"
],
"associatedContactExternalIds": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v3/account-mapping/collaboration-requests"
payload = {
"context": "<string>",
"sourceRecordId": "<string>",
"sourceObjectType": "<string>",
"associatedCompanyExternalIds": ["<string>"],
"associatedContactExternalIds": ["<string>"]
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
context: '<string>',
sourceRecordId: '<string>',
sourceObjectType: '<string>',
associatedCompanyExternalIds: ['<string>'],
associatedContactExternalIds: ['<string>']
})
};
fetch('https://api.example.com/v3/account-mapping/collaboration-requests', 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.example.com/v3/account-mapping/collaboration-requests",
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([
'context' => '<string>',
'sourceRecordId' => '<string>',
'sourceObjectType' => '<string>',
'associatedCompanyExternalIds' => [
'<string>'
],
'associatedContactExternalIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/account-mapping/collaboration-requests"
payload := strings.NewReader("{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/account-mapping/collaboration-requests")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/account-mapping/collaboration-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyBody
The IDs, in the CRM they come from, of the company records associated with Resels.Backend.Api.Public.Model.AccountMappingCollaborationRequests.v3.AccountMappingCollaborationRequestCreateRequestDto.SourceRecordId. Considered after the source record itself. Optional.
The IDs, in the CRM they come from, of the contact records associated with Resels.Backend.Api.Public.Model.AccountMappingCollaborationRequests.v3.AccountMappingCollaborationRequestCreateRequestDto.SourceRecordId. Considered after Resels.Backend.Api.Public.Model.AccountMappingCollaborationRequests.v3.AccountMappingCollaborationRequestCreateRequestDto.AssociatedCompanyExternalIds. Optional.
Response
Collaboration request created. The response has no body: the request is not readable through this API, so there is nothing to return.
curl --request POST \
--url https://api.example.com/v3/account-mapping/collaboration-requests \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"context": "<string>",
"sourceRecordId": "<string>",
"sourceObjectType": "<string>",
"associatedCompanyExternalIds": [
"<string>"
],
"associatedContactExternalIds": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v3/account-mapping/collaboration-requests"
payload = {
"context": "<string>",
"sourceRecordId": "<string>",
"sourceObjectType": "<string>",
"associatedCompanyExternalIds": ["<string>"],
"associatedContactExternalIds": ["<string>"]
}
headers = {"Content-Type": "application/json-patch+json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
context: '<string>',
sourceRecordId: '<string>',
sourceObjectType: '<string>',
associatedCompanyExternalIds: ['<string>'],
associatedContactExternalIds: ['<string>']
})
};
fetch('https://api.example.com/v3/account-mapping/collaboration-requests', 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.example.com/v3/account-mapping/collaboration-requests",
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([
'context' => '<string>',
'sourceRecordId' => '<string>',
'sourceObjectType' => '<string>',
'associatedCompanyExternalIds' => [
'<string>'
],
'associatedContactExternalIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+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.example.com/v3/account-mapping/collaboration-requests"
payload := strings.NewReader("{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json-patch+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.example.com/v3/account-mapping/collaboration-requests")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v3/account-mapping/collaboration-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"context\": \"<string>\",\n \"sourceRecordId\": \"<string>\",\n \"sourceObjectType\": \"<string>\",\n \"associatedCompanyExternalIds\": [\n \"<string>\"\n ],\n \"associatedContactExternalIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body
