curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/analytic-sections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analytic_axis_id": "<string>",
"code": "<string>",
"label": "<string>",
"parent_id": "<string>",
"is_postable": true
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/analytic-sections"
payload = {
"analytic_axis_id": "<string>",
"code": "<string>",
"label": "<string>",
"parent_id": "<string>",
"is_postable": True
}
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({
analytic_axis_id: '<string>',
code: '<string>',
label: '<string>',
parent_id: '<string>',
is_postable: true
})
};
fetch('https://api.exowpee.com/v1/accounting/client/analytic-sections', 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/analytic-sections",
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([
'analytic_axis_id' => '<string>',
'code' => '<string>',
'label' => '<string>',
'parent_id' => '<string>',
'is_postable' => true
]),
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/analytic-sections"
payload := strings.NewReader("{\n \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\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/analytic-sections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/analytic-sections")
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 \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"parent_id": "<string>",
"parent": {},
"code": "<string>",
"label": "<string>",
"is_postable": true,
"status": "<string>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Add an analytic section (client account)
Create an analytic section (value within an analytic axis, such as one department).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/client/analytic-sections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analytic_axis_id": "<string>",
"code": "<string>",
"label": "<string>",
"parent_id": "<string>",
"is_postable": true
}
'import requests
url = "https://api.exowpee.com/v1/accounting/client/analytic-sections"
payload = {
"analytic_axis_id": "<string>",
"code": "<string>",
"label": "<string>",
"parent_id": "<string>",
"is_postable": True
}
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({
analytic_axis_id: '<string>',
code: '<string>',
label: '<string>',
parent_id: '<string>',
is_postable: true
})
};
fetch('https://api.exowpee.com/v1/accounting/client/analytic-sections', 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/analytic-sections",
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([
'analytic_axis_id' => '<string>',
'code' => '<string>',
'label' => '<string>',
'parent_id' => '<string>',
'is_postable' => true
]),
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/analytic-sections"
payload := strings.NewReader("{\n \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\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/analytic-sections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/analytic-sections")
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 \"analytic_axis_id\": \"<string>\",\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"is_postable\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"parent_id": "<string>",
"parent": {},
"code": "<string>",
"label": "<string>",
"is_postable": true,
"status": "<string>",
"created_by": "<string>",
"created_by_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}analytic_sections.create
Conditions
- The accounting module must be included in the plan of the organization.
- analytic_axis_id is required and must be an axis of the book.
- parent_id, when sent, must be a section of the same axis and book.
- The code is required, at most 32 characters, and must be unique within the axis of the book.
- A parent that already holds allocations, or is the target of an active rule, cannot take child sections.
- The label is required (255 characters at most).
- The section is created with status active; is_postable defaults to true when omitted.
- The creating actor is recorded in created_by and created_by_type.
- The parent, if any, becomes a group that can no longer receive allocations.
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, analytic_axis_id, parent_id, code, label, is_postable, status, created_by, created_by_type, 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: axis, parent, parent.axis, parent.parent.
Body
Required. Axis of the book that the section belongs to.
Required. At most 32 characters, unique within the axis of the book. Cannot be changed later.
32Required. Display name, at most 255 characters.
255Optional parent section on the same axis. A parent that holds allocations or is targeted by an active rule is refused.
Optional boolean; true when omitted. Whether the section can receive allocations.
Response
Resource (only with response=resource).
Identifier of the section (27-character KSUID).
Identifier of the axis the section belongs to.
The axis, included only when the caller may retrieve analytic axes.
Identifier of the parent section; null for a top-level section.
The parent section, included only when the caller may retrieve analytic sections.
Code of the section, unique within its axis and book.
Display name of the section.
Whether the section is marked postable. A section receives allocations only when it is postable, active, has no child sections and its axis is active.
active or archived.
Identifier of the actor that created the section.
Kind of actor that created the section (the actor's morph alias); null when it could not be resolved.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).