When pushing new Accounts to QBO via the Codat API, you may have noticed error messages relating to the Account's number, when the QBO region is France.
Problem
You may have noticed that when pushing new Accounts to QBO FR, the request returns with a 'Failed' status along with us having captured a '400' error code from the upstream service and the message:
'BadRequest - Business Validation Error: Account numbers must follow the plan compatable numbering system.'
{
...
"status": "Failed",
"errorMessage": "BadRequest - Business Validation Error: Account numbers must follow the plan compatable numbering system.",
"statusCode": 400
...
}
This occurs due to the fact that account numbering in France follows a strict format, driven by the French generally accepted accounting principles.
Resolution
You will need to amend the payload of your request so that the nominalCode attribute conforms to the correct formatting.
From the QBO docs:
"...For French Locales:
- Length must be between 6 and 20 characters
- Must start with the account number from the master category list.
- Name limited to alpha-numeric characters.
..."
The aforementioned Master Category List is driven by the Plan Comptable General (PCG) list.
An example of an account with a valid Account Number/ Nominal Code, (taken from the QBO FR sandbox) is as follows:
{
...
"nominalCode": "51131000",
"name": "Fonds non déposés",
"fullyQualifiedCategory": "Asset.Bank.UndepositedFunds",
"fullyQualifiedName": "Asset.Bank.UndepositedFunds.Fonds non déposés",
"currency": "EUR",
"currentBalance": 0,
"type": "Asset",
"status": "Active",
"isBankAccount": true,
...
}
We can see that this is a bank account and in the generally accepted accounting principles, code '51' relates to Banks, so a code of 51131000
is accepted by QBO FR's validation.