Marking an invoice that falls within the previous financial year as sent

Hello,

Assuming the accounts for 2020/21 are filed and complete, what is the expected API response behaviour for updating an invoice that falls within the previous financial year e.g. has an issue date and due date set as 30/12/2020 via the endpoint https://api.freeagent.com/v2/invoices/:id/transitions/mark_as_sent ?

I’m experiencing a 403 forbidden response, however, I don’t see that response type documented for the mark_as_sent endpoint in your API documentation.

Thanks

Hi James,

In general, we don’t list the ways that an API request could be rejected in the API documentation, but failure responses should be descriptive as to what caused the failure.

In this case, the Invoice is in a locked period, and therefore the transition “mark as sent” is forbidden - hence the 403 response. You should find that the response body carries the relevant error message; in this case “Invoice is locked.”

I hope that helps - do let us know if you have any further questions.

Chris Howlett
FreeAgent