Use case
It may be desirable to track a single business transaction from a lot of different aspects at the same time by combining different kinds of dimensions and items.
In Procountor the amount of dimensions depends on the used Procountor’s contract / product type, the maximum amount of dimensions is six and the amount of items for one dimension is unlimited. The dimensions and items can be named freely. At the API interface, each dimension and item have a unique ID.
Used endpoints
GET /dimensions endpoint returns all dimensions and dimension items saved in Procountor.
[
{
"id": 87539,
"name": "Department",
"items": [
{
"id": 160823,
"codeName": "Sales"
},
{
"id": 160825,
"codeName": "Marketing"
}
]
},
{
"id": 87540,
"name": "Cost center",
"items": [
{
"id": 136933,
"codeName": "Lahti"
},
{
"id": 136934,
"codeName": "Lappeenranta"
}
]
}
]
The total sum of the items’ values (value) of one dimension (dimensionId) must be the same as the accounting value (accountingValue) of the transaction.
Example 1
In the following example, transaction’s accounting value is EUR –50. The transaction is allocated to the item “Sales” of the dimension ”Department” for the value of EUR -50 and an item “Lahti” of the dimension ”Cost center” for the value of EUR -50.
{
"id": 101490472,
"transactionId": 101490472,
"transactionType": "ENTRY",
"account": "3000",
"accountingValue": -50.00,
"vatPercent": 24.0000,
"description": "Transaction example",
"dimensionItemValues": [
{
"dimensionId": 87539,
"itemId": 160823,
"value": -50.0000
},
{
"dimensionId": 87540,
"itemId": 136933,
"value": -50.0000
}
]
}
Example 2
In the following example, the transaction is allocated to the item “Sales” of the dimension ”Department” for the value of EUR -20 and the remaining EUR –30 is allocated to a ”Marketing” item within the same ”Department” dimension. The transaction is also allocated to an item “Lahti” of the dimension ”Cost center” for the full value of EUR -50.
"dimensionItemValues": [
{
"dimensionId": 87539,
"itemId": 160823,
"value": -20.0000
},
{
"dimensionId": 87539,
"itemId": 160825,
"value": -30.0000
},
{
"dimensionId": 87540,
"itemId": 136933,
"value": -50.0000
}
]