Skip to main content
PATCH
Update an accounting dimension

Authorizations

X-API-Key
string
header
required

User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.

Headers

The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.

Pattern: ^le_[a-zA-Z0-9]+$

Path Parameters

dimensionKey
string
required

A dimension key from GET /v2/accounting/dimensions.

Body

application/json

Switch a dimension on or off for coding, rename it, or set the value new entries are coded with. Provide any combination of enabled, name and defaultValueId; omitted fields keep their current value.

connectionId
string

The connection the dimension belongs to. Optional when the legal entity has exactly one connection; required when it has several.

Example:

"accounting_connection_2rj4l7hmrrrcv"

enabled
boolean

Whether line items can be coded on this dimension. required dimensions cannot be disabled.

name
string

New display name, shown in the dashboard. required dimensions and account cannot be renamed, and Account is reserved as a name.

Required string length: 1 - 100
Example:

"Cost Center"

defaultValueId
string | null

The value entries are coded with when nothing else applies, or null to stop defaulting. Must be an enabled value of this dimension; disabling that value later clears the default. custom_field dimensions take no default.

Required string length: 1 - 255
Example:

"accounting_class_2rj4l7hmrrrcv"

Response

The dimension as updated.

One axis a line item can be coded on: the general-ledger account, a vendor, a class, a custom field, and so on. Which dimensions exist depends on the connection's platform and settings. Every dimension has values, listed at GET /v2/accounting/dimensions/{dimensionKey}/values.

key
string
required

Stable identifier used in every other accounting endpoint. Platform dimensions use fixed keys (account, vendor, customer, class, department, location, project, subsidiary); custom fields use customField: followed by the field's key; generic dimensions use the key defined on the connection.

Example:

"account"

connectionId
string
required

The connection this dimension belongs to.

Example:

"accounting_connection_2rj4l7hmrrrcv"

name
string
required

Display name shown in the dashboard.

Example:

"Account"

type
enum<string>
required

platform dimensions are the platform's own objects and their values carry that object's id prefix (accounting_account_, accounting_vendor_, ...). generic dimensions are stored on the connection itself and their values use the acc_dim_val_ prefix. custom_field dimensions are platform custom fields exposed through the same interface; their values are the field's options, each identified by the option value itself.

Available options:
platform,
generic,
custom_field
required
boolean
required

Every editable line item must carry a value for this dimension before the entry can sync.

mappable
boolean
required

Whether accounting rules can set this dimension automatically.

enabled
boolean
required

Whether the dimension is switched on for coding. Disabled dimensions are still listed so you can recognize keys that appear on older entries.

parentKey
string

Key of the dimension whose value narrows this one, when the platform nests dimensions (for example cost_code under project on Procore). Values can then be filtered by parentValueId. Hierarchies inside a single dimension, such as sub-accounts or sub-classes, are not nesting: those values report their parent in metadata.parentExternalId.

Example:

"project"

defaultValueId
string

The value new line items receive when none is provided.

Example:

"accounting_account_2rj4l7hmrrrcv"

customField
object

Present on custom_field dimensions. Custom fields are not coded with value ids: their raw values live in customFields on the entry (for entry level fields) or on each line item (for line_item level fields), keyed by fieldKey. select and multiselect fields list their allowed options as this dimension's values.