Having implemented a crude workaround for /v2/categories endpoint doesn’t list "liabilities" - #2 by Shaheed_Haque, I am able to upload journals with SOME liabilities categories. Here is an (abbreviated) journal that works:
data = {
'journal_set': {
'url': 'https://api.freeagent.com/v2/journal_sets/paiyroll_w1_2019-01-01',
'dated_on': '2019-01-01',
'description': 'Payrun.bpmn#8828.Franecki Group:w1:2019-01-01',
'journal_entries': [{
...
'debit_value': '7615.39'
}, {
...
'debit_value': '983.86'
}, {
...
'debit_value': '114.25'
}, {
...
'category': 'https://api.sandbox.freeagent.com/v2/categories/660',
...
'debit_value': '-4320.91'
}, {
...
'category': 'https://api.sandbox.freeagent.com/v2/categories/731',
...
'debit_value': '-2927.82'
}, {
...
'category': 'https://api.sandbox.freeagent.com/v2/categories/761',
...
'debit_value': '-983.86'
}, {
...
'debit_value': '-252.41'
}, {
...
'debit_value': '-114.25'
}, {
...
'debit_value': '-114.25'
}]
}
}
As per the above, liabilities 660, 731 and 761 work just fine (and the journal balances). However, using liabilities 750 and 904 causes “resource not found” errors.
So, what is special about 750 and 904? Is it something specific to my sandbox or generic to FreeAgent? Any advice appreciated.
Thanks, Shaheed