My Products
Help
Sander_Feenstra
CONTRIBUTOR *

Post journal transaction error "SubId" is not found

by Sander_Feenstra

Hello,

 

I try to post a journal transaction on which I receive error 'SubID' is not found.

I can't figure out what wrong.

 

Error requesting: POST "https://integration.visma.net/API/controller/api/v2/journalTransaction"
HTTP error: 400 - Bad Request
message: VismaId: 64e857ac-e612-4e0d-8065-29ea343b2f47. Error creating journal transaction. Error: 'SubID' is not found.

Body: {
  "batchNumber": {
    "value": "3001"
  },
  "overrideNumberSeries": {
    "value": true
  },
  "branch": {
    "value": "1"
  },
  "transactionDate": {
    "value": "2024-01-26T00:00:00"
  },
  "postPeriod": {
    "value": "012024"
  },
  "ledger": {
    "value": "WERKELIJK"
  },
  "hold": {
    "value": false
  },
  "currencyId": {
    "value": "EUR"
  },
  "createVatTransaction": {
    "value": "true"
  },
  "journalTransactionLines": [
    {
      "operation": "insert",
      "lineNumber": {
        "value": 1
      },
      "accountNumber": {
        "value": "8100"
      },
      "subaccount": [
        {
          "segmentId": 1,
          "segmentValue": "A"
        },
        {
          "segmentId": 2,
          "segmentValue": "1"
        }
      ],
      "transactionDescription": {
        "value": "Regel 1"
      },
      "debitAmountInCurrency": {
        "value": 500.0000
      },
      "creditAmountInCurrency": {
        "value": null
      },
      "quantity": {
        "value": null
      }
    },
    {
      "operation": "insert",
      "lineNumber": {
        "value": 2
      },
      "accountNumber": {
        "value": "8100"
      },
      "subaccount": [
        {
          "segmentId": 1,
          "segmentValue": "B"
        },
        {
          "segmentId": 2,
          "segmentValue": "3"
        }
      ],
      "transactionDescription": {
        "value": "Regeltje 2"
      },
      "debitAmountInCurrency": {
        "value": null
      },
      "creditAmountInCurrency": {
        "value": 500.0000
      },
      "quantity": {
        "value": null
      }
    }
  ]
}

 

Sander_Feenstra_0-1706540860186.png

 

Can someone help me out?

Thanks

 

Kind regards,

Sander

 

 

 

5 REPLIES 5
Marten Voort
VISMA

by Marten Voort

Hi Sander, are you able to successfully post when using this?

"hold": {
"value": true

}

 

Sander_Feenstra
CONTRIBUTOR *

by Sander_Feenstra

Hi Marten, 

No I can't either, got the same error message.

 

Accepted solution
Marten Voort
VISMA

by Marten Voort

Ok, a couple of things to check:

Are all used segment values present and active in segmentkey SUBACCOUNT? ScreenID CS203000

Is the default subaccount correctly enterend in General ledger preferences? ScreenID GL102000

Sander_Feenstra
CONTRIBUTOR *

by Sander_Feenstra

Right, setting a default subaccount did the trick. 

Can you explain? Why can I leave it empty at all if I can't import journal transactions anymore?

Marten Voort
VISMA

by Marten Voort

Nice! Although default subid is not a mandatory field, it will be used by all accounts that have the 'use default subaccount' selected. In the entry flow this sub is always entered, after which you can override. The same goes for api. Without a default subid you cannot get past the first step. We recommend to always configure this field in implementations. Hope this explains a bit.