curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}', 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/organization/books/{relatedParty}/related-parties/{related_party}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/organization/books/{relatedParty}/related-parties/{related_party}"
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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>",
"errors": {}
}Edit a related party (organization)
Changes the name, country, relation, pricing method or loan details of a related party (organization space).
curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}', 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/organization/books/{relatedParty}/related-parties/{related_party}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/organization/books/{relatedParty}/related-parties/{related_party}"
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{relatedParty}/related-parties/{related_party}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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>",
"errors": {}
}related_parties.update
Conditions
- The accounting module must be part of the organization’s plan.
- In the organization space, the caller must have access to the book.
- Only name, country_code, relation, transfer_pricing_method and the loan fields (loan_account_id, loan_interest_bearing, loan_interest_rate) can be changed. The third party and the counterparty book never change: declare another related party instead.
- Fields left out keep their value. A null for name, country_code or relation keeps the stored value; a null for transfer_pricing_method or for a loan field clears it.
- The values follow the same rules as when the party is declared; the loan account may be the one the party already names, but not one another party names.
- A transfer-pricing draft built before the change becomes stale when the party is declared (established outside Benin), before or after the change, and must be regenerated before it is filed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the accounting book (the {book} segment of the organization space, a 27-character KSUID string); the OpenAPI generator names it after the controller argument.
Identifier of the related party (27-character KSUID string), one of the book.
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.