e-copedia hjælpecenter
Working with Dimensions in e-conomic via the OpenAPI
Dimensions 101
Dimensions allow you to categorize financial data beyond the traditional chart of accounts.
By assigning dimensions to entries, invoice lines, and budget figures, you can segment financial data for reporting across departments.
This guide explains how dimensions are structured in e-conomic and how to work with them through the OpenAPI.
Package Requirements
Dimension functionality requires:
Package | Supported Dimensions |
Plus | One dimension |
Smart | One dimension |
Complete | Multiple dimensions |
The Plus and Smart packages support a single dimension layer.
The Complete package allows multiple dimension layers and more detailed dimensional accounting.
Keep in mind that support for multiple dimensions is currently only available through the OpenAPI.
Understanding Dimensions
A dimension consists of:
A Dimension or dimensionNumber
One or more dimensionValues or dimensionKeys
A dimensionNumber identifies the dimension layer.
You can only have up to 3 dimensionNumbers. (1 to 3)
Each dimension layer can contain multiple dimension values.
A dimension value is identified by dimensionKey.
Example:
dimensionNumber: 1
Dimension: Department
dimensionKey: 101
Dimension value: Sales
dimensionKey: 102
Dimension value: Marketing
dimensionKey: 103
Dimension value: FinanceAnother example:
dimensionNumber: 2
Dimension: Location
dimensionKey: 201
Dimension value: Copenhagen
dimensionKey: 202
Dimension value: AarhusWhen assigning dimensions to entries, invoice lines, or budget figures, the combination of dimensionNumber and dimensionKey determines which dimension value is applied.
Supported Resources for dimensions
Dimensions can currently be set for:
Accounts
Draft Entries
Booked Entries
Sales Invoice Lines
Budget Figures
Before dimensions can be assigned, the dimension and the relevant dimension values must already exist in e-conomic.
Obs
💡Adding dimensions to any resource must be done via a POST request. Doing a PUT request before the dimension property exists will return an error.
Updating Dimension Assignments
Dimension assignments can be updated using PUT requests.
When updating dimensions:
The dimension assignment must already exist.
The
dimensionNumbercannot be changed.Only the
dimensionKeyis updated.The current
objectVersionmust be supplied.
Example:
{
"dimensionNumber": 1,
"dimensionKey": 102,
"objectVersion":
"{objectVersion}"
}This changes the assigned dimension value on layer 1.
Example:
Before:
dimensionNumber: 1
dimensionKey: 101 (Sales)
After:
dimensionNumber: 1
dimensionKey: 102 (Marketing)Moving Between Dimension Layers
If dimension data needs to move from one dimension layer to another, a PUT request cannot be used.
Instead:
DELETE the existing added dimension.
POST a new dimensionKey on the desired dimensionNumber layer.
Example:
Current:
dimensionNumber: 1
dimensionKey: 101
Wanted:
dimensionNumber: 2
dimensionKey: 201Attempting to update a non-existing dimensionNumber will result in a 404 response because there is no existing object to update.
Object Versions
PUT requests require the latest objectVersion.
Before updating a dimension assignment:
Retrieve the current object via a GET request for the specific dimension resource
Read the current
objectVersion.Include that value in the PUT request.
Failure to use the latest version may cause the update to fail.
Obs
💡You can use the responseBody from the former GET request as a requestBody with objectVersion included as formatting is the same.