Update an accounting dimension

Changed on

Turn a dimension on or off, rename it, or set the default value new entries are coded with. Required dimensions can't be turned off, and neither they nor account can be renamed.

patch/v2/accounting/dimensions/{dimensionKey}

Request

  • Base URL
    https://api.slash.com
  • URL
    https://api.slash.com/v2/accounting/dimensions/{dimensionKey}
  • Auth
    API key in header X-API-Key

Request body

connectionIdstring

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

enabledboolean

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

namestring

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

defaultValueIdstring nullable

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.

Example request

{
  "connectionId": "accounting_connection_2rj4l7hmrrrcv",
  "name": "Cost Center",
  "defaultValueId": "accounting_class_2rj4l7hmrrrcv"
}

Response

The dimension as updated.

keystring 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.

connectionIdstring required

The connection this dimension belongs to.

namestring required

Display name shown in the dashboard.

type'platform' | 'generic' | 'custom_field' 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.

parentKeystring

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.

requiredboolean required

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

mappableboolean required

Whether accounting rules can set this dimension automatically.

enabledboolean required

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

defaultValueIdstring

The value new line items receive when none is provided.

Example response

{
  "key": "account",
  "connectionId": "accounting_connection_2rj4l7hmrrrcv",
  "name": "Account",
  "parentKey": "project",
  "defaultValueId": "accounting_account_2rj4l7hmrrrcv",
  "customField": {
    "fieldKey": "cf_cost_center"
  }
}

Changes