curl --request PATCH \
--url https://api.journeybee.io/v1/schema/objects/{key}/partner-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_schema_version": 4503599627370495,
"see": true,
"create": true,
"edit": true,
"delete": true,
"partner_types": [],
"tier_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"partner_tag_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_tag_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.journeybee.io/v1/schema/objects/{key}/partner-access"
payload = {
"expected_schema_version": 4503599627370495,
"see": True,
"create": True,
"edit": True,
"delete": True,
"partner_types": [],
"tier_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"partner_tag_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"contact_tag_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_schema_version: 4503599627370495,
see: true,
create: true,
edit: true,
delete: true,
partner_types: [],
tier_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
partner_tag_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
contact_tag_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.journeybee.io/v1/schema/objects/{key}/partner-access', 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.journeybee.io/v1/schema/objects/{key}/partner-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_schema_version' => 4503599627370495,
'see' => true,
'create' => true,
'edit' => true,
'delete' => true,
'partner_types' => [
],
'tier_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'partner_tag_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'contact_tag_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.journeybee.io/v1/schema/objects/{key}/partner-access"
payload := strings.NewReader("{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.journeybee.io/v1/schema/objects/{key}/partner-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/objects/{key}/partner-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"definition": {
"uuid": "<string>",
"key": "<string>",
"singular_label": "<string>",
"plural_label": "<string>",
"schema_version": 4503599627370495,
"is_partner_type": true,
"archived": true,
"enabled_features": [
"notes"
],
"icon": "<string>",
"name_label": "<string>"
},
"partner_access": {
"see": true,
"create": true,
"edit": true,
"delete": true,
"audience": "all_partners",
"partner_types": [
"referral"
],
"tier_uuids": [
"<string>"
],
"partner_tag_uuids": [
"<string>"
],
"contact_tag_uuids": [
"<string>"
]
}
}Change what partners can do with an object's records
Saves the partner access of a custom object, found by its key: whether partners see its records (see), and which partners (audience: every partner, or the partner types, tiers, partner tags and contact tags the lists name). While see is on, a partner also sees a record linked to them through a live relationship, even outside the audience; contact tags in the lists still apply. Every setting is optional; one left out stays as it is, and the settings sent are saved together as one schema version. Each list is a full replacement. Which fields partners see stays with each field’s sharing. A partner type or an object without its own records returns 400. create, edit or delete sent as true returns 400 reason not_available_yet (partners cannot do them yet). Lists sent with (or into) the all_partners audience, an unknown tier or tag uuid, an archived tier or a tag of the wrong kind return 400. A stale expected_schema_version returns 409 and nothing is saved. Needs a company admin. A Buzz agent can only run this as an approved proposal. Use previewObjectPartnerAccess first.
curl --request PATCH \
--url https://api.journeybee.io/v1/schema/objects/{key}/partner-access \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_schema_version": 4503599627370495,
"see": true,
"create": true,
"edit": true,
"delete": true,
"partner_types": [],
"tier_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"partner_tag_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_tag_uuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.journeybee.io/v1/schema/objects/{key}/partner-access"
payload = {
"expected_schema_version": 4503599627370495,
"see": True,
"create": True,
"edit": True,
"delete": True,
"partner_types": [],
"tier_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"partner_tag_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"contact_tag_uuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_schema_version: 4503599627370495,
see: true,
create: true,
edit: true,
delete: true,
partner_types: [],
tier_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
partner_tag_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
contact_tag_uuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.journeybee.io/v1/schema/objects/{key}/partner-access', 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.journeybee.io/v1/schema/objects/{key}/partner-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'expected_schema_version' => 4503599627370495,
'see' => true,
'create' => true,
'edit' => true,
'delete' => true,
'partner_types' => [
],
'tier_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'partner_tag_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'contact_tag_uuids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.journeybee.io/v1/schema/objects/{key}/partner-access"
payload := strings.NewReader("{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.journeybee.io/v1/schema/objects/{key}/partner-access")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/objects/{key}/partner-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_schema_version\": 4503599627370495,\n \"see\": true,\n \"create\": true,\n \"edit\": true,\n \"delete\": true,\n \"partner_types\": [],\n \"tier_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"partner_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"contact_tag_uuids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"definition": {
"uuid": "<string>",
"key": "<string>",
"singular_label": "<string>",
"plural_label": "<string>",
"schema_version": 4503599627370495,
"is_partner_type": true,
"archived": true,
"enabled_features": [
"notes"
],
"icon": "<string>",
"name_label": "<string>"
},
"partner_access": {
"see": true,
"create": true,
"edit": true,
"delete": true,
"audience": "all_partners",
"partner_types": [
"referral"
],
"tier_uuids": [
"<string>"
],
"partner_tag_uuids": [
"<string>"
],
"contact_tag_uuids": [
"<string>"
]
}
}Authorizations
Body
all_partners: every partner of the company, whatever its partner type. rules: the partners the lists below name. Saving all_partners clears the lists. While see is on, a partner also sees a record linked to them through a live relationship, even outside the audience; contact tags in the lists still apply.
all_partners, rules