curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analytic_section_id": "<string>",
"priority": 1,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}"
payload = {
"analytic_section_id": "<string>",
"priority": 1,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analytic_section_id: '<string>',
priority: 1,
match_account_prefix: '<string>',
match_source_type: '<string>',
match_journal_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}', 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/{analyticRule}/analytic-rules/{analytic_rule}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'analytic_section_id' => '<string>',
'priority' => 1,
'match_account_prefix' => '<string>',
'match_source_type' => '<string>',
'match_journal_id' => '<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/organization/books/{analyticRule}/analytic-rules/{analytic_rule}"
payload := strings.NewReader("{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"analytic_section_id": "<string>",
"section": {},
"priority": 123,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>",
"journal": {},
"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>",
"errors": {}
}Edit an allocation rule (organization)
Change the details of an allocation rule.
curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analytic_section_id": "<string>",
"priority": 1,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}"
payload = {
"analytic_section_id": "<string>",
"priority": 1,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analytic_section_id: '<string>',
priority: 1,
match_account_prefix: '<string>',
match_source_type: '<string>',
match_journal_id: '<string>'
})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}', 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/{analyticRule}/analytic-rules/{analytic_rule}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'analytic_section_id' => '<string>',
'priority' => 1,
'match_account_prefix' => '<string>',
'match_source_type' => '<string>',
'match_journal_id' => '<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/organization/books/{analyticRule}/analytic-rules/{analytic_rule}"
payload := strings.NewReader("{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{analyticRule}/analytic-rules/{analytic_rule}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analytic_section_id\": \"<string>\",\n \"priority\": 1,\n \"match_account_prefix\": \"<string>\",\n \"match_source_type\": \"<string>\",\n \"match_journal_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"analytic_axis_id": "<string>",
"axis": {},
"analytic_section_id": "<string>",
"section": {},
"priority": 123,
"match_account_prefix": "<string>",
"match_source_type": "<string>",
"match_journal_id": "<string>",
"journal": {},
"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>",
"errors": {}
}analytic_rules.update
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 axis of a rule cannot be changed.
- A new analytic_section_id must be an active section of the rule’s axis that is postable and has no child sections. When the rule is active and its section or status changes, the axis must also be active.
- After the change the rule must still have at least one matcher; a matcher sent as null clears it, and a matcher left out keeps its value.
- match_journal_id, when changed, must be a journal of the same book.
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); the route names this segment after the resource, but it selects the book.
Identifier of the allocation rule (27-character KSUID).
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, analytic_section_id, priority, match_account_prefix, match_source_type, match_journal_id, 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, section, section.axis, section.parent, journal.
Body
New target section: active, postable, without children, on the rule's axis. Left unchanged when omitted.
New priority, integer of 0 or more. Left unchanged when omitted.
x >= 0New prefix, at most 16 characters; null clears it, omitting keeps it. The rule must keep at least one matcher.
16New source type, at most 64 characters; null clears it, omitting keeps it. The rule must keep at least one matcher.
64New journal of the same book; null clears it, omitting keeps it. The rule must keep at least one matcher.
active or archived. Left unchanged when omitted. Reactivating requires a target section that can still receive allocations.
active, archived Response
Resource (only with response=resource).
Identifier of the rule (27-character KSUID).
Identifier of the axis the rule allocates on.
The axis, included only when the caller may retrieve analytic axes.
Identifier of the section that matching lines are allocated to.
The target section, included only when the caller may retrieve analytic sections.
Order of evaluation among the rules of the axis; an integer of 0 or more.
Matches journal lines whose account code starts with this prefix; null when this matcher is not used.
Matches entries created by this source type; null when this matcher is not used.
Matches entries of this journal; null when this matcher is not used.
The matched journal, included only when the caller may retrieve journals.
active or archived. Only active rules allocate.
Identifier of the actor that created the rule.
Kind of actor that created the rule (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).