curl --request POST \
--url https://api.journeybee.io/v1/schema/objects/{key}/partner-access/preview \
--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/preview"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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/preview', 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/preview",
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([
'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/preview"
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("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.journeybee.io/v1/schema/objects/{key}/partner-access/preview")
.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/preview")
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 \"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>"
]
},
"record_count": 4503599627370495
}Preview a change to what partners can do with an object's records
Takes the same body as updateObjectPartnerAccess and returns, without saving anything, the definition as it is now, the partner access the object would have and record_count, how many live records the object has. That is every record in the object, not how many any partner sees or would stop seeing. It refuses what the update would refuse. 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. The answer is never cached for an idempotent replay. Needs a company admin.
curl --request POST \
--url https://api.journeybee.io/v1/schema/objects/{key}/partner-access/preview \
--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/preview"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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/preview', 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/preview",
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([
'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/preview"
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("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.journeybee.io/v1/schema/objects/{key}/partner-access/preview")
.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/preview")
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 \"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>"
]
},
"record_count": 4503599627370495
}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