Forum Discussion

bryniker's avatar
bryniker
Member
6 years ago
Solved

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?

cheers.

2 Replies

Replies have been turned off for this discussion

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Level up your skills using MYOB software.

 

Find help guides and technical solutions for all MYOB products here

Explore video tutorials for our software at the MYOB Academy here

 

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.