curl --request POST \
--url https://api.exowpee.com/v1/iam/access-grant-organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "accounting",
"targets": [
{
"id": "<string>"
}
],
"actor_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/iam/access-grant-organizations"
payload = {
"domain": "accounting",
"targets": [{ "id": "<string>" }],
"actor_id": "<string>"
}
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({domain: 'accounting', targets: [{id: '<string>'}], actor_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/iam/access-grant-organizations', 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.exowpee.com/v1/iam/access-grant-organizations",
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([
'domain' => 'accounting',
'targets' => [
[
'id' => '<string>'
]
],
'actor_id' => '<string>'
]),
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.exowpee.com/v1/iam/access-grant-organizations"
payload := strings.NewReader("{\n \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\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.exowpee.com/v1/iam/access-grant-organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/iam/access-grant-organizations")
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 \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"actor_type": "<string>",
"actor_id": "<string>",
"domain": "<string>",
"target_type": "<string>",
"target_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Grant accounting access
Gives a member or organization agent account access to the accounting of chosen companies or the organization itself.
curl --request POST \
--url https://api.exowpee.com/v1/iam/access-grant-organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain": "accounting",
"targets": [
{
"id": "<string>"
}
],
"actor_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/iam/access-grant-organizations"
payload = {
"domain": "accounting",
"targets": [{ "id": "<string>" }],
"actor_id": "<string>"
}
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({domain: 'accounting', targets: [{id: '<string>'}], actor_id: '<string>'})
};
fetch('https://api.exowpee.com/v1/iam/access-grant-organizations', 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.exowpee.com/v1/iam/access-grant-organizations",
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([
'domain' => 'accounting',
'targets' => [
[
'id' => '<string>'
]
],
'actor_id' => '<string>'
]),
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.exowpee.com/v1/iam/access-grant-organizations"
payload := strings.NewReader("{\n \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\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.exowpee.com/v1/iam/access-grant-organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/iam/access-grant-organizations")
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 \"domain\": \"accounting\",\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"actor_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"actor_type": "<string>",
"actor_id": "<string>",
"domain": "<string>",
"target_type": "<string>",
"target_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}access_grants.create
Conditions
- Only members can use it, from the organization space; agent accounts cannot.
- The actor must be an existing profile assignment (user_profile) or organization agent account.
- targets must hold between 1 and 100 entries, with distinct identifiers.
- Each target must be either the current organization itself or one of its companies; any other identifier is refused and the error names the target index.
- A target already granted to the same actor in the same domain is refused, even if sent in a different call; no grant is created when any target is refused.
- The actor can read and use the accounting books of each granted target.
- Grants are removed automatically when the actor’s profile assignment or the agent account is deleted.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, actor_type, actor_id, domain, target_type, target_id, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Body
Kind of actor receiving or losing access. Required: user_profile (a person's profile assignment in the organization) or organization_agent.
user_profile, organization_agent Domain of the grant. Required; only accounting exists today.
accounting Targets of the grant. Required, from 1 to 100 entries, each an object with type and id and nothing else.
1 - 100 elementsShow child attributes
Show child attributes
Identifier of the actor (27-character KSUID string). Required, and it must exist in the current organization.
Response
Resource (only with response=resource).
Identifier of the grant (27-character KSUID string).
Kind of actor holding the grant: user_profile (a person's profile assignment in the organization) or organization_agent.
Identifier of the actor holding the grant (27-character KSUID string).
Domain the grant opens. Only accounting exists today.
Kind of target reached: organization (the organization's own books) or company.
Identifier of the target (27-character KSUID string): the organization identifier or a company identifier.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).