RE: Creating invoices via REST API
It seems that location may be a challenge based on this other recent question:
I’ve just done a quick test with Department and that seems to have the same issue too for some reason!?!
There’s some suggestions on that other ticket as to what you might be able to do to work around this apparent limitation.
That said, I don’t believe that you should have any issues with custom fields based on my testing – just use the field name in the line level object of the JSON.