How to find out why an invoice cannot be marked as sent?

Hello!

I have an invoice which for some reason cannot be marked as sent. When I PUT to /v2/invoices/1234/transitions/mark_as_sent, I get a 403 response with “This Invoice cannot be marked as sent”. However I don’t know why and I’m not sure how to find out.

What’s the best way to deduce the problem?

Many thanks!
Andrew Stewart

The invoices you’re having trouble with are in a locked accounting period (e.g. a tax return has been filled out) so can’t be sent retroactively.

We have a feature request filed to improve the error messaging in the API here, including adding the locked reason. Normally this is displayed on the web interface above the invoice but it doesn’t appear to be exposed in the API for invoices at the moment, sorry.

Kind regards,
Dominic

Hi Dominic, thank you very much for the explanation!
Yours,
Andrew