AccountingReportPositions
This feature is currently under development and, although not available in the current version, its preliminary documentation is provided to give you a preview of the enhancements that will be included in an upcoming update.
HTTP | Operation | Type | Object | DTO Why-DTOs? |
---|---|---|---|---|
For a query, it returns a result already prepared by Sage Active, with no possibility to add filters, sorts, or explore the data further, or it executes an action (e.g., sending an email). For a mutation, it executes a specific business action, also carried out by Sage Active, which will impact the data (e.g., generating a credit note from an invoice). |
accountingReportPositions |
AccountingReportPositionGLDtoInput |
Description
Functionality
- Retrieve Account Positions: Returns the location of accounts in the balance sheet or Profit & Loss report.
- Legislation-Based Categorization: Account positioning depends on the applicable legislation and accounting model.
- Balance Type Consideration: Only accounts classified as Balance Sheet (1) or Profit & Loss (2) are included.
- Detailed or Summary View: Allows filtering results to include only summary lines or detailed lines.
- Account Filtering: Can return all accounts or a specific account based on
accountId
. - Multiple Position Handling: Identifies the main position of an account, supports alternative positions, and excludes details by default unless requested.
- Undefined Accounts: If an account is not found in the balance guide, it is labeled as “undefined”.
Input Parameters
-
Account Identifier (
accountId
) (Optional):
If provided, returns the positions for a specific account; otherwise, retrieves all accounts. -
Detail Filter (
isDetail
) (Boolean, Optional, Default:false
):false
: Returns only main balance guide positions.true
: Includes detailed positions where applicable.
Response
The service returns an array of AccountingReportPositionOutputGLDto
objects, each representing an account with the following fields:
- Account Details:
id
: Account idcode
: Account codedescription
: Account descriptionname
: Account nameaccountType
: Type of the account (e.g., Balance Sheet, Profit & Loss)subAccountType
: Subcategory of the accountaccountLevel
: Account hierarchy level
- Additional Properties:
deactivated
: Whether the account is deactivatedrequestedAction
: Indicates if any action is required on the accounttaxTreatmentId
: ID of the applicable tax treatmentdefaultType
: Default type of the accountdatevAutomaticAccount
: Whether the account is automatically managed in DATEVdatevAccountNumber
: The account number used in the DATEV systemcollectiveAccount
: Whether the account is collectiveapplyVat
: Whether VAT should be applied to the account
- Balance Position Information (
reportPositions
):balanceGuideLineId
: Unique identifier of the balance guide linebalanceGuideLineCode
: Code representing the balance guide linebalanceGuideLineDescription
: Description of the balance guide lineisDetail
: Indicates if the line is a detailed breakdown (true
= detailed)isMain
: Indicates if this is the main position of the account (true
= main position)alternativePositionIfNegative
: Indicates if the account has an alternative position when its balance is negative
How to use the Accounting Report Positions service?
Example GraphQL Query
- Here, an account ID is provided, so the request retrieves the positions for this specific account. If no ID were mentioned, the response would include positions for all accounts.
- Here, isDetail = true, meaning that if the account has multiple positions, all details for each position are included.
If isDetail = false, only the first position would be returned.
query($input: AccountingReportPositionGLDtoInput!) {
accountingReportPositions(input: $input) {
id
code
description
accountType
accountLevel
subAccountType
taxTreatmentId
deactivated
collectiveAccount
datevAutomaticAccount
datevAccountNumber
applyVat
reportPositions {
balanceGuideLineId
balanceGuideLineCode
balanceGuideLineDescription
isDetail
isMain
alternativePositionIfNegative
}
}
}
Example GraphQL Variables
{
"input": {
"accountId": "57dc1e99-652e-48ca-b1ef-2e5b233e988d",
"isDetail": true
}
}
Example Response
{
"data": {
"accountingReportPositions": [
{
"id": "3cff68b5-e785-4b2b-95a6-1fae95af9f2c",
"code": "612200",
"description": "612200 - Redevance crédit-bail mobilier",
"accountType": "BALANCE_SHEET",
"accountLevel": "SUB_ACCOUNT",
"subAccountType": "CHARGE",
"taxTreatmentId": "40904303-5c02-4784-a505-9c0325b7a40f",
"deactivated": false,
"collectiveAccount": false,
"datevAutomaticAccount": false,
"datevAccountNumber": null,
"applyVat":false,
"reportPositions": [
{
"balanceGuideLineId": "e3e4fc20-bcb4-419c-bb09-b4ee39e61dac",
"balanceGuideLineCode": "C00203",
"balanceGuideLineDescription": "Autres achats et charges externes (1)",
"isDetail": false,
"isMain": false,
"alternativePositionIfNegative": false
},
{
"balanceGuideLineId": "ae51dc12-f108-41a6-9583-6b45b6979c40",
"balanceGuideLineCode": "C0020301",
"balanceGuideLineDescription": "Redevances de crédit-bail mobilier",
"isDetail": true,
"isMain": false,
"alternativePositionIfNegative": false
}
]
}
]
}
}
accountingReportPositions Input Parameters
Fields | Type | Description | Required |
---|---|---|---|
accountId | UUID | ID of the specific account to retrieve | No |
isDetail | Boolean | Whether to include detailed positions | No (Default: false ) |
accountingReportPositions Response
Fields | Type | Description |
---|---|---|
id |
UUID | AccountId |
code | String | Account code |
description | String | Account description |
name | String | Account name |
accountType |
|
Account type (e.g., Balance Sheet, P&L) |
accountLevel |
|
Account hierarchy level |
subAccountType |
|
Subcategory of the account |
taxTreatmentId | UUID | ID of the applicable tax treatment |
deactivated | Boolean | Whether the account is deactivated |
collectiveAccount | Boolean | Whether the account is collective |
datevAutomaticAccount | Boolean | Whether the account is automatically managed in DATEV |
datevAccountNumber | String | The account number used in the DATEV system |
applyVat | Boolean | Whether VAT should be applied to the account |
reportPositions | Array | List of positions where the account appears |
|
UUID | Unique identifier of the balance guide line |
|
String | Code representing the balance guide line |
|
String | Description of the balance guide line |
|
Boolean | Whether this is a detailed breakdown (true) |
|
Boolean | Whether this is the main position (true) |
|
Boolean | Whether there is an alternative position when negative |
Info
- isMain:
true
indicates the main position of the account. - alternativePositionIfNegative: If
true
, the account has a different position when the balance is negative.