I’m curious what’s the validation that’s being performed on the from_date and to_date query parameters that the Trial Balance endpoint accepts.
My app is sending such a request to FreeAgent and for the from_date I’m using the company start date and for the to_date some more recent date and lately I’ve started getting a HTTP 400 response saying
"No accounting period includes the specified dates"
If I log in to the account whose Trail Balance I’m trying to retrieve and go to Accounting > Reports > Trail Balance and run the request the report for the same period I’m getting this message
Selected date range cannot start before 01 Apr 2015
where 15th of April is the start of the first full financial year for the company.
The issue is that for another one of my test accounts the query works just fine when I use the company start date as the from_date and I can’t figure what’s different between the two companies that determines this different behaviour. Is it the company type, the location of the company or something else?
If anyone has run into the same issue and know what’s happening I would really appreciate the help.