curl --request PUT \
--url https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations"
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/client/journal-lines/{journalLine}/analytic-allocations', 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/journal-lines/{journalLine}/analytic-allocations",
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/client/journal-lines/{journalLine}/analytic-allocations"
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/client/journal-lines/{journalLine}/analytic-allocations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations")
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{
"data": [
{
"id": "<string>",
"journal_line_id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"analytic_section_id": "<string>",
"section": {},
"amount": 123,
"source": "<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": {}
}Set line cost allocations (client account)
Replace the split of a journal line across analytic sections, for example to spread a cost between departments.
curl --request PUT \
--url https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations"
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/client/journal-lines/{journalLine}/analytic-allocations', 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/journal-lines/{journalLine}/analytic-allocations",
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/client/journal-lines/{journalLine}/analytic-allocations"
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/client/journal-lines/{journalLine}/analytic-allocations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/client/journal-lines/{journalLine}/analytic-allocations")
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{
"data": [
{
"id": "<string>",
"journal_line_id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"analytic_section_id": "<string>",
"section": {},
"amount": 123,
"source": "<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.update
Conditions
- The accounting module must be included in the plan of the organization.
- The caller also needs journal_entries.retrieve on the journal entry that holds the line.
- The journal line must belong to the book.
- The allocations array must be present; an empty array removes every allocation of the line.
- Each allocation needs analytic_axis_id (an active axis of the book), analytic_section_id and amount (integer of at least 1, in minor units).
- Each section must exist in the book, be active, belong to the axis named in the same row, be postable and have no child sections; it is also refused when its axis is not active.
- The same axis and section pair cannot appear twice in the request.
- The line’s account must be of an allocable class (6, 7 or 8 by default).
- Lines of the fiscal-year closing entry cannot be allocated.
- The line’s entry must be posted and must not be a reversal; a reversed or refunded entry and its reversal keep the split they had.
- The fiscal year of the line’s entry must not have filed statements. A closed period does not block allocation.
- For every axis present in the request, the amounts must add up exactly to the line amount. An axis not present is left unallocated.
- Deletes the previous allocations of the line (all axes, including those created by rules or explicit targets at posting) and inserts the new ones with source manual, created by the current actor.
- Nothing else changes: allocating does not alter the journal entry, balances or the books.
- The reports of the analytic section (balance, income statement, section lines, unallocated worklist) reflect the new split immediately.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the journal line (27-character KSUID string) whose allocations are read or replaced. It must belong to the book of the client account.
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, journal_line_id, analytic_axis_id, analytic_section_id, amount, source, 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, section, section.axis, section.parent.
Response
Resource (only with response=resource).
Items of this page.
Show child attributes
Show child attributes