Only invoices in sent/overdue status can be cancelled.
API key for authentication. Get your key from the Dashboard > Settings > API Access.
The id of the invoice. Expected to be a valid object id like 666666666666666666666666
The reason for cancellation