Hi FreeAgent,
We’re having issues creating a journal on your production environment (“https://api.freeagent.com”). The creating journals is the only part that fails, grabbing the oAuth token and accounting categories work fine. When I go to post a journal, I get the following error
{
“errors”: {
“error”: {
“message”: “Required parameter missing: journal_set”
}
}
}
My JSON below includes the journal_set, so I could do some help on working out why this error is coming back
{
“journal_set”: {
“dated_on”: “2021-05-26”,
“description”: “Payroll M2 Monthly”,
“journal_entries”: [
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Wages and Salary for pay period ending 30/06/2020”,
“debit_value”: “6634.94”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Wages Expense for pay period ending 30/06/2020”,
“debit_value”: “-9416.67”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Student Loan Liability for pay period ending 30/06/2020”,
“debit_value”: “285.00”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Post Graduate Loan Liability for pay period ending 30/06/2020”,
“debit_value”: “85.00”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “PAYE Liability for pay period ending 30/06/2020”,
“debit_value”: “1175.80”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Employer Pension Expense for pay period ending 30/06/2020”,
“debit_value”: “-235.72”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Employer Pension Liability for pay period ending 30/06/2020”,
“debit_value”: “235.72”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Employee Pension Liability for pay period ending 30/06/2020”,
“debit_value”: “392.85”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “National Insurance Expense for pay period ending 30/06/2020”,
“debit_value”: “-994.37”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “National Insurance Liability for pay period ending 30/06/2020”,
“debit_value”: “994.37”
},
{
“category”: “https://api.freeagent.com/v2/categories/249”,
“description”: “Employee National Insurance Liability for pay period ending 30/06/2020”,
“debit_value”: “843.08”
}
]
}
}
We have run a test using the sandbox and the journals export fine, it uses the same code. The only difference is the URL is changed from the sandbox (“https://api.sandbox.freeagent.com”) to prod (“https://api.freeagent.com”).
Our application on https://dev.freeagent.com/ is called ‘KeyPay - Singular business’. This is going to be affecting production customers, so thanks in advance for any quick responses