We are trying to cancel customer order invoice that are in a Preliminary status.
based on the trace file (cause we are able to do that manually) :
The CancelDebitInvoice method is to be used.

We are able to cancel the invoice using rest api, but when trying to implement this in a migration job :
we have the following error :
Arguments used to execute current operation are not allowed.




Any Idea Please?
Thank you in advance