curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parent_id": "<string>",
"code": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/accounts"
payload = {
"parent_id": "<string>",
"code": "<string>",
"name": "<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({parent_id: '<string>', code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/accounts', 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/accounts",
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([
'parent_id' => '<string>',
'code' => '<string>',
'name' => '<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/accounting/client/accounts"
payload := strings.NewReader("{\n \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<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/accounting/client/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/accounts")
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 \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"code": "<string>",
"name": "<string>",
"parent_id": "<string>",
"normal_balance": "<string>",
"is_postable": true,
"is_standard": true,
"syscohada_template_id": "<string>",
"auxiliary_type": "<string>",
"auxiliary_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Add an account (client account)
Create a new account under an existing parent account in the chart of accounts, including a third-party account if needed.
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parent_id": "<string>",
"code": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/accounts"
payload = {
"parent_id": "<string>",
"code": "<string>",
"name": "<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({parent_id: '<string>', code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/client/accounts', 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/accounts",
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([
'parent_id' => '<string>',
'code' => '<string>',
'name' => '<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/accounting/client/accounts"
payload := strings.NewReader("{\n \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<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/accounting/client/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/accounts")
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 \"parent_id\": \"<string>\",\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"code": "<string>",
"name": "<string>",
"parent_id": "<string>",
"normal_balance": "<string>",
"is_postable": true,
"is_standard": true,
"syscohada_template_id": "<string>",
"auxiliary_type": "<string>",
"auxiliary_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}accounting_accounts.create
Conditions
- The accounting module must be included in the plan of the organization.
- From the client space the book is always the client account’s own book.
- The book must be set up for accounting (it must have at least one journal).
- parent_id is required and must be an account of this book; otherwise validation fails.
- code is required, must be unique among all accounts of the book, and must start with the code of the parent account.
- When auxiliary_type is sent it must be customer or vendor; a customer account needs a parent whose code starts with 41, a supplier account a parent whose code starts with 40, and the parent must not already be the auxiliary of another record.
- A parent that can receive entries and already has journal lines cannot get a sub-account.
- A parent that can receive entries and is mapped to a posting role without a third-party type cannot get a sub-account; the role must be remapped first.
- Creates a manual account: it can receive entries, is not a standard-template account, takes the normal balance (debit or credit) and organization of its parent, and has no template link.
- When the parent could receive entries it is turned into a grouping account (is_postable becomes false) as its first sub-account is added.
- When auxiliary_type is sent the new account is its own auxiliary: auxiliary_id is set to its own identifier.
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, code, name, parent_id, normal_balance, is_postable, is_standard, syscohada_template_id, auxiliary_type, auxiliary_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
Identifier of the parent account, which must belong to the same book. If it can receive entries it must have no journal lines and no non-third-party role mapping, and it becomes a grouping account.
Code of the new account. It must be unique in the book and start with the parent's code.
Name of the new account.
Makes the new account a customer or supplier account entered by hand: customer under a parent whose code starts with 41, vendor under a parent whose code starts with 40. The parent must not already belong to a third party, a money account or a payment route. Optional; leave it out for an ordinary account.
customer, vendor Response
Resource (only with response=resource).
Identifier of the account (27-character KSUID).
Type of book owning the account: organization, company or client.
Account code in the chart of accounts, unique within the book.
Name of the account.
Identifier of the parent account; null for a top-level account.
Side on which the account normally carries its balance: debit or credit.
true when entries can be posted to the account; false for a grouping account that has sub-accounts.
true when the account comes from the standard chart template; accounts added by hand are false.
Identifier of the standard template account this account was created from; null for an account added by hand.
Kind of record this account is the third-party account of (customer, vendor, location, cash_register, money_account, payment_route, payment_method, intercompany_counterparty, cheque_transfer); null for an ordinary account.
Identifier of the record the account stands for; for a manual customer or supplier account it is the account's own identifier. Null for an ordinary account.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).