curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"label": "<string>",
"is_mandatory": true
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes"
payload = {
"code": "<string>",
"label": "<string>",
"is_mandatory": 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({code: '<string>', label: '<string>', is_mandatory: true})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes', 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/{book}/analytic-axes",
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([
'code' => '<string>',
'label' => '<string>',
'is_mandatory' => 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/organization/books/{book}/analytic-axes"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": 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/organization/books/{book}/analytic-axes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes")
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 \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"code": "<string>",
"label": "<string>",
"is_mandatory": true,
"status": "<string>",
"sections_count": 123,
"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 axis (organization)
Create an analytic axis (dimension used to analyse costs, such as department or project).
curl --request POST \
--url https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"label": "<string>",
"is_mandatory": true
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes"
payload = {
"code": "<string>",
"label": "<string>",
"is_mandatory": 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({code: '<string>', label: '<string>', is_mandatory: true})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes', 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/{book}/analytic-axes",
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([
'code' => '<string>',
'label' => '<string>',
'is_mandatory' => 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/organization/books/{book}/analytic-axes"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": 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/organization/books/{book}/analytic-axes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{book}/analytic-axes")
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 \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"is_mandatory\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"code": "<string>",
"label": "<string>",
"is_mandatory": true,
"status": "<string>",
"sections_count": 123,
"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_axes.create
Conditions
- The accounting module must be included in the plan of the organization.
- The caller must have been granted access to the book named in the path.
- The code is required, at most 32 characters, and must be unique among the axes of the book. Archived axes still count.
- The label is required (255 characters at most).
- The book must already have at least one journal.
- The axis is created with status active; is_mandatory defaults to false when omitted.
- The creating actor is recorded in created_by and created_by_type.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the accounting book (27-character KSUID) whose records are handled.
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, code, label, is_mandatory, status, created_by, created_by_type, created_at, updated_at, sections_count.
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
Required. Short code of the axis, at most 32 characters, unique among the axes of the book. Cannot be changed later.
32Required. Display name of the axis, at most 255 characters.
255Optional boolean; false when omitted. Flags the axis as mandatory.
Response
Resource (only with response=resource).
Identifier of the axis (27-character KSUID).
Short code of the axis, unique within the book (32 characters at most).
Display name of the axis.
Whether the axis is flagged as mandatory. Stored as a flag; false by default.
active or archived. Archived axes cannot receive new rules or allocations.
Number of sections that belong to the axis, counted across the book.
Identifier of the actor that created the axis; null when it could not be resolved.
Kind of actor that created the axis (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).