POST
Add an analytic axis (organization)
Organization space Accounting module For: Accountant · Permission: 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.
What else happens
  • 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.
Part of Set up analytic axes, sections and rules.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

book
string
required

Identifier of the accounting book (27-character KSUID) whose records are handled.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

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.

include
string

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

application/json
code
string
required

Required. Short code of the axis, at most 32 characters, unique among the axes of the book. Cannot be changed later.

Maximum string length: 32
label
string
required

Required. Display name of the axis, at most 255 characters.

Maximum string length: 255
is_mandatory
boolean | null

Optional boolean; false when omitted. Flags the axis as mandatory.

Response

Resource (only with response=resource).

id

Identifier of the axis (27-character KSUID).

code

Short code of the axis, unique within the book (32 characters at most).

label

Display name of the axis.

is_mandatory
boolean

Whether the axis is flagged as mandatory. Stored as a flag; false by default.

status

active or archived. Archived axes cannot receive new rules or allocations.

sections_count
integer

Number of sections that belong to the axis, counted across the book.

created_by

Identifier of the actor that created the axis; null when it could not be resolved.

created_by_type

Kind of actor that created the axis (the actor's morph alias); null when it could not be resolved.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).