Financial Transactions
Financial Transactions API Reference This page provides a comprehensive reference for all parameters, endpoints, and behaviors of the Financial Transactions API. Use this guide to understand request/response structures, validation rules, and integration best practices.
Purpose:
The Financial Transactions API manages individual financial transactions within ERPx. It is suited for transaction-based integrations where users expect either immediate validation errors or direct confirmation that posting was successful.
For high-volume imports or multiple transactions, use the Financial Transactions Batch API instead.
Base URL:/v1/financial-transactions
Authentication:
All APIs require a Client ID and Client Secret.
Refer to the global authentication documentation for details.
Supported Methods
| HTTP Method | Endpoint | Description | Limits & Notes |
|---|---|---|---|
| POST | /v1/financial-transactions | Creates a financial transaction based on a sent object. | Supports treatment codes 2, 4, and 5. Only 1 transaction per call. Max 500 transaction details (hard limit). |
| POST | /v1/financial-transactions-validate | Validates creation of a financial transaction without posting. | Supports treatment codes 2, 4, and 5. Only 1 transaction per call. Max 500 transaction details (hard limit). |
| GET | /v1/financial-transactions/account/{companyId}/{account}/{period} | Checks whether an account can be posted for a specific company and period | Use as a pre-validation step before posting or registering transactions. |
| GET | /v1/registered-financial-transactions/{transactionNumber} | Gets a registered financial transaction based on provided companyId and transaction number | Use to inquire about registered financial transactions not yet posted. |
| GET | /v1/objects/financial-transactions | Gets registered financial transactions that have not been posted yet. | For more information, refer to Ontology. |
| GET | /v2/objects/general-ledger-transactions | Gets financial transactions that have already been posted. | This endpoint supports standard query operations. For complete details on filtering, sorting, pagination and other query capabilities, refer to the Object API section. |
Swagger / Schema
Version v1
Version v2
Version v1
Method Details
Sample Request
{
"companyId": "EN",
"period": 202602,
"transactionDate": "2026-02-17",
"transactionType": "IO",
"externalReference": "Trans NNN from external system YYY",
"invoice": {
"invoiceNumber": "Inv001",
"supplierId": "1000",
"dueDate": "2026-03-19T13:25:36.524Z",
"discountDate": "2026-02-27T13:25:36.524Z",
"discountPercentage": 1.00,
"discountCurrencyAmount": 1.23,
"paymentMethod": "CH",
"paymentCurrency": "GBP",
"creditTerms": "32"
},
"details": [
{
"accountingInformation": {
"account": "2010",
"analyticalInformation": [
{
"id": "C1",
"value": "110"
}
]
},
"description": "Supplier transaction",
"valueDate": "2026-02-17",
"amounts": {
"currencyAmount": -123.00,
"currencyCode": "GBP"
}
},
{
"accountingInformation": {
"account": "4010",
"analyticalInformation": [
{
"id": "C1",
"value": "120"
}
]
},
"description": "Supplier transaction",
"valueDate": "2026-02-17",
"amounts": {
"currencyAmount": 100,
"currencyCode": "GBP"
},
"taxInformation": {
"taxCode": "1N"
}
}
]
}
Default Values
Acrtrans fields autocompletion
The following fields in the arctrans table will be auto-completed by the API:
*** The value used for a client will always be the value set in the companyId
account: This field is auto-completed as follows:
When the supplierId is provided and Line Type AP is provided but account is empty, account is auto-completed with the account assigned to Supplier Group for given Supplier.
When the customerId is provided and Line Type AR is provided but account is empty, account is auto-completed with the account assigned to Customer Group for given Customer.
Account for GL line is never autocompleted and needs to be provided.
apar_id: If a PaymentInformation Data Transfer Object (DTO) is provided, the value for this field is taken from the transaction line referred to by the parameters within Payment Information (Customer or Supplier ID).
apar_name: This field is auto-completed with a Supplier name from the Supplier master file.
apar_type: The value for this field depends on the information provided in the JSON format.
- If Invoice DTO information is provided, it will be:
a. ‘P’ when the supplierId is provided.
b. ‘R’ when the customerId is provided. - If a PaymentInformation Data Transfer Object (DTO) is provided, it will be:
a. ‘P’ when the transaction line referred to by the parameters within Payment Information is related to a Supplier.
b. ‘R’ when the transaction line referred to by the parameters within Payment Information is related to a Customer.
- If Invoice DTO information is provided, it will be:
a. ‘P’ when the supplierId is provided.
arrival_date: If no value is set for it, this field will be auto-completed with the UpdatedAt value and then converted to Time Zone which is set in Company Information.
arrive_id: If no value is set for it, this field will be auto-completed with the Transaction Number value. However, in case of Registration of GL transactions, this auto-completion will be the standard behaviour and the field will be read-only.
collection: This field is auto-completed in taxes lines. The value for this field depends on the taxCode setup.
- Value will be 0 when Cash Principle flag is not selected.
- Value will be 1 when Cash Principle flag is selected.
ext_ref: This field is auto-completed with the externalReference value provided at the Transaction level of the JSON request. The value is populated in all rows, including generated Tax rows. This field is used to pass on external references with financial transactions posted based on integrations/interfaces from external systems.
factor_short: This field is auto-completed for AP/AR rows as follows (it will not be auto-completed on Secondary open items):
When the supplierId is provided, factor_short is auto-completed with the payment recipient assigned to the supplier in the Supplier master file.
When the customerId is provided, factor_short is auto-completed with the payment recipient assigned to the customer in the Customer master file.
fiscal_year: The fiscal_year for the selected acc_period and period_id = GL, extracted from the acrperiod table.
last_update: Date on which the API was called
line_type: If no value is set for it, this field will be auto-completed based on account.
pay_currency: This field is auto-completed as follows:
When the supplierId is provided, pay_currency is auto-completed with the same value as currency on AP line.
When the customerId is provided, pay_currency is auto-completed with the same value as currency on AR line.
pay_flag: The value for this field depends on the information in each Detail DTO provided in the JSON format.
- Value will be 0 when no PaymentInformation DTO is provided.
- Value will be 1 when a PaymentInformation DTO is provided.
pay_method: This field is auto-completed as follows:
For AP/AR rows:
When the supplierId is provided for the invoice, pay_method is auto-completed with the payment method assigned to the supplier in the Supplier master file.
When the customerId is provided for the invoice, pay_method is auto-completed with the payment method assigned to the customer in the Customer master file.
For secondary open item rows: When pay_method is not provided, it is auto-completed with the payment method assigned or auto-completed in the related AP row.
period: This field is auto-completed based on GL period assigned for given transaction date
reg_amount: This field is auto-completed with the cur_amount value.
sequence_no: This field is auto-completed following this logic:
Per Header (voucher_no), a consecutive number is assigned to each Transaction Detail. The first detail of each header is assigned number 1.
In SecondaryOpenItems, it takes the next value assigned to the Detail it corresponds to.
In TaxInformation rows, it takes the next value assigned to the Detail it corresponds to.
In TaxInformationDetail, it takes the next value assigned to the TaxInformation it corresponds to.
status: This field is auto-completed with the following values:
In Detail rows, ‘N’ is assigned for rows where the trans_type value is AP or AR. It is left empty for rows where the trans_type value is GL.
In TaxInformation rows, this field is always assigned the value ‘X’.
tax_seq_ref: This field is auto-completed with the following values:
In Detail rows, the value is -1.
In TaxInformation and TaxInformationDetail rows, this field takes the same value as the sequence_no of its parent row.
terms_id: This field is auto-completed as follows:
When the supplierId is provided, terms_id is auto-completed with the payment term assigned to the supplier in the Supplier master file.
When the customerId is provided, terms_id is auto-completed with the payment term assigned to the customer in the Customer master file.
trans_date: The same value as the voucher_date field
trans_id: If this value is provided in the PostingCycle field of the JSON format, it is directly assigned. Otherwise, the API selects one of the following values from the acrtransgr table:
The oldest trans_id for the selected vouch_series (trans_type) and period with status N or P. If not found, the API selects...
The trans_id for the selected vouch_series and fiscal_year. If not found, the API selects...
The trans_id for the selected vouch_series and fiscal_year 0. If not found, the field is left empty.
trans_type: In general, this field takes the account_type for the selected account and period, extracted from the aglaccounts table. In TaxInformation rows, it takes the value ‘TX’, except when linked to an exempt-type tax system, in which case it takes the value ‘TE’.
user_id: User ID of the currently logged-in API user.
unro_amount: The same value as the amount field.
unro_cur_amount: The same value as the cur_amount field.
vat_reg_no: This field is auto-completed as follows:
When supplierId is provided, vat_reg_no is auto-completed in tax lines (trans_type = TX) with the VAT registration number assigned to the supplier in the Supplier master file.
When customerId is provided, vat_reg_no is auto-completed in tax lines (trans_type = TX) with the VAT registration number assigned to the customer in the Customer master file.
voucher_no: The next available value in counter for the selected posting cycle (trans_id), extracted from the acrperiod table.
Analytical Information
In this section, you can find how the autocomplete of Analytical Information is carried out for all the categories defined in the Account rule and not sent in the DTO.
The Analytical Information DTO, which is an array, can be completed with all the analytical details (Dimension 1 to 7 and Dimension Values 1 to 7).
The Account rule allows you to autocomplete these values in three ways:
- Through the value of an attribute that is also an owner of another attribute. For example, if we have an Account rule where Cost Center (Category 1) is the owner of Project (Category 2), then the value of the first attribute is completed depending on the value entered in the second attribute.
- Through a defined Value Matrix where one or more attributes (up to 4) can be combined to get the value of another attribute.
- Through a default value.
The attribute values are always auto-completed (if applicable), regardless of the values in the User input field in the Account rule window. However:
- If the User input value is Optional - The user can set a different value. Empty is a valid value.
- If the User input value is Mandatory - The user can set a different value except for Empty.
- If the User input value is Fixed - The user cannot set a different value.
- If the User input is No check - The user can send any value even though it does not exist in the database as a valid attribute value. However, the value cannot exceed the length and it must be aligned with the type (numeric/alphanumeric) of the attribute definition.
We take into account the following information in the calculations:
- Attributes:
| ID | Attribute | Description | Owner | Type | Field | Length | Maintenance | P | M | W | DATES |
|---|---|---|---|---|---|---|---|---|---|---|---|
| API2 | OFFICE | Office | COMPANY | Alphanumeric | Cat4 | 12 | Manual | X | |||
| API3 | BUILDING | Building | Alphanumeric | Cat5 | 12 | Manual | X | ||||
| C1 | COSTC | Cost centre | COSTC | Alphanumeric | Cat1 | 12 | Manual | X | X | X | X |
| B0 | PROJECT | Project code | Alphanumeric | Cat2 | 12 | Automatic | X | X | |||
| NB | COMPANY | InterCompany Company | Alphanumeric | Cat7 | 2 | Manual | X | ||||
| ZAPI | OFICINILLA | Oficinilla | PROJECT | Alphanumeric | Cat4 | 12 | Manual | X | |||
| VR5 | NUMERIC TEST | Numeric test | Numeric | Cat6 | 12 | Manual | X |
- Project 1000 - Relation group:
| Relation | Relation value | Description | Units |
|---|---|---|---|
| Cost centre (COSTC) | 210 | Direct sales | |
| Project code (PROJECT) | 1000 | Project 1000 | |
| Project type (PRO.TYPE) | RD | Research and development | |
| Resource (RESNO) | 87010102 | Wendy jo Althrope | Amount/H |
- Attribute values - OFFICE:
| Attribute value | Description | Company | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| BRISTOL | BRISTOL | EN | 0 | 0 | 209999 | Active |
| LEEDS | LEEDS | EN | 0 | 0 | 209999 | Active |
| LONDON | LONDON | EN | 0 | 0 | 209999 | Active |
| MALMO | MALMO | SE | 0 | 0 | 209999 | Active |
| STOCKHOLM | STOCKHOLM | SE | 0 | 0 | 209999 | Active |
| YORK | YORK | EN | 0 | 0 | 209999 | Active |
- Attribute values - COMPANY:
| Attribute value | Description | Owner | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| EN | Agresso Demo | 0 | 0 | 209999 | Active | |
| NO | Agresso Demo AS (Norway) | 0 | 0 | 209999 | Active | |
| SE | Agresso Demo AS (Sweden) | 0 | 0 | 209999 | Active |
- Attribute values - COSTC:
| Attribute value | Description | Owner | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| 110 | Management | 0 | 199401 | 209999 | Active | |
| 210 | Direct Sales | 0 | 0 | 209999 | Active |
- Attribute values - PROJECT:
| Attribute value | Description | COSTC | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| 1000 | Project 1000 | 210 | 0 | 199807 | 209999 | Active |
- Attribute values - OFICINILLA:
| Attribute value | Description | Project | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| OFFICEA | A | 1000 | 0 | 0 | 209999 | Active |
| OFFICEB | B | 1200 | 0 | 0 | 209999 | Active |
- Attribute values - BUILDING:
| Attribute value | Description | Company | Value | Period from | Period to | Status |
|---|---|---|---|---|---|---|
| A | BUILDINGA | NO | 0 | 202001 | 202003 | Active |
| A | BUILDINGA | EN | 0 | 202004 | 209999 | Active |
| B | BUILDINGB | SE | 0 | 202001 | 209999 | Active |
- Chart of Accounts:
| Account | Description | Rule | Group | Period from | Period to | Type | Status |
|---|---|---|---|---|---|---|---|
| 1320 | Ingoing VAT | TAXES | 130 | 199401 | 209912 | General Ledger | Active |
| 1330 | Investment Duty | TAXES2 | 130 | 199901 | 209912 | General Ledger | Active |
| 1340 | Base Investment Duty | TAXES | 130 | 199901 | 209912 | General Ledger | Active |
| 2010 | Accounts Payable Domestic Suppliers | BALANCE/FINANCE | 200 | 199401 | 209912 | Accounts Payable | Active |
| 6210 | Rent | RENTALCOST | 620 | 200001 | 209912 | General Ledger | Active |
| 6250 | Electricity | DEPENDENCIES | 620 | 199901 | 209912 | General Ledger | Active |
| 6270 | Cleaning | OFFICECOST | 620 | 199901 | 209912 | General Ledger | Active |
| 6290 | Other Costs Premises | RENTALCOSTMATRIX | 620 | 199901 | 209912 | General Ledger | Active |
| 7000 | Travel Expenses | TRAVEL EXPENSES | 700 | 199401 | 209912 | General Ledger | Active |
- Account rule - OFFICECOST:
| OFFICECOST | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Mandatory | PROJECT | 100 | |
| Category 2 | PROJECT | Optional | |||
| Category 3 | Fixed | ||||
| Category 4 | OFFICE | Mandatory | MALMO | ||
| Category 5 | BUILDING | Fixed | B | ||
| Category 6 | Fixed | ||||
| Category 7 | COMPANY | Fixed | OFFICE | ||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Optional | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - BALANCE/FINANCE:
| BALANCE/FINANCE | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Optional | |||
| Category 2 | Fixed | ||||
| Category 3 | Fixed | ||||
| Category 4 | Fixed | ||||
| Category 5 | Fixed | ||||
| Category 6 | Fixed | ||||
| Category 7 | Fixed | ||||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Mandatory | 0 | ||
| Tax system | TAXCAT | Optional | |||
- Account rule - TAXES:
| TAXES | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Fixed | 110 | ||
| Category 2 | Fixed | ||||
| Category 3 | Fixed | ||||
| Category 4 | Fixed | ||||
| Category 5 | Fixed | ||||
| Category 6 | Fixed | ||||
| Category 7 | Fixed | ||||
| Currency | CURRENCY | Fixed | GBP | ||
| Tax code | TAXCODE | Fixed | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - DEPENDENCIES:
| DEPENDENCIES | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Mandatory | PROJECT | ||
| Category 2 | PROJECT | Mandatory | OFICINILLA | ||
| Category 3 | Fixed | ||||
| Category 4 | OFICINILLA | Mandatory | |||
| Category 5 | Fixed | ||||
| Category 6 | Fixed | ||||
| Category 7 | Fixed | ||||
| Currency | CURRENCY | Fixed | GBP | ||
| Tax code | TAXCODE | Fixed | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - RENTALCOST:
| RENTALCOST | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Optional | PROJECT | ||
| Category 2 | PROJECT | Optional | 1000 | ||
| Category 3 | Fixed | ||||
| Category 4 | Fixed | ||||
| Category 5 | BUILDING | No check | A | ||
| Category 6 | Fixed | ||||
| Category 7 | COMPANY | No check | BUILDING | ||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Optional | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - TAXES2:
| TAXES2 | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Optional | |||
| Category 2 | PROJECT | No check | |||
| Category 3 | Fixed | ||||
| Category 4 | Fixed | ||||
| Category 5 | Fixed | ||||
| Category 6 | Fixed | ||||
| Category 7 | Fixed | ||||
| Currency | CURRENCY | Fixed | GBP | ||
| Tax code | TAXCODE | Fixed | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - RENTALCOSTMATRIX:
| RENTALCOSTMATRIX | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Mandatory | COMPLETECOSTCENTER | ||
| Category 2 | PROJECT | Optional | |||
| Category 3 | Fixed | ||||
| Category 4 | Fixed | ||||
| Category 5 | BUILDING | Optional | |||
| Category 6 | Fixed | ||||
| Category 7 | COMPANY | Optional | |||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Optional | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Account rule - TRAVEL EXPENSES:
| TRAVEL EXPENSES | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | No check | |||
| Category 2 | PROJECT | No check | |||
| Category 3 | RESNO | No check | |||
| Category 4 | WORKORD | No check | |||
| Category 5 | ACTIVITY | No check | |||
| Category 6 | NUMERIC TEST | No check | |||
| Category 7 | |||||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Optional | 0 | ||
| Tax system | TAXCAT | Optional | |||
| Factor VAT | FACTOR_VAT | Optional |
- Tax Code 1X:
| Tax Code | Account | VAT percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date to |
|---|---|---|---|---|---|---|---|
| 1X | 1320 | 23 | True | 100 | 1380 | 2000-01-01 | 2019-12-31 |
| 1X | 1320 | 23 | 40 | 1340 | 2020-01-01 | 2099-12-31 |
- Value matrix - COMPLETECOSTCENTER:
| Source Attribute 1 | Source Attribute 2 | Destination Attribute 1 |
|---|---|---|
| PROJECT | BUILDING | COSTC |
Matrix Rows
| Project code | BUILDING | Cost centre |
|---|---|---|
| 1000 | A | 110 |
| 1000 | A | 310 |
| 1000 | B | 210 |
Value matrix
| Attribute | Attribute value | From | To |
|---|---|---|---|
| Project code | 1000 | 1000 | 1000 |
| BUILDING | B | A | A |
| Cost centre | Status | Period from | Period to |
|---|---|---|---|
| 110 | Active | 199901 | 202001 |
| 310 | Active | 202002 | 209999 |
| Attribute | Attribute value | From | To |
|---|---|---|---|
| Project code | 1000 | 1000 | 19999 |
| BUILDING | B | B | B |
| Cost centre | Status | Period from | Period to |
|---|---|---|---|
| 210 | Active | 202001 | 209999 |
Based on the information mentioned above, the Analytical Information will be autocompleted as the following scenarios show.
Scenario 1: Autocomplete Analytical Information in a simple AP invoice without taxes. Value for a mandatory attribute with a default value is sent in JSON.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Id Value Amount Currency amount GL 6270 API2 LEEDS B0 1000 1000 1000 AP 2010 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6270 C1 B0 API2 API3 NB 210 1000 LEEDS B EN 2010 C1
Scenario 2: Autocomplete Analytical Information in a simple AP invoice without taxes. The value of a mandatory attribute with an auto-completion is sent in JSON.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Amount Currency amount GL 6270 C1 110 1000 1000 AP 2010 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6270 C1 B0 API2 API3 NB 110 MALMO B SE 2010 C1
Scenario 3: Autocomplete Analytical Information in an AP invoice with taxes and a child GL row.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Amount Currency amount GL 6270 C1 110 1230 1230 AP 2010 -1230 -1230 AND tax Information is given
Tax point date Tax code 2020-04-01 1X WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6270 C1 B0 API2 API3 NB 210 1000 MALMO B SE 1320 C1 110 1340 C1 110 2010 C1
Scenario 4: Autocomplete Analytical Information in a simple AP invoice without taxes where there are dependencies between attributes in the Account rule.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Amount Currency amount GL 6250 ZAPI OFFICEA 1230 1230 AP 2010 -1230 -1230 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6250 C1 B0 ZAPI 210 1000 OFFICEA 2010 C1
Scenario 5: Autocomplete Analytical Information in a simple AP invoice without taxes where attribute values are **Optional** and **No check**. One of the attributes has been set to empty.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Id Value Amount Currency amount GL 6210 C1 B0 1000 1000 AP 2010 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6210 C1 B0 API3 NB 1000 A EN 2010
Scenario 6: Autocomplete Analytical Information in an AP invoice with taxes and a child GL row. Some values set to empty.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line type Account Id Value Id Value Amount Currency amount GL 6210 C1 110 B0 1000 1000 AP 2010 -1230 -1230 AND tax Information is given
Tax point date Tax code 2020-04-01 1X WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6210 C1 B0 API3 NB 110 A EN 1320 C1 B0 API3 AG 110 A CONTRACT1 1330 C1 B0 AG 110 CONTRACT1 2010
Scenario 7: Autocomplete Analytical Information in a simple AP invoice without taxes where User input is either Optional or No check. The value of the No check attribute does not exist.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line Type Account Id Value Id Value Id Value Amount Currency amount GL 6210 C1 B0 1000 API3 HOME 1000 1000 AP 2010 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6210 C1 B0 API3 NB 210 1000 HOME 2010
Scenario 8: Autocomplete Analytical Information in a simple AP invoice without taxes where one of the attributes is to be autocompleted through a value matrix and a valid value can be found in a range of attribute values.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transaction API with a POST endpoint that can autocomplete the analytical dimension where possible
AND a transaction document is sent, with the following information:
Line Type Account Id Value Id Value Id Value Amount Currency amount GL 6290 B0 1000 API3 B 1000 1000 AP 2010 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the Analytical Information is autocompleted as follows:
Account Att Id 1 Att Id 2 Att Id 3 Att Id 4 Att Id 5 Att Id 6 Att Id 7 Dim 1 Dim 2 Dim 3 Dim 4 Dim 5 Dim 6 Dim 7 6290 C1 B0 API3 NB 210 1200 B EN 2010
Currency Code
In this section, you can find how to autocomplete the Currency code.
User input of Currency code in the account rule can be Mandatory or Fixed.
The field is optional in the DTO, but if the user doesn’t provide a value and the system is unable to auto-complete it, an error message is displayed.
The Currency code field can be autocompleted in the following way:
- For GL rows, the logic is the same as the one for autocompleting analyticalInformation.
- For AP/AR rows:
- If User input of the account rule is Fixed, the logic is the same as the one implemented for analyticalInformation.
- If User input of the account rule is Optional/Mandatory:
- We get the value from the Customer/Supplier information.
- If a value cannot be found in the Customer/Supplier information, we get it from the account rule.
- For the TX line, the value is inherited from the parent.
We take into account the following information in the calculations:
- Supplier 1001 - INVOICE
Currency Norwegian Kroner - NOK
- Attribute values - Company
Attribute value Description Owner Value Period from Period to Status EN ERP DEMO (EN) 0 0 209999 Active NO Agresso Demo AS (Norway) 0 0 209999 Active SE Agresso Demo AS (Sweden) 0 0 209999 Active
- Value matrix. COMPLETECURRENCY
Source Attribute 1 Source Attribute 2 Destination Attribute COMPANY COST CURRENCY
MATRIX ROWS
InterCompany Company Cost centre Currency Code EN 100 GBP NO 100 NOK NO 110 EUR SE 100 EUR SE 115 SEK
- Chart of accounts
Account Description Rule Group Period from Period to Type Status 6210 Rent RENTALCOST 620 200001 209912 General Ledger Active 2011 Accounts Payable International Suppliers Balance/Finance 200 199401 209912 Accounts Payable Active 1320 Ingoing VAT Balance/Finance 130 199401 209912 General Ledger Active
- Account rule. RENTALCOST
Attribute User input Auto-completion Default value Validation relation Account ACCOUNT Category 1 COSTC Mandatory Category 2 PROJECT Optional Category 3 Fixed Category 4 Fixed Category 5 Fixed Category 6 Fixed Category 7 COMPANY Mandatory Currency CURRENCY Fixed COMPLETECURRENCY GBP Tax code TAXCODE Fixed 0 Tax system TAXCAT Optional EX Factor VAT FACTOR_VAT Optional
- Account rule. Balance/Finance
Attribute User input Auto-completion Default value Validation relation Account ACCOUNT Category 1 COSTC Mandatory Category 2 Fixed Category 3 Fixed Category 4 Fixed Category 5 Fixed Category 6 Fixed Category 7 Fixed Currency CURRENCY Mandatory GBP Tax code TAXCODE Fixed 0 Tax system TAXCAT Optional Factor VAT FACTOR_VAT Optional
- Tax Code 1G defined in the database:
Tax Code Account Vat Percentage Net flag Reduction Non-recoverable VAT account Date from Date To 1G 1320 23 True 100 01-01-1992 12-31-2099
Based on the information mentioned above, Currency will be autocompleted as the following scenarios show.
Scenario 1. Autocomplete Currency in the two details of an AP/AR invoice
GIVEN that a Financial Transaction needs to be posted with the supplier 1001
AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6210 1000 1000 C1 100 NB NO AP 2011 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Currency 6210 1000 GL NOK 2011 -1000 AP NOK
Scenario 2. Autocomplete Currency in the two details of an AP/AR invoice triggering compute tax logic
GIVEN that a Financial Transaction needs to be posted with the supplier 1001
AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6210 1460 1230 C1 100 NB NO AP 2011 -1460 -1230 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Currency 6210 1460 GL NOK 2011 -1230 AP NOK 1320 -230 TX NOK
DueDate and DiscountDate
In this section you can find how to autocomplete the dueDate and discountDate fields.
For AP/AR lines
This autocompletion will only happen for transaction types whose treatment code is 1, 2 or 5.
As dueDate and discountDate are optional fields of Invoice DTO, the user may send them or not:
If the dueDate and discountDate values are sent by the user, the sent values are kept.
If the dueDate and/or discountDate are not sent but creditTerms is set (the user sent it or API autocompleted it), dueDate and/or discountDate is autocompleted as explained below.
The calculation of dueDate and discountDate is done according to the creditTerms configuration. The logic already implemented in UBW is directly used by API. Check documentation of UBW for more details.
This calculation logic uses a referenceDate to determine the final dueDate and discountDate values.
API determines the referenceDate value as a replication of UBW logic:
In case of AR line, referenceDate is always transactionDate.
In case of AP line, referenceDate is set according to the DUE_DATE_AP system parameter as follows:
a. If parameter is Active and has value “2”, referenceDate is set to valueDate (from AP line)
b. If parameter is Active and has value “3”, referenceDate is set to registeredDate.
c. For any other parameter configuration, referenceDate is set to transactionDate.
For secondary open item lines
When dueDate is not provided, it is auto-completed with the due date assigned to the related AP row.
Tax Code, Tax System, Factor VAT
In this section, you can find how to autocomplete Tax system, Tax code and Factor VAT.
User input of Tax code in the account rule can be Mandatory or Fixed.
The field is optional in the DTO, but if the user doesn’t provide a value and the system is unable to auto-complete it, an error message is displayed.
User input of Tax system in the account rule can be Optional, Mandatory, or Fixed.
The field is optional in the DTO. An empty value is valid when User input is Optional in the account rule.
The Tax code and Tax system fields are auto-completed in the detail line as follows:
- For GL rows, the logic is the same as the one for auto-completing analyticalInformation through the account rule.
- For AP/AR rows:
- If User input of the account rule is Fixed, the logic is the same as the one implemented for analyticalInformation.
- If User input of the account rule is Optional/Mandatory:
- The system takes values from the Customer/Supplier information. If the value of Tax system is Fixed and empty, it is also taken into account.
- If no values can be found in the Customer/Supplier information, they are taken from the account rule.
User input of Factor VAT can be Optional, Mandatory, or Fixed.
The field is optional in the DTO. An empty value is valid when User input is Optional in the account rule.
This field is auto-completed in the detail line as follows:
- For GL rows, the logic is the same as the one for auto-completing analyticalInformation through the account rule.
- For AP/AR rows:
- If User input of the account rule is Fixed, the logic is also the same as the one implemented for analyticalInformation.
- If User input of the account rule is Optional/Mandatory, values are taken from the account rule.
For TX lines, Tax System, Tax code and Factor VAT are auto-completed by copying them from the detail line. When the TX line generates a GL line, Tax code, Tax system and Factor VAT are set as empty.
We take into account the following information in the calculations:
- Supplier 1001 - INVOICE
Currency Tax code Tax system Norwegian Kroner - NOK Gross 23% - 1G
- Attribute values - Company
Attribute value Description Owner Value Period from Period to Status EN ERP DEMO (EN) 0 0 209999 Active NO Agresso Demo AS (Norway) 0 0 209999 Active
- Value matrix - COMPLETEFACTORVAT
Source Attribute 1 Source Attribute 2 Destination Attribute COMPANY COST FACTOR_VAT
MATRIX ROWS
InterCompany Company Cost centre Factor VAT EN 100 1C NO 100 1D
- Chart of accounts
Account Description Rule Group Period from Period to Type Status 6210 Rent RENTALCOST 620 200001 209912 General Ledger Active 6250 Electricity ELECTRICITYCOST 620 200001 209912 General Ledger Active 2011 Accounts Payable International Suppliers Balance/Finance 200 199401 209912 Accounts Payable Active 1320 Ingoing VAT Balance/Finance 130 199401 209912 General Ledger Active
- Account rule. RENTALCOST
Attribute User input Auto-completion Default value Validation relation Account ACCOUNT Category 1 COSTC Mandatory Category 2 PROJECT Optional Category 3 Fixed Category 4 Fixed Category 5 Fixed Category 6 Fixed Category 7 COMPANY Mandatory Currency CURRENCY Mandatory NOK Tax code TAXCODE Fixed 0 Tax system TAXCAT Optional EX Factor_VAT FACTOR_VAT Optional
- Account rule. ELECTRICITYCOST
Attribute User input Auto-completion Default value Validation relation Account ACCOUNT Category 1 COSTC Mandatory Category 2 PROJECT Optional Category 3 Fixed Category 4 Fixed Category 5 Fixed Category 6 Fixed Category 7 COMPANY Mandatory Currency CURRENCY Mandatory NOK Tax code TAXCODE Fixed 0 Tax system TAXCAT Optional Factor_VAT FACTOR_VAT Mandatory COMPLETEFACTORVAT
- Account rule. Balance/Finance
Attribute User input Auto-completion Default value Validation relation Account ACCOUNT Category 1 COSTC Optional Category 2 Fixed Category 3 Fixed Category 4 Fixed Category 5 Fixed Category 6 Fixed Category 7 Fixed Currency CURRENCY Mandatory NOK Tax code TAXCODE Mandatory 0 Tax system TAXCAT Optional FACTOR_VAT FACTOR_VAT Optional
- Tax Code 1G defined in the database:
Tax Code Account Vat Percentage Net flag Reduction Non-recoverable VAT account Date from Date To 1G 1320 23 True 100 01-01-1992 12-31-2099
Based on the information mentioned above, taxCode, Tax system, and Factor VAT will be auto-completed as the following scenarios show.
Scenario 1. Autocomplete Tax system, Tax code, and Factor VAT in the two details of an AP/AR invoice
GIVEN that a Financial Transaction needs to be posted with the supplier 1001
AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6210 1000 1000 C1 100 NB NO AP 2011 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Tax code Tax system Reduction code 6210 1000 GL 0 EX 2011 -1000 AP 0
Scenario 2. Keep values sent by the user and auto-complete where there is no value set for taxCode, Tax system, and Factor VAT
GIVEN that a Financial Transaction needs to be posted with the supplier 1001 AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6210 1000 1000 C1 100 NB NO AP 2011 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Tax code Tax system Reduction code 6210 1000 GL 0 0 2011 -1000 AP 0 0
Scenario 3. Autocomplete Tax code, Tax system, and Factor VAT in the two details of an AP/AR invoice triggering compute tax logic
GIVEN that a Financial Transaction needs to be posted with the supplier 1001
AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6210 1460 1230 C1 100 NB NO AP 2011 -1460 -1230 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Tax code Tax system Reduction code 6210 1460 GL 0 2011 1230 AP 1G 1320 -230 TX 1G
Scenario 4. Autocomplete Currency, Tax system, Tax code, and Factor VAT in the two details of an AP/AR invoice
GIVEN that a Financial Transaction needs to be posted with the supplier 1001
AND a Financial Transaction API with a POST endpoint that can autocomplete the currency where possible
AND a transaction document is sent, with the following information:
Line Type Account Amount Currency amount ID Value ID Value GL 6250 1000 1000 C1 100 NB NO AP 2011 -1000 -1000 WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information is autocompleted as follows:
Account Amount Transaction type Tax code Tax system Reduction code 6250 1000 GL 0 0 1D 2011 -1000 AP 0
DiscountPercentage and DiscountCurrencyAmount
In this section, you can find how to autocomplete the discountPercentage and discountCurrencyAmount fields.
This autocompletion will only happen for transaction types whose treatment code is 1, 2 or 5.
As discountPercentage and discountCurrencyAmount are optional fields in the Invoice DTO, the user may send them or not.
The CALC_PAY_DISC_AP/AR system parameter is considered in the discountCurrencyAmount auto-completion with the following settings:
- When parameter is Not Active, the discountPercentage is applied to the currencyAmount of the AP/AR row.
- When parameter is Active with value “0” or “1”, the calculation depends on the “Payment discount on tax” flag in the supplier/customer information:
- If it is selected, the discountPercentage is applied to the SUM of currencyAmount of all GL and taxes rows.
- If it is not selected, the discountPercentage is applied to the SUM of currencyAmount of all GL rows.
See validations on discountCurrencyAmount field: Scenario_136, Scenario_137 and Scenario_138.
There may be accounts set as excluded from the payment discount calculation. The following scenarios are possible:
If the discountPercentage and discountCurrencyAmount values are sent by the user:
- The discountPercentage is ALWAYS kept.
- The discountCurrencyAmount is ALWAYS kept.
If only the discountPercentage value is sent by the user:
- The discountPercentage is ALWAYS kept.
- The discountCurrencyAmount is calculated based on the setup of the CALC_PAY_DISC_AP/AR system parameter and the “Payment discount on tax” flag in the supplier/customer information.
If only the discountCurrencyAmount value is sent by the user:
- The discountPercentage is autocompleted based on the creditTerm definition.
- The discountCurrencyAmount is ALWAYS kept.
In this case, the discountPercentage and discountCurrencyAmount values may not be aligned.
If neither the discountPercentage nor the discountCurrencyAmount values are sent by the user:
- The discountPercentage is autocompleted based on the creditTerm definition. If no creditTerm is available, then, first, the creditTerm in the supplier/customer information will be autocompleted.
- The discountCurrencyAmount is calculated based on the setup of the CALC_PAY_DISC_AP/AR system parameter and the “Payment discount on tax” flag in the supplier/customer information.
Based on the information mentioned above, the DiscountPercentage and DiscountCurrencyAmount will be auto-completed as the following scenarios show.
- Supplier 10000 - INVOICE
Payment terms 11 (10 days - 1.5%)
- Credit term ID: 11
WHEN posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the information of the AP line is autocompleted as follows:
Due date Discount date Discount percentage Discount currency amount Credit terms 11/09/2020 11/09/2020 5 49.2 11
Originating user ID
User ID of the user who is logged in to the API.Debit/Credit sign
The debitCreditSign shown in the response is an auto-completed property. Any input provided in the request will be ignored by the Financial Transactions API.The Debit/Credit value is derived from the currencyAmount sign. The mapping logic is the following:
currencyAmount debitCreditSign > 0 1 < 0 -1 = 0 0
Calculations
Compute Tax
In this section, you can find how the Tax Transaction lines are generated depending on the data provided in the Tax Information section.
taxCode “0” represents no taxes, then this calculation will only happen for any taxCode other than “0”.
Take the following into consideration:
- All tax-related information is extracted from the combination of taxCode and Tax system, unless this information is explicitly given in the Tax Input section.
- The Tax point date is the date used to obtain valid values from taxCode or Factor VAT.
- The taxCode, Tax system, and Factor VAT fields from the detail line are copied to the line generated from the TX line. When the TX line generates a General Ledger line, taxCode is set to ‘0’, and Tax system and Factor VAT are set as empty.
We consider the following input:
- Tax Code 1E defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date To |
|---|---|---|---|---|---|---|---|
| 1E | 1321 | 23 | True | 100 | 2000-01-01 | 2020-03-31 | |
| 1E | 1321 | 23 | True | 100 | 1380 | 2020-04-01 | 2099-12-31 |
- Tax Code 1H defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date To |
|---|---|---|---|---|---|---|---|
| 1H | 1321 | 23 | True | 100 | 1380 | 2000-01-01 | 2020-01-31 |
| 1H | 1320 | 23 | True | 40 | 1340 | 2020-02-01 | 2099-12-31 |
- Tax Code 1N defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Date from | Date To |
|---|---|---|---|---|---|---|
| 1N | 1320 | 23 | True | 50 | 1993-01-01 | 2099-12-31 |
Tax Code 1C is defined as 1N (see above) but with Cash Principle flag selected
Tax Code 1S defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Date from | Date To |
|---|---|---|---|---|---|---|
| 1S | 1320 | 23 | True | 50 | 2019-01-01 | 2099-12-31 |
- Tax Code 1W defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date To |
|---|---|---|---|---|---|---|---|
| 1W | 1320 | 23 | True | 100 | 2019-01-01 | 2019-12-31 | |
| 1W | 1320 | 23 | True | 40 | 1340 | 2020-01-01 | 2099-12-31 |
- Tax Code 1X defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date To |
|---|---|---|---|---|---|---|---|
| 1X | 1320 | 23 | True | 100 | 1380 | 2000-01-01 | 2019-12-31 |
| 1X | 1320 | 23 | True | 40 | 1340 | 2020-01-01 | 2099-12-31 |
- Tax Code 1E defined in the database:
| Tax Code | Account | Vat Percentage | Net flag | Reduction | Non-recoverable VAT account | Date from | Date To |
|---|---|---|---|---|---|---|---|
| 1E | 1321 | 23 | True | 100 | 2000-01-01 | 2020-03-31 | |
| 1E | 1321 | 23 | True | 100 | 1380 | 2020-04-01 | 2099-12-31 |
- Tax System EX and ER defined in the database:
| Tax system | Exempt | Reduction | Vat Reverse Charge | Vat Reverse Account |
|---|---|---|---|---|
| EX | True | 100 | False | |
| ER | True | 100 | True | 1312 |
- Tax System PD80 defined in the database:
| Tax system | Reduction | Vat Reverse Charge | Vat Reverse Account |
|---|---|---|---|
| PD80 | 80 | False |
- Tax system REV defined in the database:
| Tax system | Reduction | Vat Reverse Charge | Vat Reverse Account |
|---|---|---|---|
| REV | 100 | True | 1312 |
- Factor VAT 1D defined in the database:
| FactorVat | Reduction | Date from | Date to |
|---|---|---|---|
| 1D | 75 | 2000-01-01 | 2099-12-31 |
| 1D | 60 | 1999-01-01 | 1999-12-31 |
- Undeclared VAT account is set in the company as 1345
- Undeclared VAT for AP transactions account is set in the company as 1310
- Undeclared VAT for AR transactions account is set in the company as 1330
Based on the information mentioned above, the Tax Transaction Line will be calculated as the following scenarios show.
Scenario 1. Compute Tax considering taxCode 1N and No Tax Input
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
| Line Type | Account | Amount | Currency amount | Tax point date | Tax code |
|---|---|---|---|---|---|
| GL | 6250 | 1000 | 1000 | 2019-05-05 | 1N |
| AP | 2010 | -1230 | -1230 |
BUT there is no Tax Input information
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base amount Orig Amount Orig Base Amount Tax Code Vat Percentage TX 1320 230 1000 230 1000 1N 23
Scenario 2. Compute Tax considering Tax Code 1N but with fixed Tax Amounts
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Tax code GL 6250 1000 1000 2019-05-05 1N AP 2010 -1230 -1230 AND Tax Input is given with fixed amount of 225.36
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base amount Orig Amount Orig Base Amount Tax Code Vat Percentage TX 1320 225.36 1000 225.36 1000 1N 23
Scenario 3. Compute Tax considering Tax Code 1N but with fixed Vat Percentage
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Tax code GL 6250 1000 1000 2019-05-05 1N AP 2010 -1230 -1230 AND Tax Input is given with fixed Vat Percentage of 20 %
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base amount Orig Amount Orig Base Amount Tax Code Vat Percentage TX 1320 200 1000 200 1000 1N 20
Scenario 4. Compute Tax considering Tax Code 1N and Factor Vat defined for the given Tax Point Date
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Tax code Factor Vat GL 6250 1000 1000 2019-05-05 1N 1D AP 2010 -1230 -1230 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Factor Vat Factor Vat Reduction Tax Code Tax Code Reduction Total Reduction TX 1320 172.50 750 230 1000 1D 75 1N 100 75 AND the amounts in GL line are modified as following to balance the transaction
Line Type Account Amount Factor Vat Code Tax Code GL 6250 1057.50 1D 1N
Scenario 5. Compute Tax considering Tax Code 1N and Factor Vat not defined for the given Tax Point Date
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Tax code Factor Vat GL 6250 1000 1000 1998-01-01 1N 1D AP 2010 -1230 -1230 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Factor Vat Factor Vat Reduction Tax Code Tax Code Reduction Total Reduction TX 1320 230 1000 230 1000 1D 100 1N 100 100 AND the amounts in GL line remain unmodified.
Scenario 6. Compute Tax considering Tax Code 1S and Tax System EF
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Tax Code Tax system GL 6520 1000 1000 2019-05-05 1S PD80 AP 2010 -1230 -1230 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Tax Code Tax Code Reduction Tax System Tax System Reduction Total Reduction TX 1320 92 400 230 1000 1S 50 PD80 80 40 AND the amounts in GL line are modified as following to balance the transaction
Line Type Account Amount Tax Code Tax system GL 6250 1138 1S PD80
Scenario 7. Compute Tax considering Tax Code 1S, Tax System PD80 and Factor Vat 1D
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
Line Type Account Amount Currency amount Tax point date Factor Vat Tax Code Tax system GL 6520 1000 1000 2019-05-05 1D 1S PD80 AP 2010 -1230 -1230 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Factor Vat Factor Vat Reduction Tax Code Reduction Tax Code Tax System Reduction Tax System Total Reduction TX 1320 172.50 750 230 1000 1D 75 1S 50 PD80 80 75 AND the amounts in GL line are modified as following to balance the transaction
Line Type Account Amount Factor Vat Tax Code Tax system GL 6250 1057.50 1D 1S PD80
Scenario 8: Compute Tax considering Tax Code 1W and Tax System PD80 with reductions. A "non-recoverable VAT account" cannot be found in the Tax Code definition
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system Date To GL 6520 1000 1000 2019-12-31 1W PD80 2019-12-31 AP 2010 -1230 -1230 2099-12-31 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Vat percentage Tax Code Tax System Reduction Is Vat Non Recoverable Tax sequence reference Sequence number TX 1320 184 800 230 1000 23 1W PD80 80 1 1 2 AND the amounts in GL line are modified as following to balance the transaction
Line Type Account Amount Currency amount Tax Code Tax system GL 6250 1046 1046 1W PD80
Scenario 9: Compute Tax considering Tax Code 1X, Tax System PD80 and Factor Vat 1D with reductions. A "non-recoverable VAT account" can be found in the Tax Code definition
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system Factor Vat GL 6520 1000 1000 2020-04-01 1X PD80 1D AP 2010 -1230 -1230 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Vat percentage Reduction code Tax Code Tax System Reduction Is Vat Non Recoverable Tax sequence reference Sequence number TX 1320 172.50 750 230 1000 23 1D 1X PD80 75 1 1 2 GL 1340 57.50 0 1 2 3 AND the amounts in GL line remain unmodified.
Scenario 10: Compute Tax considering tax system with reverse charge
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system GL 6520 1000 1000 2020-04-01 1E REV AP 2010 -1000 -1000 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Tax Code Vat Percentage Tax System Reduction Is Vat Non Recoverable Is Vat Reverse Charge Sequence Number Tax Sequence Reference TX 1321 230 1000 230 1000 1E 23 REV 100 0 1 2 1 GL 1312 -230 0 1 3 2 AND the amounts in GL line remain unmodified.
Scenario 11: Compute Tax considering tax system with reverse charge, non-recoverable vat on separate GL account and given vat percentage and vat amount in the tax input DTO
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system Factor Vat GL 6520 1000 1000 2020-04-01 1E REV 1D AP 2010 -1000 -1000 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Vat Percentage Vat reverse charge amount Vat reverse charge curr amount Reduction code Tax Code Tax System Reduction Is Vat Non Recoverable Is Vat Reverse Charge Sequence Number Tax Sequence Reference TX 1321 129.75 750 173 1000 17 173 173 1D 1E REV 75 1 1 2 1 GL 1380 43.25 0 1 3 2 GL 1312 -173 0 1 4 2 AND the amounts in GL line remain unmodified.
Scenario 12: Compute Tax on a Financial Transaction with basic tax code and Exempt tax system
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system GL 6520 1000 1000 2020-01-01 1H EX AP 2010 -1000 -1000 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Tax Code Vat Percentage Tax System Reduction Is Vat Non Recoverable Is Vat Reverse Charge Sequence Number Tax Sequence Reference Trans Type TX 1321 0 1000 0 1000 1H 23 EX 100 0 0 2 1 TE AND the amounts in GL line remain unmodified.
Scenario 13: Compute Tax on a Financial Transaction with non-deductible vat on a separate GL row, reverse charge and Exempt tax system
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, containing the information below
Line Type Account Amount Currency amount Tax point date Tax Code Tax system GL 6520 1000 1000 2020-01-01 1H ER AP 2010 -1000 -1000 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
Line Type Account Amount Base Amount Orig Amount Orig Base Amount Tax Code Vat Percentage Tax System Reduction Is Vat Non Recoverable Is Vat Reverse Charge Sequence Number Tax Sequence Reference Trans Type TX 1321 0 400 230 1000 1H 23 ER 40 1 1 2 1 TE AND the amounts in GL line remain unmodified.
Scenario 14. Compute Tax considering Tax Code 1C and No Tax Input
GIVEN that a Financial Transaction needs to be posted
AND split of undeclared VAT for AP and AR transactions is turned off AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
| Line Type | Account | Amount | Currency amount | Tax point date | Tax code |
|---|---|---|---|---|---|
| GL | 6250 | 1000 | 1000 | 2019-05-05 | 1C |
| AP | 2010 | -1230 | -1230 |
BUT there is no Tax Input information
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
| Line Type | Account | Collection | Amount | Base amount | Orig Amount | Orig Base Amount | Tax Code | Vat Percentage |
|---|---|---|---|---|---|---|---|---|
| TX | 1345 | 1 | 230 | 1000 | 230 | 1000 | 1C | 23 |
Scenario 15. Compute Tax considering Tax Code 1C and No Tax Input
GIVEN that a Financial Transaction needs to be posted
AND split of undeclared VAT for AP and AR transactions is turned on
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
| Line Type | Account | Amount | Currency amount | Tax point date | Tax code |
|---|---|---|---|---|---|
| GL | 6250 | 1000 | 1000 | 2019-05-05 | 1C |
| AP | 2010 | -1230 | -1230 |
BUT there is no Tax Input information
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
| Line Type | Account | Collection | Amount | Base amount | Orig Amount | Orig Base Amount | Tax Code | Vat Percentage |
|---|---|---|---|---|---|---|---|---|
| TX | 1310 | 1 | 230 | 1000 | 230 | 1000 | 1C | 23 |
Scenario 16. Compute Tax considering Tax Code 1C and No Tax Input
GIVEN that a Financial Transaction needs to be posted
AND split of undeclared VAT for AP and AR transactions is turned on AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent, with the following information
| Line Type | Account | Amount | Currency amount | Tax point date | Tax code |
|---|---|---|---|---|---|
| GL | 3016 | -1000 | -1000 | 2019-05-05 | 1C |
| AR | 1210 | 1230 | 1230 |
BUT there is no Tax Input information
WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction line is created with the following information:
| Line Type | Account | Collection | Amount | Base amount | Orig Amount | Orig Base Amount | Tax Code | Vat Percentage |
|---|---|---|---|---|---|---|---|---|
| TX | 1330 | 1 | -230 | -1000 | -230 | -1000 | 1C | 23 |
Computing amounts
In this section, you can find how the Financial Transactions API calculates Amount, Amounts3 and Amounts4 when the consumer of the API posts or registers transactions in multiple currencies without providing values for all of them.
The same calculation is used for Amount, Amounts3 and Amounts4 in the SecondaryOpenItems DTO.
This calculation is also used when the DTO is in taxTransactionLine, Base (Amount, Amount3, Amount4, Currency amount), Original (Amount, Amount3, Amount4, Currency amount), Original base (Amount, Amount3, Amount4, Currency amount) and Reverse charge (Amount, Amount3, Amount4, Currency amount).
The amount fields are nullable, meaning that:
- They can be included in JSON with a specific value.
- They can be included with value: NULL.
- They don’t have to be included in JSON.
The calculation of Amount, Amount3 and Amount4 is based on the values in Currency amount and Currency, when:
- The values are not set in the JSON file
or - They are set with value: NULL
and - They are defined in the Company information tab in U4ERP.
The calculation of the amounts is triggered after the tax has been calculated.
It has the following rules:
- It is always possible to find an exchange rate to calculate the different amounts that are defined for the company.
- In case taxTransactionLines are included in JSON, the amounts (Base amounts, Original base amounts, Amount…) in this DTO will always have the corresponding amounts in the parent details (that is: if we have Amount3, Base amount3, Original base amount3, etc. in the taxTransactionLine DTO, the parent details will also have the same values available).
The calculation takes into account the following information:
- Company information - Currency - EN
| Currency | Currency type | Balance | Maximum transaction diff | Difference account | Balance account | |
|---|---|---|---|---|---|---|
| AMOUNT | Sterling Pound (GB) | Daily rates | true | |||
| AMOUNT3 | Euro | Euro rates | 9998 | 9998 | ||
| AMOUNT4 | US Dollar | Rate in USD | 9998 |
- Currency codes
| Currency code | Description | Unit | Sort | Limit | Number of decimals | Bank |
|---|---|---|---|---|---|---|
| EUR | Euro | 1 | 1 | 0.00 | 4 | |
| USD | US Dollar | 1 | 1 | 0.00 | 1 | DNBUSD |
| GBP | Sterling Pound (GB) | 1 | 7 | 0.00 | 2 | NATWEST |
| NOK | Norwegian kroner | 1 | 20 | 0.00 | 2 | DNBNOK |
- Chart of accounts
| Account | Description | Rule | Group | Period from | Period to | Type | Status |
|---|---|---|---|---|---|---|---|
| 6250 | Electricity | Costs (20) | 620 | 199300 | 209912 | General Ledger | Active |
| 2010 | Accounts Payable Domestic Suppliers | Balance/Finance (10) | 200 | 199401 | 209912 | Accounts Payable | Active |
| 1320 | Ingoing VAT | Balance/Finance (10) | 130 | 199401 | 209912 | General Ledger | Active |
- Account rule Costs (20)
| RULE 20 COSTS | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Optional | COMP | 100 | |
| Category 2 | PROJECT | Optional | |||
| Category 3 | COMP | Optional | |||
| Category 4 | |||||
| Category 5 | |||||
| Category 6 | |||||
| Category 7 | |||||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Mandatory | 0 | ||
| Tax system | TAXCAT | Optional |
| AMOUNTS | |||||
|---|---|---|---|---|---|
| Amount | Mandatory | Exchange rates | Rate in GBP | Debit/Credit | Normal |
| Amount | Exchange rates | Euro rates |
| STATISTICAL VALUES | |||||
|---|---|---|---|---|---|
| Value text | APITEST | Show on invoice | True | Text on invoice | True |
- Account rule Balance/Finance (10)
| RULE 10 BALANCE/FINANCE | Attribute | User input | Auto-completion | Default value | Validation relation |
|---|---|---|---|---|---|
| Account | ACCOUNT | ||||
| Category 1 | COSTC | Optional | COMP | 100 | |
| Category 2 | |||||
| Category 3 | |||||
| Category 4 | |||||
| Category 5 | |||||
| Category 6 | |||||
| Category 7 | COMPANY | Optional | |||
| Currency | CURRENCY | Mandatory | GBP | ||
| Tax code | TAXCODE | Mandatory | 0 | ||
| Tax system | TAXCAT | Optional |
| AMOUNTS | |||||
|---|---|---|---|---|---|
| Amount | Mandatory | Exchange rates | Rate in GBP | Debit/Credit | Normal |
| Amount | Exchange rates | Euro rates |
| STATISTICAL VALUES | |||||
|---|---|---|---|---|---|
| Value text | Show on invoice | Text on invoice | True |
- Exchange rate entry Rate in GBP company EN
| Currency | Registered rate | Exchange rate | Date from | Date to | Direct/Indirect |
|---|---|---|---|---|---|
| NOK | 10 | 10 | 01-01-2020 | 12-31-2099 | Indirect |
- Exchange rate entry Euro rates company EN
| Currency | Registered rate | Exchange rate | Date from | Date to | Direct/Indirect |
|---|---|---|---|---|---|
| NOK | 8.7307 | 8.7307 | 27-01-2000 | 13-31-2099 | Indirect |
| SEK | 8.6151 | 0.08615 | 01-27-2000 | 12-31-2099 | Indirect |
- Exchange rate entry Rate in USD company EN
| Currency | Registered rate | Exchange rate | Date from | Date to | Direct/Indirect |
|---|---|---|---|---|---|
| NOK | 7.5205 | 7.5205 | 01-02-1900 | 13-31-2099 | Indirect |
| SEK | 8.1275 | 8.1275 | 01-02-1900 | 13-31-2099 | Direct |
- Tax code 1N defined in the database
| Tax code | Account | VAT percentage | Net flag | Reduction | Date from | Date to |
|---|---|---|---|---|---|---|
| 1N | 1320 | 23 | True | 100 | 01-01-1993 | 31-12-2099 |
- Factor VAT 1D defined in the database
| Factor VAT | Reduction | Date from | Date to |
|---|---|---|---|
| 1D | 75 | 01-04-2020 | 31-12-2099 |
The amounts are calculated according to the following scenarios.
Scenario 1. Compute *Amount* (with the *Indirect exchange rate*) and *Compute tax* (*Amount3* and *Amount4* are not to be calculated but set to 0). *Tax transaction line* is not provided and *Amount* is not set (so it needs to be calculated).
GIVEN that a Financial Transaction needs to be posted with amounts in different currencies
AND a Financial Transactions API with a POST endpoint that can calculate amounts in different currencies is available
AND a transaction document is sent
AND Tax Information is given
Tax point date Tax code 01/01/2020 1N AND one GL rows are given
Line type Account Currency Amount3 Amount4 Currency amount GL 6250 NOK 0 0 10000 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction lines are created with the following information
Line type Account Amount Value2 Value3 Currrency Amount Currency Exch Rate Exch Rate2 Exch Rate3 Base amount Base Currency Base value 2 Base value 3 Original base amount Original base curr Original base value 2 Original base value 3 Original amount Original curr amount Original Value 2 Original Value 3 GL 6250 1000,00 0,000 0,0 10000,00 NOK 0,10 0,0000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 AP 2010 -1230,00 0,000 0,0 -12300,00 NOK 0,10 0,0000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 TX 1320 230,00 0,000 0,0 2300,00 NOK 0,10 0,0000 0,0 1000,00 10000,00 0,000 0,0 1000,00 10000,00 0,000 0,0 230,00 2300,00 0,000 0,0
Scenario 2. Only Compute *Amount4* (Values for other amounts are set. *Currency type* to be checked in **Company information** tab). *Tax transaction line* is provided so compute tax logic is not triggered:
GIVEN that a Financial Transaction needs to be posted with amounts in different currencies
AND a Financial Transactions API with a POST endpoint that can calculate amounts in different currencies is available
AND a transaction document is sent
AND Tax Information is given
Tax point date Tax code Factor VAT 01/04/2020 1N 1D AND one GL rows are given
Line type Account Currency Amount Amount3 Currency amount GL 6250 SEK 1046.925 1163.25 10575 AND Tax transaction lines are given
Original base amount Original base amount3 Original base currency amount Base amount Base amount3 Base currency amount Amount Amount3 Currency amount Original amount Original amount3 Original currency amount 990 1100 10000 742.5 825 7500 170.775 189.75 1725 227.7 253 2300 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction lines are created with the following information
Line type Account Amount Value2 Value3 Currency amount Currency Exch rate Exch rate2 Exch rate3 Base amount base curr Base value 2 Base value 3 Orig base amount Orig base curr Orig base value 2 Orig base value 3 Orig amount Orig cur amount Orig value 2 Orig value 3 GL 6250 1046,93 1163,250 85949,20 10575,00 SEK 0,09900047 0,11000000 8,10000000 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 AP 2010 -1217,70 -1353,000 -99969,20 -12300,00 SEK 0,09900000 0,11000000 8,10000000 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 0,00 0,00 0,000 0,0 TX 1320 170,78 189,750 14020,10 1725,00 SEK 0,09900290 0,11000000 8,10000000 742,50 7500,00 825,000 60956,9 990,00 10000,00 1100,000 81275,8 227,70 2300,00 253,000 18693,4
Tax Summary
In this section you can find how to calculate the tax lines based on the input given in the “SummaryTaxInformation”.
The following rules apply:
‘Amounts’ or ‘VatPercentages’ set in the SummaryTaxInformation are to be used to create the Tax transaction lines (even though they are not aligned with values coming from Tax codes in U4ERP).
To calculate the amount of the Tax transaction lines, the amounts given in the SummaryTaxInformation are proportionally distributed among the amounts in each detail line per combination taxCode/taxSystem. This is done by multiplying the amount in each detail line by the amount in SummaryTaxInformation corresponding to that combination. Then this result is divided by the sum of the detail line amounts with that same taxCode/taxSystem combination. Any rounding differences are assigned to the detail line with the greatest Currency Amount.
In the example in Scenario 2, 35.2 is multiplied by 96, then this result is divided by 184 (the sum of the detail lines: 96 + 88). i Based on the information mentioned above, the Tax Transaction Line will be calculated as the following scenarios show.
Scenario 1. Posting a Financial Transaction given one set of SummaryTaxInformation with Vat Percentage and having two details with taxes.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent
AND a SummaryTaxInformation is given
Tax code Tax System Vat Percentage 1N EU 23.05 AND two GL rows are given
Line Type Account Amount Currency amount Tax Code Tax system GL 6520 480 600 1N EU GL 6520 320 400 1N EU WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction lines are created with the following information:
Line Type Account Amount Base Amount Currency Amount Base Currency Amount Tax Code Tax System Vat Percentage TX 1320 110.64 480 138.30 600 1N EU 23.05 TX 1320 73.76 320 92.20 400 1N EU 23.05
Scenario 2. Posting a Financial Transaction given two sets of SummaryTaxInformation with Vat percentage and Tax Amounts and having two details with taxes.
GIVEN that a Financial Transaction needs to be posted
AND a Financial Transactions API with a POST endpoint is available
AND a transaction document is sent
AND a SummaryTaxInformation is given
Tax code Tax Sytem Vat Percentage Amount Currency amount V5 EU 20 35.2 44 V6 5 7.75 9.69 AND five GL rows are given
Line Type Amount Currency amount Tax code Tax System GL 96 120 V5 EU GL 88 110 V5 EU GL 80 100 V6 GL 26.66 33.33 V6 GL 48.44 60.55 V6 WHEN the transaction is posted to the transaction resource in the API
THEN the transaction is posted and returns a 202 response (Accepted)
AND the tax transaction lines are created with the following information:
Line Type Account Amount Base Amount Currency Amount Base Currency Amount Tax Code Tax System Vat Percentage TX 1320 18.37 96 22.96 120 V5 EU 20 TX 1320 16.83 88 21.04 110 V5 EU 20 TX 1320 4.00 80 5.00 100 V6 5 TX 1320 1.33 26.66 1.67 33.33 V6 5 TX 1320 2.42 48.44 3.03 60.55 V6 5
Limits and Notes
Non-supported scenarios
- Import of large volume transactions. The API is not suited for creation of transaction with more than 500 details.
- Registration of financial transaction. Transaction types with treatment codes 1 and 10 are outside the supported scope.
- Payments and Prepayments transactions. The paymentInformation properties are not supported in the current release.
- Negative amounts in Debit/Credit accounting. The debitCreditSign property cannot be used in the request, any input will be ignored.
- Linked tax codes. Tax codes configured with ‘Transfer to’ information are not accepted.
- Tax systems defined with the option ‘VAT transactions’ are not accepted.
- Tax systems defined with the option ‘Base excluding discounts’ are not accepted.
- taxLineInfo is computed by the API, any input in the request will be ignored.
- Recurring journals are currently not supported.
- Data control functionality is not implemented in the API.
- Document archive functionality is not implemented in the API.
- Payment plans cannot be created or referenced by this API.
- The following Open item fields are not supported and cannot be posted by the API.
- Both Supplier Open item and Customer Open item related fields
- complaint date and complaint code.
- currency doc/1099 code and its description.
- collection agency, Case number and Collection status.
- Order ID and Line number.
- Supplier Open item related fields
- Contract ID.
- Customer Open item related fields
- Reminder level, Last reminded and Interest status.
- Interest and reminder rule.
- Both Supplier Open item and Customer Open item related fields
- The validation to ensure the currency amounts for a transaction are in balance (system parameter CURRENCY_BALANCE) is not implemented in the API.
Validation Rules for POST Method (Financial Transactions)
Scenario_000 - User not authorised
| Element | Details |
|---|---|
| Scenario ID | POST_000 |
| Scenario Name | User not authorised |
| HTTP Code | 403 |
| GIVEN | A transactions needs to be imported |
| WHEN | Calling the POST method |
| BUT | User does NOT have permissions |
| THEN | API is not reached; 403 Forbidden response is returned |
| Example Error Message | “User is not authorised.” |
Scenario_001 - Missing mandatory fields
| Element | Details |
|---|---|
| Scenario ID | Scenario_001 |
| Scenario Name | Missing mandatory fields |
| GIVEN | A financial transaction needs to be posted |
| WHEN | Calling POST /v1/financial-transactions |
| THEN | Validation outcome: Register transaction = Error; Post transaction = Error |
| HTTP Code (Post) | 422 |
| Applicability | Applicable to POST /v1/financial-transactions |
Scenario_002 - Incorrect format or value of fields
| Element | Details |
|---|---|
| Scenario ID | Scenario_002 |
| Scenario Name | Incorrect format or value of fields |
| GIVEN | A financial transaction needs to be posted |
| WHEN | Calling POST /v1/financial-transactions |
| THEN | Validation outcome: Register transaction = Error; Post transaction = Error |
| HTTP Code (Post) | 422 |
| Applicability | Applicable to POST /v1/financial-transactions |
Scenario_003 - A Transaction has less than two Transaction details
| Element | Details |
|---|---|
| Scenario ID | Scenario_003 |
| Scenario Name | A Transaction has less than two Transaction details |
| GIVEN | A financial transaction needs to be posted |
| WHEN | Calling POST /v1/financial-transactions |
| THEN | Validation outcome: Register transaction = Warning; Post transaction = Error |
| HTTP Code (Post) | 422 |
| Applicability | Applicable to POST /v1/financial-transactions |
Scenario_004 - Posting cycle cannot be found
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_004 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting cycle cannot be found | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | no posting cycle can be found for Transaction Type GL period 201907 | ||||||||||||||||||||||||||||||
| AND | no posting cycle can be found for Transaction Type GL fiscal year 2019 | ||||||||||||||||||||||||||||||
| AND | no posting cycle can be found for Transaction Type GL fiscal year (empty) | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | the transaction is not posted | ||||||||||||||||||||||||||||||
| AND | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| Example Error Message | “A valid Posting cycle must be created for Transaction type {0}" {0} - Value of the Transaction type set in the JSON file |
Scenario_005 - Voucher number cannot be assigned because posting cycle has been exhausted
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_005 | ||||||||||||||||||||||||||||||
| Scenario Name | Voucher number cannot be assigned because posting cycle has been exhausted | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below
| ||||||||||||||||||||||||||||||
| AND | a posting cycle can be found | ||||||||||||||||||||||||||||||
| BUT | the counter for the posting cycle has been exhausted (there are no numbers available ) | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||
| Example Error Message | “Exhausted Posting Cycle; No Transaction Numbers available for Posting Cycle {0} assigned to Transaction Type {1}." {0} - Value of the Posting cycle that is given or auto-completed by the API {1} - Value of the Transaction type set in the JSON file |
Scenario_006 - Transaction Type does not exist for the selected company
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_006 | ||||||||||||||||||||||||||||||
| Scenario Name | Transaction Type does not exist for the selected company | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below
| ||||||||||||||||||||||||||||||
| BUT | transaction type GZ does not exist in Client EN | ||||||||||||||||||||||||||||||
| WHEN | posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||
| Example Error Message | “Unknown Transaction Type {0}." {0} - Value of the Transaction type set in the JSON file |
Scenario_007 - Transaction Type does not have status N
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_007 | ||||||||||||||||||||||||||||||
| Scenario Name | Transaction Type does not have status N | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below
| ||||||||||||||||||||||||||||||
| BUT | transaction type G2 in Client EN does not have status N | ||||||||||||||||||||||||||||||
| WHEN | posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Transaction Type; status must be N (Active).” |
Scenario_008 - Transaction Type does not have Treatment code 4
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_008 | ||||||||||||||||||||||||||||||
| Scenario Name | Transaction Type does not have Treatment code 4 | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below
| ||||||||||||||||||||||||||||||
| BUT | transaction type AP in Client EN does not have treatment code 2, 4 or 5 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted through “financial-transactions” endpoint | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Transaction Type; Treatment Code must be one of the following: {0}" {0} - valid treatment codes for “financial-transactions” endpoint (2, 4, 5) |
Scenario_009 - Period is not defined in the client (Company Id)
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_009 | ||||||||||||||||||||||||||||||
| Scenario Name | Period is not defined in the client (Company Id) | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | period 202001 is not defined in Client EN | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Unknown Period.” |
Scenario_010 - Period is not Active
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_010 | ||||||||||||||||||||||||||||||
| Scenario Name | Period is not Active | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | period 201801 has status different from N | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Period; status must be N (Active).” |
Scenario_011 - Unparseable date
| Element | Details |
|---|---|
| Scenario ID | Scenario_011 |
| Scenario Name | Unparseable date |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | any of transactionDate, discountDate or dueDate fields is provided as an unparseable date (e.g. “1125”, “Any text”, …) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is obtained |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Invalid {0}; date format must be YYYY-MM-DD." {0} - the date field” |
Scenario_012 - GL account does not exist for the selected period
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_012 | ||||||||||||||||||||||||||||||
| Scenario Name | GL account does not exist for the selected period | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | GL account 1080 does not exist for period 201907 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid {0} ({1}) for period {2}." {0} - the validated field (account) {1} - the account {2} - the period |
Scenario_013 - GL account is not active for the selected period
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_013 | ||||||||||||||||||||||||||||||
| Scenario Name | GL account is not active for the selected period | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | GL account 1001 has a status different from N for period 201907 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Account; status must be N (Active) for Period {0}." {0} - Value of the Period set in the JSON file |
Scenario_014 - Currency is not defined in the selected Client
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_014 | ||||||||||||||||||||||||||||||
| Scenario Name | Currency is not defined in the selected Client | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Currency code ZZZ does not exist for Client EN | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Unknown Currency code." {0} - Value of the Period set in the JSON file |
Scenario_015 - All amounts in a "Transaction Detail" are either 0 or blank
| Element | Details |
|---|---|
| Scenario ID | Scenario_015 |
| Scenario Name | All amounts in a “Transaction Detail” are either 0 or blank |
| HTTP Code | 422 |
| GIVEN | that there is a POST API for financial transactions |
| AND | a transaction document is sent |
| AND | the fields Amount, Amount3, Amount4 and CurrencyAmount of one (or many) of the Transaction Details are all empty or have the value zero |
| WHEN | the corresponding Transaction Details are posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below for each of the details for which this is the case: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Transaction Detail; either “Currency Amount” or any of the “Amounts” defined for Company ID {0} must differ from 0." {0} - Company Id value set in the JSON file |
Scenario_016 - The number of decimals for one or more amounts exceeds the maximum number allowed
| Element | Details |
|---|---|
| Scenario ID | Scenario_016 |
| Scenario Name | The number of decimals for one or more amounts exceeds the maximum number allowed |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the number of decimals for one or more “Amounts” (Currency Amount, Amount, Amount3 or Amount4) exceeds 3, which is the maximum defined for those fields |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded”. {0} - The amount that exceeds the number of decimals (this may be “Currency Amount”, “Amount”, “Amount3” or “Amount4”) {1} - the maximum number of decimals that system can accept for field |
Scenario_017 - The number of decimals for one or more amounts exceeds the maximum number of decimals defined for the Currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_017 |
| Scenario Name | The number of decimals for one or more amounts exceeds the maximum number of decimals defined for the Currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the number of decimals for one or more of the “Amounts” (Currency Amount, Amount, Amount3 or Amount4) exceeds the maximum number of decimals defined for the corresponding currency, bu> is less than the general maximum of 3 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded”. {0} - The amount that exceeds the number of decimals (this may be “Currency Amount”, “Amount”, “Amount3” or “Amount4”) {1} - the maximum number of decimals that system can accept for field |
Scenario_018 - There is no currency definition for one of the amounts included in the JSON file
| Element | Details |
|---|---|
| Scenario ID | Scenario_018 |
| Scenario Name | There is no currency definition for one of the amounts included in the JSON file |
| HTTP Code | 422 |
| GIVEN | that there is a POST API for financial transactions |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a value other than zero is set in “Amount3” and “Amount4” |
| BUT | no currency is defined for these amounts in the Company information tab for the Company Id set in the JSON file |
| WHEN | the transaction is posted to the transaction resource on the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below for each of the details with a value other than 0 in “Amount3” and “Amount4” |
| AND | the transaction is not posted |
| Example Error Message | “Currency not defined for “{0}” in Company Id {1}" {0} - The amount whose value is different than 0 but which has no corresponding currency definition (this may be “Amount3” or “Amount4”) {1} - The value of the Company Id set in the JSON file |
Scenario_019 - Transaction type does not have treatment code 2, 4 or 5
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_019 | ||||||||||||||||||||||||||||||
| Scenario Name | Transaction type does not have treatment code 2, 4 or 5 | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below
| ||||||||||||||||||||||||||||||
| BUT | transaction type AP in Client EN does not have treatment code 2, 4 or 5 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted through “financial-transactions” endpoint | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Transaction Type; Treatment Code must be one of the following: {0}" {0} - valid treatment codes for “financial-transactions” endpoint (2, 4, 5) |
Scenario_021 - Post or Register a Financial Transaction with customerId and supplierId
| Element | Details | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_021 | |||||||||||||||
| Scenario Name | Post or Register a Financial Transaction with customerId and supplierId | |||||||||||||||
| HTTP Code | 422 | |||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||
| AND | a transaction document is sent, containing the information below
| |||||||||||||||
| WHEN | the transaction is posted to the transaction resource on the API | |||||||||||||||
| THEN | a 422 response (Unprocessable Entity) is returned | |||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||
| AND | the transaction is not posted | |||||||||||||||
| Example Error Message | “Provide only a customerId or a supplierId.” |
Scenario_022 - Posting a Financial Transaction with both Invoice and PaymentInformation objects
| Element | Details |
|---|---|
| Scenario ID | Scenario_022 |
| Scenario Name | Posting a Financial Transaction with both Invoice and PaymentInformation objects |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent containing both “Invoice” and “PaymentInformation” objects |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Provide either an invoice or a paymentInformation object.” |
Scenario_024 - Posting a Financial Transaction with both SummaryTaxInformation and TaxTransactionLine information
| Element | Details |
|---|---|
| Scenario ID | Scenario_024 |
| Scenario Name | Posting a Financial Transaction with both SummaryTaxInformation and TaxTransactionLine information |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent, containing both “summaryTaxInformation” and “taxInformation” information |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The summaryTaxInformation and taxTransactionLine properties cannot both contain tax information at the same time. Provide a tax information value for one of those properties only.” |
Scenario_025 - Posting a Financial Transaction with both SummaryTaxInformation and TaxInput information
| Element | Details |
|---|---|
| Scenario ID | Scenario_025 |
| Scenario Name | Posting a Financial Transaction with both SummaryTaxInformation and TaxInput information |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent, containing both “summaryTaxInformation” and “taxInput” information |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The summaryTaxInformation and taxInput properties cannot both contain tax information at the same time. Provide a tax information value for one of those properties only.” |
Scenario_026 - Posting a Financial Transaction with a date earlier than 1900-01-01
| Element | Details |
|---|---|
| Scenario ID | Scenario_026 |
| Scenario Name | Posting a Financial Transaction with a date earlier than 1900-01-01 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | transactionDate/registeredDate/dueDate/discountDate/valueDate/taxPointDate is equal to or less than 1900-01-01 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} must be later than 1900-01-01." {0} - the date field |
Scenario_027 - Posting a Financial Transaction with a date later than 2099-12-31
| Element | Details |
|---|---|
| Scenario ID | Scenario_027 |
| Scenario Name | Posting a Financial Transaction with a date later than 2099-12-31 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | transactionDate/registeredDate/dueDate/discountDate/valueDate/taxPointDate is equal or more than 2099-12-31 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} must be earlier than 2099-12-31." {0} - the date field |
Scenario_028 - Posting a Financial Transaction with date not in range of given of GL Period and CHK_VOUCHER_DATE is ON
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_028 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting a Financial Transaction with date not in range of given of GL Period and CHK_VOUCHER_DATE is ON | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | GL period definition for 201906 is date from: 2019-06-06 - date to: 2019-06-30 | ||||||||||||||||||||||||||||||
| AND | CHK_VOUCHER_DATE is ON | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted through “financial-transactions” endpoint | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Transaction Date;Since CHK_VOUCHER_DATE is ON, Transaction Date must be in the interval 2019-06-01 - 2019-06-30 defined for the GL Period 201906.” |
Scenario_029 - Posting cycle is not defined in the client (Company Id)
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_029 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting cycle is not defined in the client (Company Id) | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | given “Posting cycle” is not defined in client EN | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Unknown Posting Cycle” |
Scenario_030 - Transaction Series of given Posting Cycle is not same as Transaction Series of given Transaction Type
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_030 | ||||||||||||||||||||||||||||||
| Scenario Name | Transaction Series of given Posting Cycle is not same as Transaction Series of given Transaction Type | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Transaction Series of given Posting Cycle is not same as Transaction Series | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Mismatch Transaction Series; Transaction Series of Posting Cycle{0} is not the same as Transaction Series of Transaction Type {1}." {0} - value of the given Posting cycle {1} - value of the given Transaction type |
Scenario_031 - Fiscal year of given Posting Cycle is not same as Fiscal year of given Period
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_031 | ||||||||||||||||||||||||||||||
| Scenario Name | Fiscal year of given Posting Cycle is not same as Fiscal year of given Period | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Fiscal year of given Posting Cycle is not same as Fiscal year of given Period | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Posting Cycle; Fiscal Year of Posting Cycle {0} is not same as Fiscal Year of GL Period {1}." {0} - value of the given Posting cycle {1} - value of the given Period |
Scenario_032 - Posting Cycle has invalid status
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_032 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting Cycle has invalid status | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Posting Cycle has invalid status | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Posting Cycle; Posting Cycle must be in Status N(Active) or P(Period).” |
Scenario_033 - Posting a transaction with Posting Cycle in Status P
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_033 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting a transaction with Posting Cycle in Status P | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Posting Cycle has status P | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Posting Cycle; Transaction GL Period {0} must be equal to Posting Cycle GL Period when Posting Cycle status equals P." {0} - value of the given period |
Scenario_034 - Posting a GL Financial Transaction with registration date
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_034 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting a GL Financial Transaction with registration date | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Registered date is not empty | ||||||||||||||||||||||||||||||
| AND | Transaction Type has a Treatment code other than 1 or 2 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Registered Date; Registered Date can only be provided with Treatment Code {0}." {0} - value of the Treatment Code |
Scenario_035 - Registering a Financial Transaction with registered transaction number
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_035 | ||||||||||||||||||||||||||||||
| Scenario Name | Registering a Financial Transaction with registered transaction number | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Registered Transaction Number is not empty | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted through “financial-transactions” endpoint | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Registered Transaction Number; Registered Transaction Number must be empty.” |
Scenario_036 - Posting a Financial Transaction with registered transaction number
| Element | Details | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_036 | ||||||||||||||||||||||||||||||
| Scenario Name | Posting a Financial Transaction with registered transaction number | ||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||
| BUT | Registered Transaction Number is not empty | ||||||||||||||||||||||||||||||
| AND | Treatment Code is not 2 | ||||||||||||||||||||||||||||||
| WHEN | the transaction is posted through “financial-transactions” endpoint | ||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is obtained | ||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||
| AND | the transaction is not posted. | ||||||||||||||||||||||||||||||
| Example Error Message | “Invalid Registered Transaction Number; Registered Transaction Number can only be provided with Treatment Code 2.” |
Scenario_038 - Posting a Financial Transaction without invoice section for treatment code 2 or 5
| Element | Details |
|---|---|
| Scenario ID | Scenario_038 |
| Scenario Name | Posting a Financial Transaction without invoice section for treatment code 2 or 5 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Treatment code in (2,5) |
| AND | object invoice is not provided |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invoice section is required for given Transaction Type (treatment code 2 or 5).” |
Scenario_040 - Posting a Financial Transaction with more than InvoiceNumber and (customerId or supplierId) fields for treatment code 4
| Element | Details |
|---|---|
| Scenario ID | Scenario_040 |
| Scenario Name | Posting a Financial Transaction with more than InvoiceNumber and (customerId or supplierId) fields for treatment code 4 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Treatment code = 4 |
| AND | the invoice object contains at least one of the following fields: creditTerms, discountCurrencyAmount, discountDate, discountPercentage, dueDate, paymentCurrency, paymentMethod, paymentRecipient, responsible, vatRegistrationNumber |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invoice section can only contain InvoiceNumber and (customerId or supplierId) for given Transaction Type (treatment code 4).” |
Scenario_041 - Posting a Financial Transaction without customerId or supplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_041 |
| Scenario Name | Posting a Financial Transaction without customerId or supplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Invoice number is provided |
| AND | customerId and supplierId are not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “customerId or supplierId is required.” |
Scenario_042 - Invoice number already exists for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_042 |
| Scenario Name | Invoice number already exists for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Invoice number is provided |
| AND | customerId is provided |
| AND | System parameter CU_CHK_EXT_INV_REF is ON, value = null |
| BUT | Invoice number already exists within the company |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Invoice number is provided |
| AND | customerId is provided |
| AND | System parameter CU_CHK_EXT_INV_REF is ON, value = 1 |
| BUT | Invoice number already exists within the company per fiscal year |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invoice number already exists for given CompanyID; system parameter CU_CHK_EXT_INV_REF is active." “Invoice number already exists for given CompanyID and fiscal year; system parameter CU_CHK_EXT_INV_REF is active with value = 1.” |
Scenario_043 - Invoice number already exists for given Company and supplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_043 |
| Scenario Name | Invoice number already exists for given Company and supplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Invoice number is provided |
| AND | supplierId is provided |
| AND | System parameter SU_CHK_EXT_INV_REF is ON, value = null |
| BUT | Invoice number already exists within the company for given supplierId |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Invoice number is provided |
| AND | supplierId is provided |
| AND | System parameter SU_CHK_EXT_INV_REF is ON, value = 1 |
| BUT | Invoice number already exists within the company for given supplierId per fiscal year |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invoice number already exists for given CompanyID and SupplierID; system parameter SU_CHK_EXT_INV_REF is active." “Invoice number already exists for given CompanyID, SupplierID and fiscal year; system parameter SU_CHK_EXT_INV_REF is active with value = 1.” |
Scenario_044 - Payment method does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_044 |
| Scenario Name | Payment method does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment method is provided |
| BUT | Payment method is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Payment method.” |
Scenario_045 - Payment method is not active for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_045 |
| Scenario Name | Payment method is not active for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment method is provided |
| AND | Payment method is defined in UBW |
| BUT | Payment method is not active (N) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment method; status must be N (Active).” |
Scenario_046 - Payment method is different than defined in given customerId or supplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_046 |
| Scenario Name | Payment method is different than defined in given customerId or supplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment method is provided |
| AND | customerId or supplierId is provided |
| AND | Payment method for given customer or supplier is FIXED |
| BUT | Payment method from transaction document is not equal to payment method defined in customer or supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment method; for {0} {1} payment method is fixed and must be {2}." {0} - customerId or supplierId {1} - customerId or supplierId value set in the JSON file {2} - Payment method defined for given customerId or supplierId |
Scenario_047 - Posting a Financial Transaction when Account Rule is NOT active
| Element | Details |
|---|---|
| Scenario ID | Scenario_047 |
| Scenario Name | Posting a Financial Transaction when Account Rule is NOT active |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Account Rule is NOT Active |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Account Rule; Status must be N (Active).” |
Scenario_048 - Posting a Financial Transaction when Mandatory ID in Account Rule is NOT provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_048 |
| Scenario Name | Posting a Financial Transaction when Mandatory ID in Account Rule is NOT provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Mandatory Attribute ID is not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute ID; {0} is/are mandatory Attribute ID(s)." {0} - list of missing Attribute IDs |
Scenario_049 - Posting a Financial Transaction when Attribute ID is not in Account Rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_049 |
| Scenario Name | Posting a Financial Transaction when Attribute ID is not in Account Rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Attribute ID is not in account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute ID; {(Extra) Attribute ID } is not defined in Account Rule." {0} - Attribute IDs not defined in Account rule |
Scenario_050 - Posting a Financial Transaction when dupicate Attribute ID is provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_050 |
| Scenario Name | Posting a Financial Transaction when dupicate Attribute ID is provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Duplicate Attrtibute ID is provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Duplicate Attribute {0}; Only one Instance per Attribute ID can be provided." {0} - Attribute ID being duplicated |
Scenario_051 - Posting a Financial Transaction when value without attribute is provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_051 |
| Scenario Name | Posting a Financial Transaction when value without attribute is provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Attribute value without an Attribute ID is provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Value without an Attribute ID provided, Attribute Value must have corresponding Attribute ID.” |
Scenario_052 - 'Value' is provided and not selected on account rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_052 |
| Scenario Name | ‘Value’ is provided and not selected on account rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | ‘Value’ is provided and not selected on account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Value: Value field is not selected for this Account Rule.” |
Scenario_053 - 'Number' is provided and not selected on account rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_053 |
| Scenario Name | ‘Number’ is provided and not selected on account rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | ‘Number’ is provided and not selected on account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Number: Number field is not selected for this Account Rule.” |
Scenario_054 - 'Description/Text on Invoice' is provided and not selected on account rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_054 |
| Scenario Name | ‘Description/Text on Invoice’ is provided and not selected on account rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | ‘Text on Invoice’ is NOT selected on account rule |
| BUT | ‘Description’ is provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Description: Text on invoice field is not selected for this Account Rule.” |
Scenario_055 - Provided attribute is not in Category 1-7
| Element | Details |
|---|---|
| Scenario ID | Scenario_055 |
| Scenario Name | Provided attribute is not in Category 1-7 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | Provided Attribute ID is not in Category 1-7 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute ID; Attribute category must be 1-7.” |
Scenario_056 - Attribute Value for Mandatory Attribute ID is not provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_056 |
| Scenario Name | Attribute Value for Mandatory Attribute ID is not provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Attribute value is NOT provided |
| BUT | Attribute is Mandatory on Account Rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Attribute Value for {0} is Mandatory." {0} - Mandatory Attribute ID |
Scenario_057 - Attribute ID with with maintenance of Manual/Automatic is provided with non existing value
| Element | Details |
|---|---|
| Scenario ID | Scenario_057 |
| Scenario Name | Attribute ID with with maintenance of Manual/Automatic is provided with non existing value |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Maintenance is Manual/Automatic |
| AND | Value doesn’t exist in the system |
| BUT | Attribute is Mandatory on Account Rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Attribute Value for {0} must exist in the system." {0} - Mandatory Attribute ID |
Scenario_058 - Attribute value for an attribute with User input Fixed does not match the value which would be autocompleted
| Element | Details |
|---|---|
| Scenario ID | Scenario_058 |
| Scenario Name | Attribute value for an attribute with User input Fixed does not match the value which would be autocompleted |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | user has provided an Analytical Information Attribute (Category 1 - 7) Value |
| AND | Attribute has User Input as Fixed on the Account Rule |
| BUT | Attribute value sent by user is not equal to the Attribute value which would be autocompleted |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid attribute value; attribute {0} is fixed in the account rule and its value must be equal to {1}" {0} - Attribute ID {1} - the value we would get if we applied code completion |
Scenario_059 - Attribute ID with maintenace of Manual/Automatic is provided with a value which is NOT active
| Element | Details |
|---|---|
| Scenario ID | Scenario_059 |
| Scenario Name | Attribute ID with maintenace of Manual/Automatic is provided with a value which is NOT active |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Provided value is NOT active |
| BUT | Attribute maintenace is Manual or Automatic |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Status must be N (Active).” |
Scenario_060 - Attribute ID with maintenace of Manual/Automatic is provided with a value which is NOT valid for given Period
| Element | Details |
|---|---|
| Scenario ID | Scenario_060 |
| Scenario Name | Attribute ID with maintenace of Manual/Automatic is provided with a value which is NOT valid for given Period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Provided value is not valid for given Period |
| BUT | Attribute maintenace is Manual or Automatic |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Period control is on and Attribute Value is not valid for this Period {period}.” |
Scenario_061 - Attribute ID with maintenace of Optional is provided with a value which exceeds the length
| Element | Details |
|---|---|
| Scenario ID | Scenario_061 |
| Scenario Name | Attribute ID with maintenace of Optional is provided with a value which exceeds the length |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Provided value exceeds the Attribute length |
| BUT | Attribute maintenace is Optional |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Length of given Attribute Value exceeds the maximum allowed length ({0}) for this Attribute ID." {0} - length of the Attribute |
Scenario_062 - Attribute ID with maintenace of Optional is provided with a value which violates data type
| Element | Details |
|---|---|
| Scenario ID | Scenario_062 |
| Scenario Name | Attribute ID with maintenace of Optional is provided with a value which violates data type |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Provided value is not in numeric type |
| BUT | Attribute maintenace is Optional |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Attribute Value must be of numeric type.” |
Scenario_063 - Attribute ID with maintenace of Optional is provided with a value which contains special characters
| Element | Details |
|---|---|
| Scenario ID | Scenario_063 |
| Scenario Name | Attribute ID with maintenace of Optional is provided with a value which contains special characters |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Provided value contains special characters |
| BUT | Attribute maintenace is Optional |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute value. It contains one of the special characters that are not allowed ({0})." {0} - special characters (Space, percentage sign (%), wildcard (*), square brackets ([]), question mark(?), apostrophe(’)) |
Scenario_064 - customerId does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_064 |
| Scenario Name | customerId does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | customerId is provided |
| BUT | customerId is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown {0}." {0} - customerId |
Scenario_065 - customerId is not active or parked for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_065 |
| Scenario Name | customerId is not active or parked for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | customerId is provided |
| BUT | customerId status is not active (N) or parked (P) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; status must be N (Active) or P (Parked)." {0} - supplierId |
Scenario_066 - supplierId does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_066 |
| Scenario Name | supplierId does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | supplierId is provided |
| BUT | supplierId is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown {0}." {0} - supplierId |
Scenario_067 - supplierId is not active or parked for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_067 |
| Scenario Name | supplierId is not active or parked for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | supplierId is provided |
| BUT | supplierId status is not active (N) or parked (P) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; status must be N (Active) or P (Parked)." {0} - supplierId |
Scenario_069 - Posting a Financial Transaction with customerId and Treatment code 2
| Element | Details |
|---|---|
| Scenario ID | Scenario_069 |
| Scenario Name | Posting a Financial Transaction with customerId and Treatment code 2 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Treatment code = 2 |
| AND | customerId is provided |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “customerId is not allowed for given Transaction Type (treatment code 2); Provide supplierId.” |
Scenario_070 - Posting a Financial Transaction with supplierId and Treatment code 5
| Element | Details |
|---|---|
| Scenario ID | Scenario_070 |
| Scenario Name | Posting a Financial Transaction with supplierId and Treatment code 5 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Treatment code = 5 |
| AND | supplierId is provided |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “supplierId is not allowed for given Transaction Type (treatment code 5); Provide customerId.” |
Scenario_071 - Credit terms does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_071 |
| Scenario Name | Credit terms does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Credit terms is provided |
| BUT | Credit terms is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Credit Terms.” |
Scenario_072 - Credit terms is different than defined in given CustomerId or SupplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_072 |
| Scenario Name | Credit terms is different than defined in given CustomerId or SupplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Credit terms is provided |
| AND | Credit terms for given customer or supplier is FIXED |
| BUT | Credit terms from transaction document is not equal to Credit terms defined in customer or supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Credit Terms; for {0} {1} credit terms is fixed and must be {2}." {0} - CustomerID or SupplierID {1} - CustomerID or SupplierID value set in the JSON file {2} - Credit terms defined for given CustomerID or SupplierID |
Scenario_073 - Payment currency does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_073 |
| Scenario Name | Payment currency does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment currency is provided |
| BUT | Payment currency is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Payment currency.” |
Scenario_074 - Payment recipient does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_074 |
| Scenario Name | Payment recipient does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment recipient is provided |
| BUT | Payment recipient is not defined in UBW |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Payment recipient.” |
Scenario_075 - Payment recipient is not active for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_075 |
| Scenario Name | Payment recipient is not active for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment recipient is provided |
| BUT | Payment recipient status is not active (N) or parked (P) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment recipient; status must be N (Active) or P (Parked).” |
Scenario_076 - Payment recipient is different than defined in given CustomerId or SupplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_076 |
| Scenario Name | Payment recipient is different than defined in given CustomerId or SupplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment recipient is provided |
| AND | Payment recipient for given customer or supplier is FIXED |
| BUT | Payment recipient from transaction document is not equal to Payment recipient defined in customer or supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment recipient; for {0} {1} payment recipient is fixed and must be {2}." {0} - CustomerID or SupplierID {1} - CustomerID or SupplierID value set in the JSON file {2} - Payment recipient value defined for given CustomerID or SupplierID |
Scenario_077 - CustomerId or SupplierId is different than defined in given Payment recipient
| Element | Details |
|---|---|
| Scenario ID | Scenario_077 |
| Scenario Name | CustomerId or SupplierId is different than defined in given Payment recipient |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment recipient is provided |
| AND | CustomerId or SupplierId for given Payment recipient is FIXED |
| BUT | CustomerId or SupplierId from transaction document is not equal to CustomerId or SupplierId defined in Payment recipient |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; for payment recipient {1} {0} is fixed and must be {2}." {0} - CustomerID or SupplierID {1} - Payment recipient value set in the JSON file {2} - CustomerID or SupplierID value defined for a given Payment recipient |
Scenario_078 - Posting a Financial Transaction without InvoiceNumber
| Element | Details |
|---|---|
| Scenario ID | Scenario_078 |
| Scenario Name | Posting a Financial Transaction without InvoiceNumber |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | object invoice is provided |
| BUT | Invoice number is not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The InvoiceNumber field is required.” |
Scenario_079 - Responsible is not defined in UBW as a user
| Element | Details |
|---|---|
| Scenario ID | Scenario_079 |
| Scenario Name | Responsible is not defined in UBW as a user |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | Responsible is not defined in UBW as a user |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown responsible.” |
Scenario_080 - Responsible user status is not Active (N)
| Element | Details |
|---|---|
| Scenario ID | Scenario_080 |
| Scenario Name | Responsible user status is not Active (N) |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | Responsible user status is not Active (N) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid responsible; status must be N (Active).” |
Scenario_081 - Responsible user is not assigned to role selected in general responsible setup
| Element | Details |
|---|---|
| Scenario ID | Scenario_081 |
| Scenario Name | Responsible user is not assigned to role selected in general responsible setup |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | Responsible user is not assigned to the role selected in the general responsible setup |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid responsible; user {0} is not assigned to role {1} chosen in general responsible setup." {0} - responsible {1} - responsible role chosen in general responsible setup in UBW |
Scenario_082 - There is no role selected in general responsible setup
| Element | Details |
|---|---|
| Scenario ID | Scenario_082 |
| Scenario Name | There is no role selected in general responsible setup |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | There is no role selected in the general responsible setup |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid responsible; there is no role chosen in general responsible setup, no user can be selected.” |
Scenario_083 - Responsible user does not have connected resource ID
| Element | Details |
|---|---|
| Scenario ID | Scenario_083 |
| Scenario Name | Responsible user does not have connected resource ID |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | Responsible user does not have connected resource ID |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid responsible; user {0} does not have a connected resource ID.” |
Scenario_084 - System parameter OPTIONAL_RESPONSIBLE is not active
| Element | Details |
|---|---|
| Scenario ID | Scenario_084 |
| Scenario Name | System parameter OPTIONAL_RESPONSIBLE is not active |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Responsible is provided |
| BUT | System parameter OPTIONAL_RESPONSIBLE is not active |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid value for responsible; responsible is mandatory because system parameter OPTIONAL_RESPONSIBLE is not active.” |
Scenario_086 - Account type is not GL for a transaction with treatment code 4
| Element | Details |
|---|---|
| Scenario ID | Scenario_086 |
| Scenario Name | Account type is not GL for a transaction with treatment code 4 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | TC = 4 |
| AND | Account is provided |
| BUT | Account type is not GL |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid account; account type must be “GL” for a transaction type with treatment code 4.” |
Scenario_088 - Transaction has zero or more than one line with account type AP for treatment code 2
| Element | Details |
|---|---|
| Scenario ID | Scenario_088 |
| Scenario Name | Transaction has zero or more than one line with account type AP for treatment code 2 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | TC = 2 |
| AND | Account is provided |
| BUT | transaction has zero or more than one line with account type AP |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid transaction details; transaction must contain one detail line with account type “AP” for transaction type with treatment code 2.” |
Scenario_090 - Account type is AR for a transaction with treatment code 2
| Element | Details |
|---|---|
| Scenario ID | Scenario_090 |
| Scenario Name | Account type is AR for a transaction with treatment code 2 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | TC = 1 |
| AND | Account is provided |
| BUT | Account type is AR |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid transaction details; details with account type “AR” are not accepted for transaction types with treatment code 2.” |
Scenario_091 - Transaction has zero or more than one line with account type AR for treatment code 5
| Element | Details |
|---|---|
| Scenario ID | Scenario_091 |
| Scenario Name | Transaction has zero or more than one line with account type AR for treatment code 5 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | TC = 5 |
| AND | Account is provided |
| BUT | transaction has zero or more than one line with account type AR |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid transaction details; transaction must contain one detail line with account type “AR” for transaction type with treatment code 5.” |
Scenario_092 - Account type is AP for a transaction with treatment code 5
| Element | Details |
|---|---|
| Scenario ID | Scenario_092 |
| Scenario Name | Account type is AP for a transaction with treatment code 5 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | TC = 5 |
| AND | Account is provided |
| BUT | Account type is AP |
| WHEN | the transaction is posted through “financial-transactions” endpoint |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid transaction details; details with account type “AP” are not accepted for transaction types with treatment code 5.” |
Scenario_093 - Exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_093 |
| Scenario Name | Exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| BUT | for the transaction date, exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No Exchange rate found for {0} in currency type “{1}” date {2} to calculate {3}, amount currency type is defined with the account rule of the GL account." {0} - Currency code {1} - Currency type {2} - voucher date {3} - the amount we are calculating (amount or amount3 or amount4) |
Scenario_094 - Exchange rate does not exist for the currency type defined in company information for amount4 currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_094 |
| Scenario Name | Exchange rate does not exist for the currency type defined in company information for amount4 currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| BUT | for the transaction date, exchange rate does not exist for the currency type defined in company information for amount4 currency |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No Exchange rate found for {0} in currency type “{1}” date {2} to calculate {3}, amount currency type is defined in company information." {0} - Currency code {1} - Currency type {2} - voucher date {3} - The amount we are calculating (amount or amount3 or amount4) |
Scenario_095 - Amounts are not provided in all details - amounts instances
| Element | Details |
|---|---|
| Scenario ID | Scenario_095 |
| Scenario Name | Amounts are not provided in all details - amounts instances |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount/amount3/amount4 is provided |
| BUT | amount/amount3/amount4 is not provided in all details - amounts instances (including the SecondaryOpenItems section) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Transaction details; {0} must be provided in all or none of the “amounts” sections” {0} - The amount we are validating |
Scenario_096 - Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value exceeds the maximum length
| Element | Details |
|---|---|
| Scenario ID | Scenario_096 |
| Scenario Name | Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value exceeds the maximum length |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with the “registered-financial-transactions” or “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | provided value exceeds the Attribute length |
| BUT | Attribute User input is No check |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Length of given Attribute value exceeds the maximum allowed length ({0}) for this Attribute ID." {0} - length of the Attribute |
Scenario_097 - Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value violates data type
| Element | Details |
|---|---|
| Scenario ID | Scenario_097 |
| Scenario Name | Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value violates data type |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | provided value is not of numeric type |
| BUT | Attribute User input is No check |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; Attribute Value must be of numeric type.” |
Scenario_098 - Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value contains special characters
| Element | Details |
|---|---|
| Scenario ID | Scenario_098 |
| Scenario Name | Posting a Financial Transaction when User input for Attribute is No check and the provided Attribute Value contains special characters |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | provided value contains special characters |
| BUT | Attribute User input is No check |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute value. It contains one of the special characters that are not allowed ({0})." {0} - Special characters (Space, percentage sign (%), wildcard (*), square brackets ([]), question mark(?), apostrophe(’)) |
Scenario_099 - Value matrix does not find a fixed attribute value
| Element | Details |
|---|---|
| Scenario ID | Scenario_099 |
| Scenario Name | Value matrix does not find a fixed attribute value |
| HTTP Code | 422 |
| GIVEN | a Financial Transaction to be posted or registered |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the existing valid account rule associated with the existing valid account in transaction contains the existing valid attribute with User input Fixed and auto-completion determined by the existing validMatrix |
| AND | matrix does not find an attribute value |
| WHEN | the transaction is posted through API’s transaction resource |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value; {0} is/are fixed Attribute ID(s) and no valid value can be found in the value matrix." {0} - Attribute Id |
Scenario_100 - Direct relation does not find a fixed attribute value
| Element | Details |
|---|---|
| Scenario ID | Scenario_100 |
| Scenario Name | Direct relation does not find a fixed attribute value |
| HTTP Code | 422 |
| GIVEN | a Financial Transaction to be posted or registered |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the existing valid account rule associated with the existing valid account in transaction contains the existing valid attribute with User input Fixed and autocompletion determined by the existing valid Direct Relation (Owner) |
| AND | direct relation does not find an attribute value |
| WHEN | the transaction is posted through the API’s transaction resource |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute value. {0} is/are fixed Attribute ID(s) and cannot be autocompleted through its owner attribute." {0} - Attribute Id |
Scenario_101 - Amount/amount3/amount4 is not provided in taxinformation - taxinput - taxamounts section
| Element | Details |
|---|---|
| Scenario ID | Scenario_101 |
| Scenario Name | Amount/amount3/amount4 is not provided in taxinformation - taxinput - taxamounts section |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount/amount3/amount4 is provided in details - amounts section |
| BUT | amount/amount3/amount4 is not provided in taxinformation - taxinput - taxamounts section |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid amounts; {0} must be provided in the amounts section in both details and taxInput or must not be provided at all." {0} - the amount we are validating |
Scenario_102 - Amount/amount3/amount4 is not provided in summaryTaxInformation - amounts section
| Element | Details |
|---|---|
| Scenario ID | Scenario_102 |
| Scenario Name | Amount/amount3/amount4 is not provided in summaryTaxInformation - amounts section |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | every instance of summaryTaxInformation has detail instance, sharing the same taxCode and taxSystem |
| AND | amount/amount3/amount4 is provided in details - amounts section |
| BUT | amount/amount3/amount4 is not provided in summaryTaxInformation - amounts section |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid amounts; {0} must be provided in the amounts section in both details and SummaryTaxInformation or must not be provided at all." {0} - the amount we are validating |
Scenario_103 - There is no transaction line which contains the same combination of taxCode and taxSystem
| Element | Details |
|---|---|
| Scenario ID | Scenario_103 |
| Scenario Name | There is no transaction line which contains the same combination of taxCode and taxSystem |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode and taxSystem in summaryTaxInformation section are provided |
| BUT | there is no transaction line which contains the same combination of taxCode and taxSystem |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No taxInformation can be found for taxCode/taxSystem {0}/{1} in any of the details." {0} - taxCode provided in JSON in summaryTaxInformation section {1} - taxSystem provided in JSON in summaryTaxInformation section |
Scenario_104 - There is no summaryTaxInformation with a taxCode/tax system combination provided in one of the details different than 0/whatever
| Element | Details |
|---|---|
| Scenario ID | Scenario_104 |
| Scenario Name | There is no summaryTaxInformation with a taxCode/tax system combination provided in one of the details different than 0/whatever |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | summaryTaxInformation section is provided |
| BUT | there is no summaryTaxInformation with a taxCode/tax system combination provided in one of the details different than 0/whatever |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No data can be found for taxCode/taxSystem {0}/{1} in summaryTaxInformation." {0} - taxCode provided in JSON in the details section {1} - taxSystem provided in JSON in the details section |
Scenario_105 - The same combination of taxCode/taxSystem is dupicated in summaryTaxInformation
| Element | Details |
|---|---|
| Scenario ID | Scenario_105 |
| Scenario Name | The same combination of taxCode/taxSystem is dupicated in summaryTaxInformation |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | summaryTaxInformation section is provided |
| BUT | the same combination of taxCode/taxSystem is dupicated in summaryTaxInformation |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid summaryTaxInformation; there are more than one sets of data for the same combination of taxCode/taxSystem {0}/{1}." {0} - taxCode provided in JSON in the summaryTaxInformation section {1} - taxSystem provided in JSON in the summaryTaxInformation section |
Scenario_106 - vatPercentage and currencyAmount in summaryTaxInformation section are not provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_106 |
| Scenario Name | vatPercentage and currencyAmount in summaryTaxInformation section are not provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | vatPercentage and currencyAmount in the summaryTaxInformation section are not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “vatPercentage or currencyAmount is required in every set of summaryTaxInformation.” |
Scenario_107 - CurrencyAmount/amount/amount3/amount4 is not provided in all summaryTaxInformation instances
| Element | Details |
|---|---|
| Scenario ID | Scenario_107 |
| Scenario Name | CurrencyAmount/amount/amount3/amount4 is not provided in all summaryTaxInformation instances |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyAmount/amount/amount3/amount4 in summaryTaxInformation is provided |
| BUT | currencyAmount/amount/amount3/amount4 is not provided in all summaryTaxInformation instances |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid summaryTaxInformation; if {0} is to be provided, it has to be provided in all summaryTaxInformation set of data." {0} - the amount we are validating (currencyAmount or amount or amount3 or amount4) |
Scenario_108 - Amount/amount3/amount4 is not provided in details - amount section for the same taxCode/taxSystem combination
| Element | Details |
|---|---|
| Scenario ID | Scenario_108 |
| Scenario Name | Amount/amount3/amount4 is not provided in details - amount section for the same taxCode/taxSystem combination |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount/amount3/amount4 in summaryTaxInformation is provided |
| BUT | amount/amount3/amount4 is not provided in details - amount section for the same taxCode/taxSystem combination |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid amounts; {0} has been provided in summaryTaxInformation for taxCode/taxSystem {1}/{2} and it is missing on here." {0} - the amount we are validating {1} - the value of Tax code from summaryTaxInformation {2} - the value of Tax system from summaryTaxInformation |
Scenario_109 - CurrencyAmount in summaryTaxInformation is not provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_109 |
| Scenario Name | CurrencyAmount in summaryTaxInformation is not provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount/amount3/amount4 in summaryTaxInformation is provided |
| BUT | currencyAmount in summaryTaxInformation is not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid summaryTaxInformation; if amounts are to be provided, currencyAmount is required.” |
Scenario_110 - VatPercentage is not provided in all summaryTaxInformation instances
| Element | Details |
|---|---|
| Scenario ID | Scenario_110 |
| Scenario Name | VatPercentage is not provided in all summaryTaxInformation instances |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | vatPercentage in summaryTaxInformation is provided |
| BUT | vatPercentage is not provided in all summaryTaxInformation instances |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid summaryTaxInformation; if vatPercentage is to be provided, it has to be provided in all summaryTaxInformation set of data.” |
Scenario_111 - VatPercentage is provided in details - amount section for the same taxCode/taxSystem combination
| Element | Details |
|---|---|
| Scenario ID | Scenario_111 |
| Scenario Name | VatPercentage is provided in details - amount section for the same taxCode/taxSystem combination |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | vatPercentage in summaryTaxInformation is provided |
| BUT | vatPercentage is provided in details - amount section for the same taxCode/taxSystem combination |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid vatPercentage; vatPercentage has been provided in summaryTaxInformation for taxCode/taxSystem (0}/{1} and cannot be provided here." {0} - value of Tax code from summaryTaxInformation {1} - value of Tax system from summaryTaxInformation |
Scenario_112 - The number of decimals for vatPercentage exceeds 8, which is the maximum defined for vatPercentage
| Element | Details |
|---|---|
| Scenario ID | Scenario_112 |
| Scenario Name | The number of decimals for vatPercentage exceeds 8, which is the maximum defined for vatPercentage |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the number of decimals for vatPercentage exceeds 8, which is the maximum defined for vatPercentage |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the number of decimals exceeds the maximum number of decimals allowed ({1})." {0} - The amount that exceeds the number of decimals (vatPercentage) {1} - the maximum number of decimals that system can accept for field |
Scenario_113 - Currency is not defined for amount3/amount4 in the company information
| Element | Details |
|---|---|
| Scenario ID | Scenario_113 |
| Scenario Name | Currency is not defined for amount3/amount4 in the company information |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount3/amount4 is provided |
| BUT | currency for amount3/amount4 is not defined in company information |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The currency code is not defined for {0} in the company information table. Please define one." {0} - amount3 or amount4 |
Scenario_114 - CurrencyCode value do not matching value determined for the Account Rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_114 |
| Scenario Name | CurrencyCode value do not matching value determined for the Account Rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| AND | currencyCode has User input as Fixed in the account rule |
| BUT | provided the currencyCode value is not the same as the one determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it must be {1}." {0} - the tag we are validating, currencyCode in this case. {1} - the value we would get if we applied code completion. |
Scenario_115 - CurrencyCode value do not matching value determined for the Supplier
| Element | Details |
|---|---|
| Scenario ID | Scenario_115 |
| Scenario Name | CurrencyCode value do not matching value determined for the Supplier |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| AND | currencyCode has User input as Mandatory in the Account rule |
| AND | currencyCode is flagged as Fixed for the supplier |
| BUT | provided the currencyCode value is not the same as the one determined for the supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed for the supplier and it must be {1}." {0} - the tag we are validating, currencyCode in this case. {1} - the value we would get if we applied code completion. The value for the supplier. |
Scenario_116 - CurrencyCode value do not matching value determined for the Customer
| Element | Details |
|---|---|
| Scenario ID | Scenario_116 |
| Scenario Name | CurrencyCode value do not matching value determined for the Customer |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| AND | currencyCode has User input as Mandatory in the account rule |
| AND | currencyCode is flagged as Fixed for the customer |
| BUT | provided the currencyCode value is not the same as the one determined for the customer |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed for the customer and it must be {1}." {0} - the tag we are validating, currencyCode in this case. {1} - the value we would get if we applied code completion. The value for the customer. |
Scenario_117 - CurrencyCode value cannot be determined through its Owner Attribute
| Element | Details |
|---|---|
| Scenario ID | Scenario_117 |
| Scenario Name | CurrencyCode value cannot be determined through its Owner Attribute |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is not provided |
| AND | currencyCode has User input as Fixed in the account rule |
| AND | currencyCode value is determined for the owner attribute |
| BUT | the currencyCode value cannot be autocompleted through its owner attribute |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it cannot be autocompleted through its owner attribute." {0} - the tag we are validating, currencyCode in this case. |
Scenario_118 - CurrencyCode value cannot be found in the Value Matrix
| Element | Details |
|---|---|
| Scenario ID | Scenario_118 |
| Scenario Name | CurrencyCode value cannot be found in the Value Matrix |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is not provided |
| AND | currencyCode has User Input as Fixed in the Account Rule |
| AND | currencyCode value is determined for the Value Matrix |
| BUT | the currencyCode value cannot be autocompleted through the value matrix |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and no value can be found in the value matrix." {0} - the tag we are validating, currencyCode in this case. |
Scenario_119 - CurrencyCode value cannot be determined, so validation cannot be evaluated
| Element | Details |
|---|---|
| Scenario ID | Scenario_119 |
| Scenario Name | CurrencyCode value cannot be determined, so validation cannot be evaluated |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided |
| AND | currencyCode has User input as Fixed in the account rule |
| BUT | the currencyCode value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; it is impossible to determine if the {0} is valid according to the current account rule." {0} - the tag we are validating, currencyCode in this case. |
Scenario_120 - CurrencyCode value not provided and autocompletion is not possible
| Element | Details |
|---|---|
| Scenario ID | Scenario_120 |
| Scenario Name | CurrencyCode value not provided and autocompletion is not possible |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is not provided |
| AND | currencyCode has User input as Mandatory in the account rule |
| BUT | the currencyCode value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is mandatory." {0} - currencyCode |
Scenario_121 - Attribute Value for an Attribute with User Input Fixed cannot be evaluated as autocompletion is not possible
| Element | Details |
|---|---|
| Scenario ID | Scenario_121 |
| Scenario Name | Attribute Value for an Attribute with User Input Fixed cannot be evaluated as autocompletion is not possible |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the user has provided an Analytical Information Attribute (Category 1 - 7) Value |
| AND | Attribute has User input as Fixed in the account rule |
| BUT | Attribute value sent by the user cannot be compared with the value which would be autocompleted as autocompletion is not possible - there is no owner value or Value Matrix is not completed and there is no default value. |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid attribute value; attribute {0} is fixed in the account rule and it is impossible to determine if the value sent is valid." {0} - Attribute ID |
Scenario_122 - Amount/amount3/amount4 is defined in the company information but the currency does not exist
| Element | Details |
|---|---|
| Scenario ID | Scenario_122 |
| Scenario Name | Amount/amount3/amount4 is defined in the company information but the currency does not exist |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount/amount3/amount4 is defined in company information |
| BUT | the Currency code defined does not exist in the system |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Currency code {0} defined in company information does not exist." {0} - amount, amount3 or amount4 |
Scenario_123 - Currency code is not equal in every details - amounts section where the tax code <> 0
| Element | Details |
|---|---|
| Scenario ID | Scenario_123 |
| Scenario Name | Currency code is not equal in every details - amounts section where the tax code <> 0 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | summaryTaxInformation section is provided |
| BUT | Currency code is not equal in every details - amounts section where the tax code <> 0 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid currencyCode; if summaryTaxInformation is provided, the same Currency code must be used in all transaction lines where the tax code does not equal 0.” |
Scenario_124 - Discount date is not earlier than or equal to Due date.
| Element | Details |
|---|---|
| Scenario ID | Scenario_124 |
| Scenario Name | Discount date is not earlier than or equal to Due date. |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | dueDate and/or discountDate are provided or autocalculated |
| BUT | discountDate is not earlier than or equal to dueDate |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} must be earlier or equal to {1}." {0} - discountDate {1} - dueDate |
Scenario_125 - discountCurrencyAmount exceeds the total invoice amount
| Element | Details |
|---|---|
| Scenario ID | Scenario_125 |
| Scenario Name | discountCurrencyAmount exceeds the total invoice amount |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the DiscountCurrencyAmount exceeds the total invoice amount |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid discountCurrencyAmount; it cannot exceed the total invoice amount ({0})." {0} - The “Currency Amount” of the AP/AR row |
Scenario_126 - discountCurrencyAmount differs from the one calculated by the API
| Element | Details |
|---|---|
| Scenario ID | Scenario_126 |
| Scenario Name | discountCurrencyAmount differs from the one calculated by the API |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | System parameter CALC_PAY_DISC_AP/AR is ON, value = 1 |
| AND | the discountCurrencyAmount differs from the one calculated by the API |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid discountCurrencyAmount; value must be the calculated one ({0}) because system parameter {1} is ON with value 1." {0} - calculated value for discountCurrencyAmount {1} - CALC_PAY_DISC_AP For AP invoices and CALC_PAY_DISC_AR for AR invoices |
Scenario_127 - The number of decimals for one or more amounts exceeds the maximum number allowed
| Element | Details |
|---|---|
| Scenario ID | Scenario_127 |
| Scenario Name | The number of decimals for one or more amounts exceeds the maximum number allowed |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the number of decimals for DiscountCurrencyAmount exceeds 3, which is the maximum defined for this field |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded”. {0} - The amount that exceeds the number of decimals (DiscountCurrencyAmount) {1} - the maximum number of decimals that system can accept for field |
Scenario_128 - Discount percentage value exceeds the maximum numbers of decimals the database can handle
| Element | Details |
|---|---|
| Scenario ID | Scenario_128 |
| Scenario Name | Discount percentage value exceeds the maximum numbers of decimals the database can handle |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the discount percentage provided is 5.123456789% |
| BUT | the maximum numbers of decimals allowed in the database is 8 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded”. {0} - The amount that exceeds the number of decimals (discountPercentage) {1} - the maximum number of decimals that system can accept for field |
Scenario_129 - Discount percentage value is not between 0 and 99.99%
| Element | Details |
|---|---|
| Scenario ID | Scenario_129 |
| Scenario Name | Discount percentage value is not between 0 and 99.99% |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the discount percentage provided is 100% |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; value must be between 0 and 99.99%." {0} - discountPercentage |
Scenario_130 - discountCurrencyAmount without discountDate
| Element | Details |
|---|---|
| Scenario ID | Scenario_130 |
| Scenario Name | discountCurrencyAmount without discountDate |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the discountCurrencyAmount is sent |
| AND | there is no information about discounts in the credit term definition of the credit term sent (no autocompletion is possible) |
| BUT | the discountDate does not |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “{0} cannot be sent without {1}." {0} - field name {1} - dependent field name |
Scenario_131 - discountPercentage without discountDate
| Element | Details |
|---|---|
| Scenario ID | Scenario_131 |
| Scenario Name | discountPercentage without discountDate |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the discountPercentage is sent |
| AND | there is no information about discounts in the credit term definition of the credit term sent (no autocompletion is possible) |
| BUT | the discountDate does not |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “{0} cannot be sent without {1}." {0} - field name {1} - dependent field name |
Scenario_132 - discountDate without discountCurrencyAmount/discountPercentage
| Element | Details |
|---|---|
| Scenario ID | Scenario_132 |
| Scenario Name | discountDate without discountCurrencyAmount/discountPercentage |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the discountDate is sent |
| BUT | the discountCurrencyAmount does not |
| AND | there is no information about discounts in the credit term definition of the credit term sent (no autocompletion is possible) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “{0} cannot be sent without {1} or {2}." {0} - discountDate {1} - discountCurrencyAmount {2} - discountPercentage |
Scenario_133 - The sum of all Amount fields is greather than the maximum transaction difference
| Element | Details | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_133 | |||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount fields is greather than the maximum transaction difference | |||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.02 | |||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||
| Example Error Message | “The transaction does not balance due to a difference of {1} in {0}. This difference is greater than the maximum transaction difference defined in Company information." {0} - the validated field (Amount) {1} - the sum of all the Amount fields |
Scenario_134 - The sum of all Amount fields is smaller than the maximum transaction difference but there is no difference account
| Element | Details | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_134 | |||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount fields is smaller than the maximum transaction difference but there is no difference account | |||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.02 | |||||||||||||||||||||||||||||||||||
| BUT | there is no difference account defined for that company | |||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||
| Example Error Message | “There is no {0} defined in Company information for {1} to post the balance difference of {2}." {0} - the validated field (Difference account) {1} - the validated field (Amount) {2} - the sum of all the Amount fields |
Scenario_135 - The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but there is no balance account
| Element | Details | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_135 | ||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but there is no balance account | ||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||||||||||||
| AND | the balance flag is selected for Amount3/Amount4 in Company information | ||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | ||||||||||||||||||||||||||||||||||||||||
| BUT | there is no balance account defined for Amount3/Amount4 for that company | ||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “There is no {0} defined in Company information for {1} to post the balance difference of {2}." {0} - the validated field (Balance account) {1} - the validated field (Amount3/Amount4) {2} - the sum of all the Amount fields |
Scenario_136 - The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but balance account is not GL type
| Element | Details | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_136 | ||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but balance account is not GL type | ||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||||||||||||
| AND | the balance flag is selected for Amount3/Amount4 in Company information | ||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | ||||||||||||||||||||||||||||||||||||||||
| AND | there is a balance account defined for Amount3/Amount4 for that company | ||||||||||||||||||||||||||||||||||||||||
| BUT | the account type is different from GL | ||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account defined in {0} for {1} in Company information is not a GL account." {0} - the validated field (Balance account) {1} - the validated field (Amount3/Amount4) |
Scenario_137 - The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but balance account is not active
| Element | Details | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_137 | |||||||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but balance account is not active | |||||||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||||||||||||
| AND | the balance flag is selected for Amount3/Amount4 in Company information | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | |||||||||||||||||||||||||||||||||||||||||||||
| AND | there is a balance account defined for Amount3/Amount4 for that company | |||||||||||||||||||||||||||||||||||||||||||||
| BUT | the account is not Active (N) for that period | |||||||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account defined in {0} for {1} in Company information is closed for the period of the transaction {(2)}." {0} - the validated field (Balance account) {1} - the validated field (Amount3/Amount4) {2} - the period of the transaction |
Scenario_138 - The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but we cannot find a value for the posting attributes associated to the balance account rule
| Element | Details | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_138 | ||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but we cannot find a value for the posting attributes associated to the balance account rule | ||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||||||||||||
| AND | the balance flag is selected for Amount3/Amount4 in Company information | ||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | ||||||||||||||||||||||||||||||||||||||||
| AND | there is a balance account defined for Amount3/Amount4 for that company | ||||||||||||||||||||||||||||||||||||||||
| BUT | we cannot find a value for the posting attributes associated with the balance account rule | ||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account rule ({0}) is not valid for {1} defined for {2} in Company information. Check the account rule." {0} - the account rule {1} - the validated field (Balance account) {2} - the validated field (Amount3/Amount4) |
Scenario_139 - The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but the Currency is different from the company currency
| Element | Details | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_139 | ||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount3/Amount4 fields is greater than the maximum transaction difference but the Currency is different from the company currency | ||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||||||||||||
| AND | the balance flag is selected for Amount3/Amount4 in the company information | ||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | ||||||||||||||||||||||||||||||||||||||||
| AND | there is a balance account defined for Amount3/Amount4 for that company | ||||||||||||||||||||||||||||||||||||||||
| BUT | the company currency is USD | ||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account rule ({0}) is not valid for {1} defined for {2} in Company information. Check the account rule." {0} - the account rule {1} - the validated field (Balance account) {2} - the validated field (Amount3/Amount4) |
Scenario_140 - The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but difference account is not GL type
| Element | Details | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_140 | |||||||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but difference account is not GL type | |||||||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | |||||||||||||||||||||||||||||||||||||||||||||
| AND | there is a difference account defined for Amount/Amount3/Amount4 for that company | |||||||||||||||||||||||||||||||||||||||||||||
| BUT | the account type is different than GL | |||||||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account defined in {0} for {1} in Company information is not a GL account." {0} - the validated field (Difference account) {1} - the validated field (Amount/Amount3/Amount4) |
Scenario_141 - The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but difference account is not active
| Element | Details | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_141 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but difference account is not active | ||||||||||||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | there is a difference account defined for Amount/Amount3/Amount4 for that company | ||||||||||||||||||||||||||||||||||||||||||||||||||
| BUT | the account is not active (N) for that period | ||||||||||||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account defined in {0} for {1} in Company information is closed for the period of the transaction {(2)}." {0} - the validated field (Difference account) {1} - the validated field (Amount/Amount3/Amount4) {2} - the period of the transaction |
Scenario_142 - The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but we cannot find a value for the posting attributes associated to the difference account rule
| Element | Details | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_142 | |||||||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but we cannot find a value for the posting attributes associated to the difference account rule | |||||||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | |||||||||||||||||||||||||||||||||||||||||||||
| AND | there is a difference account defined for Amount/Amount3/Amount4 for that company | |||||||||||||||||||||||||||||||||||||||||||||
| BUT | we cannot find a value for the posting attributes associated with the difference account rule | |||||||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account rule {(0)} is not valid for the account {1} defined for {2} in Company information. Check the account rule." {0} - the account rule {1} - the validated field (Difference account) {2} - the validated field (Amount/Amount3/Amount4) |
Scenario_143 - The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but the Currency is different from the company currency
| Element | Details | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_143 | |||||||||||||||||||||||||||||||||||||||||||||
| Scenario Name | The sum of all Amount/Amount3/Amount4 fields is smaller than the maximum transaction difference but the Currency is different from the company currency | |||||||||||||||||||||||||||||||||||||||||||||
| HTTP Code | 422 | |||||||||||||||||||||||||||||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | |||||||||||||||||||||||||||||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| |||||||||||||||||||||||||||||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.05 | |||||||||||||||||||||||||||||||||||||||||||||
| AND | there is a difference account defined for Amount/Amount3/Amount4 for that company | |||||||||||||||||||||||||||||||||||||||||||||
| BUT | the company currency is USD | |||||||||||||||||||||||||||||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | |||||||||||||||||||||||||||||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the response contains the error message below: | |||||||||||||||||||||||||||||||||||||||||||||
| AND | the transaction is not posted | |||||||||||||||||||||||||||||||||||||||||||||
| Example Error Message | “The account rule {(0)} is not valid for the account {1} defined for {2} in Company information. Check the account rule." {0} - the account rule {1} - the validated field (Difference account) {2} - the validated field (Amount/Amount3/Amount4) |
Scenario_144 - Line Type does not equal AP or AR or GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_144 |
| Scenario Name | Line Type does not equal AP or AR or GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | lineType is provided |
| BUT | lineType does not equal AP or AR or GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid lineType; Line Type must equal AP or AR or GL or should be empty.” |
Scenario_145 - Line Type does not match the account according to the system setup
| Element | Details |
|---|---|
| Scenario ID | Scenario_145 |
| Scenario Name | Line Type does not match the account according to the system setup |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | lineType is provided |
| AND | account is provided |
| BUT | lineType does not match the account according to the system setup |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid lineType; Account {0} is “{1}” account type." {0} - account number {1} - account type for account {0} according to the system setup |
Scenario_146 - Account and Line Type for a detail have not been provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_146 |
| Scenario Name | Account and Line Type for a detail have not been provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | account and lineType for a detail have not been provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “If this is a GL detail - line type and account must be provided. If this is an AP/AR detail - either line type, account or both must be provided.” |
Scenario_147 - GL account has not been provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_147 |
| Scenario Name | GL account has not been provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | line type GL has been provided |
| BUT | GL account has not been provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “For GL details account must be provided.” |
Scenario_148 - AP/AR account has not been provided or autocompleted
| Element | Details |
|---|---|
| Scenario ID | Scenario_148 |
| Scenario Name | AP/AR account has not been provided or autocompleted |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | lineType AP or AR has been provided |
| BUT | AP/AR account has not been provided or autocompleted |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Account is not provided and it can’t be autocompleted.” |
Scenario_149 - Account defined in the Difference account/Balance account does not exist for the selected period
| Element | Details | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario ID | Scenario_149 | ||||||||||||||||||
| Scenario Name | Account defined in the Difference account/Balance account does not exist for the selected period | ||||||||||||||||||
| HTTP Code | 422 | ||||||||||||||||||
| GIVEN | that a Financial Transaction needs to be posted | ||||||||||||||||||
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available | ||||||||||||||||||
| AND | a transaction document is sent, containing the information below:
| ||||||||||||||||||
| AND | the maximum transaction difference allowed for the company is 0.02 | ||||||||||||||||||
| AND | the account 9995 is defined in difference/balance account for Amount/Amount3/Amount4 for that company | ||||||||||||||||||
| BUT | GL account (Difference account/Balance account) 9995 does not exist for period 202004 | ||||||||||||||||||
| WHEN | the transaction is posted to the transaction resource in the API | ||||||||||||||||||
| THEN | a 422 response (Unprocessable entity) is returned | ||||||||||||||||||
| AND | the response contains the error message below: | ||||||||||||||||||
| AND | the transaction is not posted | ||||||||||||||||||
| Example Error Message | “The account defined in {0} for {1} in Company information does not exist for the period of the transaction ({2})." {0} - validated field (Difference account/Balance account) {1} - validated field (Amount/Amount3/Amount4) {2} - period of the transaction |
Scenario_150 - Invalid account rule in the account defined in the Difference account/Balance account
| Element | Details |
|---|---|
| Scenario ID | Scenario_150 |
| Scenario Name | Invalid account rule in the account defined in the Difference account/Balance account |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent, containing the information below: |
| AND | the maximum transaction difference allowed for the company is 0.02 |
| AND | the account 9995 is defined in Difference/Balance account for Amount/Amount3/Amount4 for that company |
| BUT | the account rule (Help accounts) of the GL account (Difference account/Balance account) 9995 is closed |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid account rule ({0}) for the {1} defined for {2} in Company information. Status must be N (Active)." {0} - Account rule name {1} - Validated field (Difference account/Balance account) {2} - Validated field (Amount/Amount3/Amount4) |
Scenario_151 - The account type of the account (accountingInformation) and the flag (GL,AP,AR) of the tax code must be equal
| Element | Details |
|---|---|
| Scenario ID | Scenario_151 |
| Scenario Name | The account type of the account (accountingInformation) and the flag (GL,AP,AR) of the tax code must be equal |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the account has been provided or autocompleted in one of the details |
| AND | taxCode has been provided or autocompleted in that same detail |
| BUT | taxCode has not the same flag (GL, AP or AR) as the account type |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} must be set to {1}." {0} - the validated field (Tax code) {1} - the account type |
Scenario_152 - Account for the balancing attribute is not active for the selected period
| Element | Details |
|---|---|
| Scenario ID | Scenario_152 |
| Scenario Name | Account for the balancing attribute is not active for the selected period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a balancing attribute is defined in Company information |
| AND | the transaction does not balance in the balancing attribute |
| BUT | the account for the balancing attribute is not active for the selected period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Transaction does not balance in balancing attribute {0} and account {1} defined for it in Company information is invalid; status must be N (Active) for Period {2}." {0} - the balancing attribute ID {1} - the account defined for balancing attribute in Company information {2} - the value of the period set in the JSON file |
Scenario_153 - Account for the balancing attribute is not of the type GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_153 |
| Scenario Name | Account for the balancing attribute is not of the type GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a balancing attribute is defined in Company information |
| AND | the transaction does not balance in the balancing attribute |
| BUT | the account type of the balancing attribute is not GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Transaction does not balance in balancing attribute {0} and account {1} defined for it in Company Information is invalid; account type must be GL." {0} - the balancing attribute ID {1} - the account defined for the balancing attribute in Company information |
Scenario_154 - Account for the balancing attribute is not set in Company Information
| Element | Details |
|---|---|
| Scenario ID | Scenario_154 |
| Scenario Name | Account for the balancing attribute is not set in Company Information |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a balancing attribute is defined in Company information |
| AND | the transaction does not balance in the balancing attribute |
| BUT | the account for the balancing attribute is not set in Company Information |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Transaction does not balance in balancing attribute {0} and account for it in Company Information is not defined; provide account number." {0} - the balancing attribute ID |
Scenario_155 - Balancing attribute is not part of account rule of the GL account defined for balancing attribute
| Element | Details |
|---|---|
| Scenario ID | Scenario_155 |
| Scenario Name | Balancing attribute is not part of account rule of the GL account defined for balancing attribute |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a balancing attribute is defined in Company information |
| AND | the transaction does not balance in the balancing attribute |
| BUT | the balancing attribute is not part of the account rule of the GL account defined for the balancing attribute |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Transaction does not balance in balancing attribute {0} and account rule {2} of balance account {1} in Company information is invalid; it must contain balancing attribute {0}." {0} - the balancing attribute ID {1} - the account defined for the balancing attribute in Company information {2} - the description of the account rule |
Scenario_156 - Attribute value for attribute Y has no relation to attribute value for attribute X
| Element | Details |
|---|---|
| Scenario ID | Scenario_156 |
| Scenario Name | Attribute value for attribute Y has no relation to attribute value for attribute X |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | attribute Y in an account rule has been set up with a validation relation to attribute X |
| BUT | the attribute value for attribute Y has no relation to the attribute value for attribute X |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Attribute Value. {0} {1} has no relation to {2} {3}. For {0} {1} the matching {2} value is {3}." {0} - attribute Y {1} - attribute Y value {2} - attribute X {3} - attribute X value |
Scenario_157 - TaxCode defined
| Element | Details |
|---|---|
| Scenario ID | Scenario_157 |
| Scenario Name | TaxCode defined |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| BUT | taxCode is not defined into the system |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown {0}." {0} - the tag we are validating, taxCode in this case. |
Scenario_158 - TaxCode must exist for the given TaxPointDate
| Element | Details |
|---|---|
| Scenario ID | Scenario_158 |
| Scenario Name | TaxCode must exist for the given TaxPointDate |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| AND | taxPointDate has been provided or autocompleted |
| BUT | taxCode does not exist for the given taxPointDate |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} does not exist for given {1} ({2})." {0} - the validated field (Tax Code) {1} - the Tax point date field {2} - value of Tax point date |
Scenario_159 - TaxCode must be active for the given TaxPointDate
| Element | Details |
|---|---|
| Scenario ID | Scenario_159 |
| Scenario Name | TaxCode must be active for the given TaxPointDate |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| AND | taxPointDate has been provided or autocompleted |
| BUT | taxCode is not active for the given taxPointDate |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; status must be N (Active) for {1} ({2})" {0} - the validated field (Tax code) {1} - the Tax point date field {2} - value of Tax point date |
Scenario_160 - TaxCode value do not matching value determined for the Account Rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_160 |
| Scenario Name | TaxCode value do not matching value determined for the Account Rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is provided |
| AND | taxCode has User input as Fixed in the account rule |
| BUT | provided the taxCode value is not the same as the one determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it must be {1}." {0} - the tag we are validating, taxCode in this case. {1} - the value we would get if we applied code completion. |
Scenario_161 - TaxCode value do not matching value determined for the Supplier
| Element | Details |
|---|---|
| Scenario ID | Scenario_161 |
| Scenario Name | TaxCode value do not matching value determined for the Supplier |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is provided |
| AND | taxCode has User input as Mandatory in the account rule |
| AND | taxCode is flagged as Fixed for the supplier |
| BUT | provided the taxCode value is not the same as the one determined for the supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed for the supplier and it must be {1}." {0} - the tag we are validating, taxCode in this case. {1} - the value we would get if we applied code completion. The value for the supplier. |
Scenario_162 - TaxCode value cannot be determined through its Owner Attribute
| Element | Details |
|---|---|
| Scenario ID | Scenario_162 |
| Scenario Name | TaxCode value cannot be determined through its Owner Attribute |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is not provided |
| AND | taxCode has User input as Fixed in the account rule |
| AND | taxCode value is determined for the owner attribute |
| BUT | the taxCode value cannot be autocompleted through its owner attribute |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it cannot be autocompleted through its owner attribute." {0} - the tag we are validating, taxCode in this case. |
Scenario_163 - TaxCode value cannot be found in the Value Matrix
| Element | Details |
|---|---|
| Scenario ID | Scenario_163 |
| Scenario Name | TaxCode value cannot be found in the Value Matrix |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is not provided |
| AND | taxCode has User input as Fixed in the account rule |
| AND | the taxCode value is determined for the value matrix |
| BUT | the taxCode value cannot be autocompleted through the value matrix |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and no value can be found in the value matrix." {0} - the tag we are validating, taxCode in this case. |
Scenario_164 - TaxCode value cannot be determined, so validation cannot be evaluated
| Element | Details |
|---|---|
| Scenario ID | Scenario_164 |
| Scenario Name | TaxCode value cannot be determined, so validation cannot be evaluated |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is provided |
| AND | taxCode has User input as Fixed in the account rule |
| BUT | the taxCode value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; it is impossible to determine if the {0} is valid according to the current account rule." {0} - the tag we are validating, taxCode in this case. |
Scenario_165 - TaxCode value not provided and autocompletion is not possible
| Element | Details |
|---|---|
| Scenario ID | Scenario_165 |
| Scenario Name | TaxCode value not provided and autocompletion is not possible |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode is not provided |
| AND | taxCode has User input as Mandatory in the account rule |
| BUT | the taxCode value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is mandatory." {0} - the tag we are validating, taxCode in this case. |
Scenario_166 - VAT account exists for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_166 |
| Scenario Name | VAT account exists for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| BUT | the VAT account does not exist for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}) for Period {2}." {0} - the validated field (VAT account) {1} - the account {2} - the period |
Scenario_167 - VAT account is not active for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_167 |
| Scenario Name | VAT account is not active for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| BUT | the VAT account is not active for that period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); status must be N (Active) for Period {2}." {0} - the validated field (VAT account) {1} - the account {2} - the period |
Scenario_168 - VAT account type is GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_168 |
| Scenario Name | VAT account type is GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| BUT | the VAT account type is not GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); account type of {0} must be {2}." {0} - the validated field (VAT account) {1} - the account {2} - the account type (GL) |
Scenario_169 - Non deductible VAT account exists for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_169 |
| Scenario Name | Non deductible VAT account exists for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| AND | there is reduction in taxes |
| BUT | the non-deductible VAT account does not exist for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}) for period {2}." {0} - the validated field (Non deductible VAT account) {1} - the account {2} - the period |
Scenario_170 - Non deductible VAT account is not active for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_170 |
| Scenario Name | Non deductible VAT account is not active for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| AND | there is reduction in taxes |
| BUT | the non-deductible VAT account is not active for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); status must be N (Active) for period {2}." {0} - the validated field (Non deductible VAT account) {1} - the account {2} - the period |
Scenario_171 - Non deductible VAT account type is GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_171 |
| Scenario Name | Non deductible VAT account type is GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| AND | there is reduction in taxes |
| BUT | the non-deductible VAT account type is not GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); account type of {0} must be {2}." {0} - the validated field (non-deductible VAT account) {1} - the account {2} - account type (GL) |
Scenario_172 - Undeclared VAT account exists for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_172 |
| Scenario Name | Undeclared VAT account exists for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| AND | cash principle is set in taxCode |
| BUT | the undeclared VAT account does not exist for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}) for period {2}." {0} - the validated field (undeclared VAT account) {1} - the account {2} - the period |
Scenario_173 - Undeclared VAT account is not active for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_173 |
| Scenario Name | Undeclared VAT account is not active for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxCode has been provided or autocompleted |
| AND | cash principle is set in taxCode |
| BUT | the undeclared VAT account is not active for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); status must be N (Active) for period {2}." {0} - the validated field (undeclared VAT account) {1} - the account {2} - the period |
Scenario_174 - Undeclared VAT account type is GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_174 |
| Scenario Name | Undeclared VAT account type is GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxCode has been provided or autocompleted |
| AND | cash principle is set in taxCode |
| BUT | the undeclared VAT account type is not GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); account type of {0} must be {2}." {0} - the validated field (undeclared VAT account) {1} - the account {2} - account type (GL) |
Scenario_175 - TaxSystem defined
| Element | Details |
|---|---|
| Scenario ID | Scenario_175 |
| Scenario Name | TaxSystem defined |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem has been provided or autocompleted |
| BUT | taxSystem is not defined into the system |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown {0}." {0} - the tag we are validating, taxSystem in this case. |
Scenario_176 - TaxSystem value do not matching value determined for the Account Rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_176 |
| Scenario Name | TaxSystem value do not matching value determined for the Account Rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is provided |
| AND | taxSystem has User input as Fixed in the account rule |
| BUT | provided the taxSystem value is not the same as the one determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it must be {1}." {0} - the tag we are validating, taxSystem in this case {1} - the value we would get if we applied code completion |
Scenario_177 - TaxSystem value do not matching value determined for the Supplier
| Element | Details |
|---|---|
| Scenario ID | Scenario_177 |
| Scenario Name | TaxSystem value do not matching value determined for the Supplier |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is provided |
| AND | taxSystem has User input as Mandatory in the account rule |
| AND | taxSystem is flagged as Fixed for the supplier |
| BUT | provided the taxSystem value is not the same as the one determined for the supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed for the supplier and it must be {1}." {0} - the tag we are validating, taxSystem in this case {1} - the value we would get if we applied code completion. The value for the supplier. |
Scenario_178 - TaxSystem value do not matching value determined for the Customer
| Element | Details |
|---|---|
| Scenario ID | Scenario_178 |
| Scenario Name | TaxSystem value do not matching value determined for the Customer |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is provided |
| AND | taxSystem has User input as Mandatory in the account rule |
| AND | taxSystem is flagged as Fixed for the customer |
| BUT | provided the taxSystem value is not the same as the one determined for the customer |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed for the customer and it must be {1}." {0} - the tag we are validating, taxSystem in this case {1} - the value we would get if we applied code completion. The value for the customer. |
Scenario_179 - TaxSystem value cannot be determined through its Owner Attribute
| Element | Details |
|---|---|
| Scenario ID | Scenario_179 |
| Scenario Name | TaxSystem value cannot be determined through its Owner Attribute |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is not provided |
| AND | taxSystem has User input as Fixed in the account rule |
| AND | taxSystem value is determined for the owner attribute |
| BUT | the taxSystem value cannot be autocompleted through its owner attribute |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it cannot be autocompleted through its owner attribute." {0} - the tag we are validating, taxSystem in this case. |
Scenario_180 - TaxSystem value cannot be found in the Value Matrix
| Element | Details |
|---|---|
| Scenario ID | Scenario_180 |
| Scenario Name | TaxSystem value cannot be found in the Value Matrix |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is not provided |
| AND | taxSystem has User input as Fixed in the account rule |
| AND | the taxSystem value is determined for the value matrix |
| BUT | the taxSystem value cannot be autocompleted through the value matrix |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and no value can be found in the value matrix." {0} - the tag we are validating, taxSystem in this case. |
Scenario_181 - TaxSystem value not provided and autocompletion is not possible
| Element | Details |
|---|---|
| Scenario ID | Scenario_181 |
| Scenario Name | TaxSystem value not provided and autocompletion is not possible |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem is not provided |
| AND | taxSystem has User input as Mandatory in the account rule |
| BUT | the taxSystem value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is mandatory." {0} - the tag we are validating, taxSystem in this case. |
Scenario_182 - VAT reverse charge account exists for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_182 |
| Scenario Name | VAT reverse charge account exists for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxSystem has been provided or autocompleted |
| BUT | the VAT reverse charge account does not exist for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}) for period {2}." {0} - the validated field (VAT reverse charge account) {1} - the account {2} - the period |
Scenario_183 - VAT reverse charge account is not active for the GL period
| Element | Details |
|---|---|
| Scenario ID | Scenario_183 |
| Scenario Name | VAT reverse charge account is not active for the GL period |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a period has been provided or autocompleted |
| AND | taxSystem has been provided or autocompleted |
| BUT | the VAT reverse charge account is not active for the period |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); status must be N (Active) for period {2}." {0} - the validated field (VAT reverse charge account) {1} - the account {2} - the period |
Scenario_184 - VAT reverse charge account type is GL
| Element | Details |
|---|---|
| Scenario ID | Scenario_184 |
| Scenario Name | VAT reverse charge account type is GL |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxSystem has been provided or autocompleted |
| BUT | the VAT reverse charge account type is not GL |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0} ({1}); account type of {0} must be {2}." {0} - the validated field (VAT reverse charge account) {1} - the account {2} - the account type (GL) |
Scenario_185 - FactorVat defined
| Element | Details |
|---|---|
| Scenario ID | Scenario_185 |
| Scenario Name | FactorVat defined |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat has been provided or autocompleted |
| BUT | factorVat is not defined into the system |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown {0}." {0} - the tag we are validating, factorVat in this case. |
Scenario_186 - FactorVat must be active
| Element | Details |
|---|---|
| Scenario ID | Scenario_186 |
| Scenario Name | FactorVat must be active |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat has been provided or autocompleted |
| BUT | factorVat status is not active (N) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; status must be N (Active)" {0} - the tag we are validating, factorVat in this case. |
Scenario_187 - FactorVat value do not matching value determined for the Account Rule
| Element | Details |
|---|---|
| Scenario ID | Scenario_187 |
| Scenario Name | FactorVat value do not matching value determined for the Account Rule |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat is provided |
| AND | factorVat has User input as Fixed in the account rule |
| BUT | provided the factorVat value is not the same as the one determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it must be {1}." {0} - the tag we are validating, factorVat in this case {1} - the value we would get if we applied code completion |
Scenario_188 - FactorVat value cannot be determined through its Owner Attribute
| Element | Details |
|---|---|
| Scenario ID | Scenario_188 |
| Scenario Name | FactorVat value cannot be determined through its Owner Attribute |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat is not provided |
| AND | factorVat has User input as Fixed in the account rule |
| AND | factorVat value is determined for the owner attribute |
| BUT | the factorVat value cannot be autocompleted through its owner attribute |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and it cannot be autocompleted through its owner attribute." {0} - the tag we are validating, factorVat in this case. |
Scenario_189 - FactorVat value cannot be found in the Value Matrix
| Element | Details |
|---|---|
| Scenario ID | Scenario_189 |
| Scenario Name | FactorVat value cannot be found in the Value Matrix |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat is not provided |
| AND | factorVat has User input as Fixed in the account rule |
| AND | the factorVat value is determined for the value matrix |
| BUT | the factorVat value cannot be autocompleted through the value matrix |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is fixed in the account rule and no value can be found in the value matrix." {0} - the tag we are validating, factorVat in this case. |
Scenario_190 - FactorVat value not provided and autocompletion is not possible
| Element | Details |
|---|---|
| Scenario ID | Scenario_190 |
| Scenario Name | FactorVat value not provided and autocompletion is not possible |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | factorVat is not provided |
| AND | factorVat has User input as Mandatory in the account rule |
| BUT | the factorVat value cannot be determined for the account rule |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; {0} is mandatory." {0} - the tag we are validating, factorVat in this case. |
Scenario_191 - VatPercentage field and taxAmounts section are not provided
| Element | Details |
|---|---|
| Scenario ID | Scenario_191 |
| Scenario Name | VatPercentage field and taxAmounts section are not provided |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxInput DTO is provided |
| BUT | the vatPercentage field and the taxAmounts section are not provided |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid taxInput; either vatPercentage or taxAmounts or both must be provided.” |
Scenario_192 - TaxSystem is set as exempt
| Element | Details |
|---|---|
| Scenario ID | Scenario_192 |
| Scenario Name | TaxSystem is set as exempt |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | taxInput - taxAmounts is provided |
| BUT | taxSystem is set as exempt |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid taxAmounts; if taxAmounts value is provided, taxSystem cannot be Exempt.” |
Scenario_193 - Secondary open items - Secondary open item on GL lines
| Element | Details |
|---|---|
| Scenario ID | Scenario_193 |
| Scenario Name | Secondary open items - Secondary open item on GL lines |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Secondary open items information is sent in GL line |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Secondary open items is only allowed for AP lines.” |
Scenario_194 - Secondary open items - Secondary open item on AR lines
| Element | Details |
|---|---|
| Scenario ID | Scenario_194 |
| Scenario Name | Secondary open items - Secondary open item on AR lines |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Secondary open items information is sent in AR line |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Secondary open items is only allowed for AP lines.” |
Scenario_195 - Secondary open items - Missing Payment Recipent
| Element | Details |
|---|---|
| Scenario ID | Scenario_195 |
| Scenario Name | Secondary open items - Missing Payment Recipent |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Secondary open items information is sent in AP line with no paymentRecipient |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the following error message: |
| AND | the transaction is not posted. |
Scenario_196 - Secondary open items - Missing Currency Amount
| Element | Details |
|---|---|
| Scenario ID | Scenario_196 |
| Scenario Name | Secondary open items - Missing Currency Amount |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Secondary open items information is sent in AP line with currencyAmount (0 or empty) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the following error message: |
| AND | the transaction is not posted |
Scenario_197 - Secondary open items - Currency Amount with different sign on Primary and Secondary open items
| Element | Details |
|---|---|
| Scenario ID | Scenario_197 |
| Scenario Name | Secondary open items - Currency Amount with different sign on Primary and Secondary open items |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the AP line currencyAmount has different sign that Secondary open item currencyAmount |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Secondary open item: Invalid Currency amount, it should have the same sign as in the “AP” detail line.” |
Scenario_198 - Secondary open items - Sencondary open item on AP row with taxes
| Element | Details |
|---|---|
| Scenario ID | Scenario_198 |
| Scenario Name | Secondary open items - Sencondary open item on AP row with taxes |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the AP line related to a Secondary open item has taxes (taxCode different than ‘0’) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Secondary open item is not valid when taxes are provided/autocompleted in the “AP” detail line.” |
Scenario_199 - Secondary open items - More than one secondary open item per AP row
| Element | Details |
|---|---|
| Scenario ID | Scenario_199 |
| Scenario Name | Secondary open items - More than one secondary open item per AP row |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Secondary open item elements contains more than one element |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Only one secondary open item is allowed per AP line.” |
Scenario_200 - Secondary open items - Unparseable Due Date
| Element | Details |
|---|---|
| Scenario ID | Scenario_200 |
| Scenario Name | Secondary open items - Unparseable Due Date |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | the Secondary open item dueDate is provided as an unparseable date (e.g. “1125”, “Any text”, …) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is obtained |
| AND | the response contains the error message below: |
| AND | the transaction is not posted. |
| Example Error Message | “Invalid Due Date; date format must be YYYY-MM-DD.” |
Scenario_201 - Secondary open items - Due Date with a date earlier than 1900-01-01
| Element | Details |
|---|---|
| Scenario ID | Scenario_201 |
| Scenario Name | Secondary open items - Due Date with a date earlier than 1900-01-01 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | the Secondary open item dueDate is equal to or less than 1900-01-01 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Due Date; Due Date must be later than 1900-01-01.” |
Scenario_202 - Secondary open items - Due Date with a date later than 2099-12-31
| Element | Details |
|---|---|
| Scenario ID | Scenario_202 |
| Scenario Name | Secondary open items - Due Date with a date later than 2099-12-31 |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| BUT | the Secondary open item dueDate is equal or more than 2099-12-31 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Due Date; Due Date must be earlier than 2099-12-31.” |
Scenario_203 - Secondary open items - Payment recipient does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_203 |
| Scenario Name | Secondary open items - Payment recipient does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentRecipient is provided for a Secondary open item |
| BUT | paymentRecipient for that Secondary open item is not defined in ERPx |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Payment recipient.” |
Scenario_204 - Secondary open items - Payment recipient is not active for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_204 |
| Scenario Name | Secondary open items - Payment recipient is not active for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentRecipient is provided for a Secondary open item |
| BUT | paymentRecipient status for that Secondary open item is not active (N) or parked (P) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment recipient; status must be N (Active) or P (Parked).” |
Scenario_205 - Secondary open items - Payment recipient is different than defined in given SupplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_205 |
| Scenario Name | Secondary open items - Payment recipient is different than defined in given SupplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentRecipient is provided for a Secondary open item |
| AND | paymentRecipient for given supplier is FIXED |
| BUT | paymentRecipient from transaction document is not equal to Payment recipient defined in supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment recipient; for {0} {1} payment recipient is fixed and must be {2}." {0} - SupplierID {1} - SupplierID value set in the JSON file {2} - Payment recipient value defined for given SupplierID |
Scenario_206 - Secondary open items - SupplierId is different than defined in given Payment recipent
| Element | Details |
|---|---|
| Scenario ID | Scenario_206 |
| Scenario Name | Secondary open items - SupplierId is different than defined in given Payment recipent |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentRecipient is provided for a Secondary open item |
| AND | SupplierId for given Payment recipient is FIXED |
| BUT | SupplierId from transaction document is not equal to SupplierId defined in Payment recipient |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; for payment recipient {1} {0} is fixed and must be {2}." {0} - SupplierID {1} - Payment recipient value set in the JSON file {2} - SupplierID value defined for a given Payment recipient |
Scenario_207 - Secondary open items - Same Payment recipent than related AP line
| Element | Details |
|---|---|
| Scenario ID | Scenario_207 |
| Scenario Name | Secondary open items - Same Payment recipent than related AP line |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | same paymentRecipient is provided at invoice level and Secondary Open items level |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response at Invoice level and Secondary Open item level contains the error message below: |
| AND | the transaction is not posted |
Scenario_208 - Secondary open items - Payment method does not exist for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_208 |
| Scenario Name | Secondary open items - Payment method does not exist for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentMethod is provided for a Secondary open item |
| BUT | paymentMethod fror that Secondary open item is not defined in ERPx |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Unknown Payment method.” |
Scenario_209 - Secondary open items - Payment method is not active for given Company
| Element | Details |
|---|---|
| Scenario ID | Scenario_209 |
| Scenario Name | Secondary open items - Payment method is not active for given Company |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | paymentMethod is provided provided for a Secondary open item |
| AND | paymentMethod is defined in ERPx |
| BUT | paymentMethod is not active (N) |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment method; status must be N (Active).” |
Scenario_210 - Secondary open items - Payment method is different than defined in given SupplierId
| Element | Details |
|---|---|
| Scenario ID | Scenario_210 |
| Scenario Name | Secondary open items - Payment method is different than defined in given SupplierId |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | Payment method is provided provided for a Secondary open item |
| AND | SupplierID is provided |
| AND | paymentMethod for given supplier is FIXED |
| BUT | paymentMethod from transaction document is not equal to payment method defined in supplier |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid Payment method; for {0} {1} payment method is fixed and must be {2}." {0} - SupplierID {1} - SupplierID value set in the JSON file {2} - Payment method defined for givenSupplierID |
Scenario_211 - Secondary open items - The number of decimals for one or more amounts exceeds the maximum number allowed
| Element | Details |
|---|---|
| Scenario ID | Scenario_211 |
| Scenario Name | Secondary open items - The number of decimals for one or more amounts exceeds the maximum number allowed |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | at Secondary open items element the number of decimals for one or more “Amounts” (Currency Amount, Amount, Amount3 or Amount4) exceeds 3, which is the maximum defined for those fields |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded." {0} - The amount that exceeds the number of decimals (this may be “Currency Amount”, “Amount”, “Amount3” or “Amount4”) {1} - the maximum number of decimals that system can accept for field |
Scenario_212 - Secondary open items - The number of decimals for one or more amounts exceeds the maximum number of decimals defined for the Currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_212 |
| Scenario Name | Secondary open items - The number of decimals for one or more amounts exceeds the maximum number of decimals defined for the Currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | at Secondary open items element the number of decimals for one or more of the “Amounts” (Currency Amount, Amount, Amount3 or Amount4) exceeds the maximum number of decimals defined for the corresponding currency, but is less than the general maximum of 3 |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “Invalid {0}; the maximum number of decimals that the system can accept ({1}) has been exceeded." {0} - The amount that exceeds the number of decimals (this may be “Currency Amount”, “Amount”, “Amount3” or “Amount4”) {1} - the maximum number of decimals that system can accept for field |
Scenario_213 - Secondary open items - There is no currency definition for one of the amounts included in the JSON file
| Element | Details |
|---|---|
| Scenario ID | Scenario_213 |
| Scenario Name | Secondary open items - There is no currency definition for one of the amounts included in the JSON file |
| HTTP Code | 422 |
| GIVEN | that there is a POST API for financial transactions |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | at Secondary open items element a value other than zero is set in “Amount3” and “Amount4” |
| BUT | no currency is defined for these amounts in the Company information tab for the Company Id set in the JSON file |
| WHEN | the transaction is posted to the transaction resource on the API |
| THEN | a 422 response (Unprocessable entity) is returned |
| AND | the response contains the error message below for each of the details with a value other than 0 in “Amount3” and “Amount4” |
| AND | the transaction is not posted |
| Example Error Message | “Currency not defined for “{0}” in Company Id {1}" {0} - The amount whose value is different than 0 but which has no corresponding currency definition (this may be “Amount3” or “Amount4”) {1} - The value of the Company Id set in the JSON file |
Scenario_214 - Secondary open items - Exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_214 |
| Scenario Name | Secondary open items - Exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided on the open item |
| AND | the Amount/Amount3 fields are = 0 in the related Secondary open item |
| BUT | for the transaction date, exchange rate does not exist for the currency type defined in account rule for amount/amount3 currency |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No Exchange rate found for {0} in currency type “{1}” date {2} to calculate {3}, amount currency type is defined with the account rule of the GL account." {0} - Currency code {1} - Currency type {2} - voucher date {3} - the amount we are calculating (amount or amount3 or amount4) |
Scenario_215 - Secondary open items - Exchange rate does not exist for the currency type defined in company information for amount4 currency
| Element | Details |
|---|---|
| Scenario ID | Scenario_215 |
| Scenario Name | Secondary open items - Exchange rate does not exist for the currency type defined in company information for amount4 currency |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | currencyCode is provided on the open item |
| AND | the Amount4 field is = 0 in the related Secondary open item |
| BUT | for the transaction date, exchange rate does not exist for the currency type defined in company information for amount4 currency |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “No Exchange rate found for {0} in currency type “{1}” date {2} to calculate {3}, amount currency type is defined in company information." {0} - Currency code {1} - Currency type {2} - voucher date {3} - The amount we are calculating (amount or amount3 or amount4) |
Scenario_216 - Secondary open items - Currency is not defined for amount3/amount4 in the company information
| Element | Details |
|---|---|
| Scenario ID | Scenario_216 |
| Scenario Name | Secondary open items - Currency is not defined for amount3/amount4 in the company information |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | amount3/amount4 is provided on the Secondary open item |
| BUT | currency for amount3/amount4 is not defined in company information |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The currency code is not defined for {0} in the company information table. Please define one." {0} - amount3 or amount4 |
Scenario_217 - Posting a Financial Transaction with a TaxCode transferring to any linked tax code
| Element | Details |
|---|---|
| Scenario ID | Scenario_217 |
| Scenario Name | Posting a Financial Transaction with a TaxCode transferring to any linked tax code |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a TaxCode is provided in the transaction details |
| BUT | that TaxCode has any linked tax code in the “Transfer to” section of the tax code setup |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The Financial transactions API does not support linked tax codes (configuration in the ‘Transfer to’ section of a Tax code is not considered).” |
Scenario_218 - Posting a Financial Transaction with a TaxSystem that has the 'Base excluding discount' flag selected
| Element | Details |
|---|---|
| Scenario ID | Scenario_218 |
| Scenario Name | Posting a Financial Transaction with a TaxSystem that has the ‘Base excluding discount’ flag selected |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a TaxSystem is provided in the transaction details |
| BUT | that TaxSystem has the ‘Base excluding discount’ flag selected |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The Financial transactions API does not support Tax systems with the ‘Base excluding discount’ setup (the tax calculation does not consider this specific logic).” |
Scenario_219 - Posting a Financial Transaction with a TaxSystem that has the 'VAT Transaction' flag selected
| Element | Details |
|---|---|
| Scenario ID | Scenario_219 |
| Scenario Name | Posting a Financial Transaction with a TaxSystem that has the ‘VAT Transaction’ flag selected |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | a TaxSystem is provided in the transaction details |
| BUT | that TaxSystem has the ‘VAT Transaction’ flag selected |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “The Financial transactions API does not support Tax systems with the ‘VAT transaction’ setup (the tax calculation does not consider this specific logic).” |
Scenario_220 - A transaction has more transaction details than the maximum number allowed.
| Element | Details |
|---|---|
| Scenario ID | Scenario_220 |
| Scenario Name | A transaction has more transaction details than the maximum number allowed. |
| HTTP Code | 422 |
| GIVEN | that a Financial Transaction needs to be posted |
| AND | a Financial Transactions API with a “financial-transactions” endpoint is available |
| AND | a transaction document is sent |
| AND | the transaction contains more than 500 detail lines in the request payload |
| WHEN | the transaction is posted to the transaction resource in the API |
| THEN | a 422 response (Unprocessable Entity) is returned |
| AND | the response contains the error message below: |
| AND | the transaction is not posted |
| Example Error Message | “This transaction contains {0} details, which exceeds the maximum allowed {1}." {0} - The number of detail lines provided in the request payload {1} - The maximum number of allowed detail lines (500) |
Sample Request
{
"companyId": "EN",
"period": 202602,
"transactionDate": "2026-02-17",
"transactionType": "IO",
"externalReference": "Trans NNN from external system YYY",
"invoice": {
"invoiceNumber": "12345",
"supplierId": "1000",
"dueDate": "2026-03-19T13:25:36.524Z",
"discountDate": "2026-02-27T13:25:36.524Z",
"discountPercentage": 1.00,
"discountCurrencyAmount": 1.23,
"paymentMethod": "ZZ",
"paymentCurrency": "YYY",
"creditTerms": "99"
},
"details": [
{
"accountingInformation": {
"account": "2010",
"analyticalInformation": [
{
"id": "C1",
"value": "111"
}
]
},
"description": "Supplier transaction",
"valueDate": "2026-02-17",
"amounts": {
"currencyAmount": -123.00,
"currencyCode": "GBP"
}
},
{
"accountingInformation": {
"account": "9876",
"analyticalInformation": [
{
"id": "C1",
"value": "120"
}
]
},
"description": "Supplier transaction",
"valueDate": "2026-02-17",
"amounts": {
"currencyAmount": 100,
"currencyCode": "GBP"
},
"taxInformation": {
"taxCode": "TC"
}
}
]
}The example above validates a financial transaction with some illegal values, returning validation errors in the notificationMessage properties in the sections where the errors occur. The ‘financial-transactions-validate’ endpoint has the same request structure as the POST ‘financial-transactions’ but will not save the transaction even if no validation errors occur.
Default Values
The Validate method shares the same autocompletion logic as the POST Method.
Calculations
The Validate method shares the same calculation logic as the POST Method.
Limits and Notes
The Validate method shares the same non-supported scenarios as the POST Method.
Validation Rules for POST Method (Financial Transactions Validate)
The Validate method shares the same validation rules as the POST Method.
Sample Request
GET /v1/financial-transactions/account?companyId=EN&period=202301&account=1110The example above checks whether account 1110 is valid in company EN during period 202301.
Typical Response Behavior
200 - OK when the account is valid for that period.
422 - Unprocessable Entity when invalid, with a NotificationInfo payload containing the validation error.
If the account does not exist for that company and period: Invalid Account ({account}) for period {period}.
If the account exists but is not Active: Invalid Account; status must be N (Active) for Period {period}.
Validation Rules for GET Method (Account Availability)
ACC_001 - Missing required parameters
| Element | Details |
|---|---|
| Scenario ID | ACC_001 |
| Scenario Name | Missing required parameters |
| HTTP Code | 422 |
| GIVEN | Account availability needs to be checked |
| WHEN | Calling the account availability GET method |
| BUT | One or more required parameters are missing |
| THEN | Validation fails; 422 response is returned |
| Example Error Message | “The {0} field is required.” |
ACC_002 - Account or period is invalid
| Element | Details |
|---|---|
| Scenario ID | ACC_002 |
| Scenario Name | Account or period is invalid |
| HTTP Code | 422 |
| GIVEN | Account availability needs to be checked |
| WHEN | Calling the account availability GET method |
| BUT | Account is not valid for the selected company or period |
| THEN | Validation fails; 422 response is returned |
| Example Error Message | “GL account does not exist for the selected period.” |
Sample Request
GET /v1/registered-financial-transactions/18900001?companyId=ENThe example above tries to retrieve from the database the registered financial transaction 18900001 from the company EN.
Typical Response Behavior
200 OK when successful, it returns the full transaction details as a TransactionDto.
404 Not Found with a NotificationInfo payload containing the validation error.
when the transaction number does NOT exists: "The entity of the following parameters [Company: EN, Transaction Number: 18900001] was not found."
when the transaction number exists but the transaction type is other than Registration of Incoming Invoices or Registration of GL transactions: Invalid Transaction Type; Treatment Code must be one of the following: 1, 10.
Validation Rules for GET Method (Registered Financial Transactions)
GET_001 - User not authorised
| Element | Details |
|---|---|
| Scenario ID | GET_001 |
| Scenario Name | User not authorised |
| HTTP Code | 403 |
| GIVEN | A registered transaction needs to be retrieved |
| WHEN | Calling the GET method |
| BUT | User does NOT have permissions for company access |
| THEN | API is not reached; 403 response is returned |
| Example Error Message | “User is not authorized” |
GET_002 - Registered transaction not found
| Element | Details |
|---|---|
| Scenario ID | GET_002 |
| Scenario Name | Registered transaction not found |
| HTTP Code | 404 |
| GIVEN | A registered transaction needs to be retrieved |
| WHEN | Calling the GET method |
| BUT | Transaction does not exist for provided company and transaction number |
| THEN | No data is returned; 404 response is returned |
| Example Error Message | “The entity of the following parameters [Company: EN, Transaction number: 666] was not found.” |
Sample Request
GET /v1/objects/financial-transactions?limit=100&offset=0
Limits and Notes
- This endpoint returns registered transactions that have not been posted yet.
- It supports standard Object API query capabilities (filtering, sorting, pagination and selected fields).
- For the data model details, see https://ontology-latest.u4pp.com/enterprise-documents/FinancialTransaction.
Typical Response Behavior
200: Returns object rows matching filters.400/422: Invalid query options or filter syntax.401/403: Authentication/authorization issue.
Sample Request
GET /v2/objects/general-ledger-transactions?limit=100&offset=0
Limits and Notes
- This endpoint is an Object API query endpoint for already posted transactions.
- It supports standard Object API query capabilities (filtering, sorting, pagination and selected fields).
- For full query syntax and behavior, see ObjectAPI section.
Typical Response Behavior
200: Returns object rows matching filters.400/422: Invalid query options or filter syntax.401/403: Authentication/authorization issue.
Best Practices
- Validate requests in Swagger UI before sending: Use the
financial-transactions-validateendpoint for testing and schema validation before posting. - Transactions are not posted in real time: Posting occurs only after the Transaction Processing Service (TPS) runs.
- Respect hard limits: Maximum 500 transaction details per POST call. This limit counts only the detail lines provided in the request payload, it does not include the tax lines generated by the API.
- Use Transaction types with posting treatment codes (2, 4, 5): The
financial-transactionsendpoint does not support Registration mode. - Keep request sizes practical: Large payloads may be rejected by the parser. Keep request size below 3.5 MB.