curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/related-parties \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/related-parties"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/related-parties', 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/accounting/client/related-parties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/related-parties"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/accounting/client/related-parties")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/related-parties")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"auxiliary_type": "<string>",
"auxiliary_id": "<string>",
"counterparty_owner_type": "<string>",
"counterparty_owner_id": "<string>",
"name": "<string>",
"country_code": "<string>",
"relation": "<string>",
"transfer_pricing_method": "<string>",
"loan_account_id": "<string>",
"loan_interest_bearing": true,
"loan_interest_rate": "<string>",
"is_internal": true,
"is_declarable": true,
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Declare a related party (client account)
Declares a customer or vendor of the book as a related party (a company of the same group), with the country, the relation and, optionally, the pricing method and the loan account that the transfer-pricing declaration needs (client space).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/related-parties \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/related-parties"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/client/related-parties', 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/accounting/client/related-parties",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/accounting/client/related-parties"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/accounting/client/related-parties")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/related-parties")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"auxiliary_type": "<string>",
"auxiliary_id": "<string>",
"counterparty_owner_type": "<string>",
"counterparty_owner_id": "<string>",
"name": "<string>",
"country_code": "<string>",
"relation": "<string>",
"transfer_pricing_method": "<string>",
"loan_account_id": "<string>",
"loan_interest_bearing": true,
"loan_interest_rate": "<string>",
"is_internal": true,
"is_declarable": true,
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}related_parties.create
Conditions
- The accounting module must be part of the organization’s plan.
- auxiliary_type is required and must be customer or vendor; auxiliary_id is required and must be the identifier of a customer or vendor of this book, that is of a third party that has an account in it (including one entered by hand in the book).
- A third party can be declared once per book; declaring it again is refused.
- name is required (255 characters at most). country_code is required and must be two letters (ISO 3166-1 alpha-2); it is stored in capitals.
- relation is required and must be parent, subsidiary, sister or other.
- transfer_pricing_method, when sent, must be cup, mpr, mprm, mtmn, mpb or autres.
- loan_account_id, when sent, must be a postable account of the book that no other related party already names. loan_interest_bearing, when sent, must be true or false; loan_interest_rate, when sent, is free text of 255 characters at most.
- counterparty_owner_type (organization or company) and counterparty_owner_id must be sent together, and must name the organization or one of its companies, never the book itself. A client account’s book cannot name one.
- The book must have accounting set up (at least one journal); otherwise the call is answered as not found.
- Creates the related party and records who declared it (created_by and created_by_type).
- is_internal is true when a counterparty book is named, and is_declarable is true unless the country is Benin (BJ): a party in Benin is recorded but not declared.
- A transfer-pricing draft that declares parties established outside Benin becomes stale and must be regenerated before it is filed.
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, owner_type, auxiliary_type, auxiliary_id, counterparty_owner_type, counterparty_owner_id, name, country_code, relation, transfer_pricing_method, loan_account_id, loan_interest_bearing, loan_interest_rate, created_by, created_by_type, created_at, updated_at, is_internal, is_declarable.
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: .
Response
Resource (only with response=resource).
Identifier of the related party (27-character KSUID string).
Kind of book that holds the related party: organization, company or client account.
Whether the related party is a customer or a vendor of the book.
Identifier of the customer or vendor declared as related party (27-character KSUID string).
Kind of that other book (organization or company); null when the party is outside Exowpee.
Identifier of the other book of the organization that the party stands for (27-character KSUID string); null when the party is outside Exowpee.
Name of the related party.
Country where the party is established (ISO 3166-1 alpha-2, capitals).
Relation to the entity: parent, subsidiary, sister, or other (a party in a privileged tax territory without such a link).
Method that justifies the prices with the party: cup, mpr, mprm, mtmn, mpb or autres; null when none was entered.
Identifier of the account of the book that carries the loan with the party (27-character KSUID string); null when there is no loan.
Whether the loan bears interest; null when not answered.
Interest rate of the loan as entered, free text such as a rate plus a reference; null when not entered.
Whether the party is another book of the same organization (a counterparty book is named) rather than an entity outside Exowpee.
Whether the transfer-pricing declaration covers the party: true unless it is established in Benin (BJ).
Identifier of the member or agent account who declared it; null when the actor could not be resolved.
Kind of actor in created_by (member or agent account); null when none could be resolved.
When the related party was declared, ISO 8601.
When the related party was last changed, ISO 8601.