Forum Discussion

bryniker's avatar
5 years ago

Updating Status property in Invoice using PUT

I am trying to create a credit note against an existing invoice. My first attempt against the  CreditRefund endpoint returned an  InvoiceNotInCredit error.

It seems the invoice Status must be "Credit" for me to create an associated credit note.

But I seem unable to update said Status (using the /Sale/Invoice/Item/ endpoint, request method PUT).

I can update the invoice Amount, the Comment field, etc, but the status will not change. In all cases the API appears to return nothing. HTTP response code 200.

My steps are:

- Retrieve the current myob invoice using the GUID
- Take the resulting invoice array, set the Status property to "Credit"
- "PUT" the invoice as json data to the /Sale/Invoice/Item endpoint

Nothing is returned. I appear to be able to update everything other field I've tried using these steps, but not the Status. Which is the only one I need to update :-)

Am I missing something - any ideas? is it possible to change an invoice status through the API?


2 Replies

Replies have been turned off for this discussion